| 1 | /* |
| 2 | * Copyright (c) 2019, Intel Corporation |
| 3 | * |
| 4 | * Permission is hereby granted, free of charge, to any person obtaining a |
| 5 | * copy of this software and associated documentation files (the "Software"), |
| 6 | * to deal in the Software without restriction, including without limitation |
| 7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, |
| 8 | * and/or sell copies of the Software, and to permit persons to whom the |
| 9 | * Software is furnished to do so, subject to the following conditions: |
| 10 | * |
| 11 | * The above copyright notice and this permission notice shall be included |
| 12 | * in all copies or substantial portions of the Software. |
| 13 | * |
| 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS |
| 15 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
| 17 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR |
| 18 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, |
| 19 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
| 20 | * OTHER DEALINGS IN THE SOFTWARE. |
| 21 | */ |
| 22 | //! |
| 23 | //! \file vp_status_report.h |
| 24 | //! \brief Defines the interface for vp status report |
| 25 | //! \details vp status will allocate and destory buffers, the caller |
| 26 | //! can use directly |
| 27 | //! |
| 28 | |
| 29 | #ifndef __VP_STATUS_REPORT_H__ |
| 30 | #define __VP_STATUS_REPORT_H__ |
| 31 | |
| 32 | #include "mos_defs.h" |
| 33 | #include "vp_pipeline_common.h" |
| 34 | #include "media_class_trace.h" |
| 35 | #include "mos_os.h" |
| 36 | #include "mos_os_specific.h" |
| 37 | #include "vp_common_tools.h" |
| 38 | |
| 39 | namespace vp |
| 40 | { |
| 41 | class VPStatusReport |
| 42 | { |
| 43 | public: |
| 44 | |
| 45 | VPStatusReport(PMOS_INTERFACE osInterface); |
| 46 | |
| 47 | ~VPStatusReport(){}; |
| 48 | |
| 49 | //! |
| 50 | //! \brief set status report params |
| 51 | //! \param [in] pVpParams |
| 52 | //! pointer to vp pipeline input params |
| 53 | //! \param [in] pStatusTable |
| 54 | //! pointer to vp pipeline status table |
| 55 | //! \return void |
| 56 | //! |
| 57 | void SetPipeStatusReportParams( |
| 58 | PVP_PIPELINE_PARAMS pVpParams, |
| 59 | PVPHAL_STATUS_TABLE pStatusTable); |
| 60 | |
| 61 | //! |
| 62 | //! \brief update status report rely on command buffer sync tag |
| 63 | //! \param [in] eLastStatus |
| 64 | //! indicating last submition is successful or not |
| 65 | //! \return MOS_STATUS |
| 66 | //! Return MOS_STATUS_SUCCESS if successful, otherwise failed |
| 67 | //! |
| 68 | MOS_STATUS UpdateStatusTableAfterSubmit( |
| 69 | MOS_STATUS eLastStatus); |
| 70 | |
| 71 | protected: |
| 72 | |
| 73 | STATUS_TABLE_UPDATE_PARAMS m_StatusTableUpdateParams = {}; |
| 74 | MOS_INTERFACE *m_osInterface = nullptr; |
| 75 | |
| 76 | MEDIA_CLASS_DEFINE_END(vp__VPStatusReport) |
| 77 | }; |
| 78 | } // namespace vp |
| 79 | |
| 80 | #endif //__VP_STATUS_REPORT_H__ |