| 1 |
/* |
| 2 |
* Copyright (c) 2020, 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 vphal_g11_jsl_ehl.cpp |
| 24 |
//! \brief Vphal Interface Definition |
| 25 |
//! \details Vphal Interface Definition Including: |
| 26 |
//! const and function |
| 27 |
//! |
| 28 |
#include "vphal_g11_jsl_ehl.h" |
| 29 |
#include "vphal_renderer_g11_jsl_ehl.h" |
| 30 |
|
| 31 |
//! |
| 32 |
//! \brief Create instance of VphalRenderer |
| 33 |
//! \details Create instance of VphalRenderer |
| 34 |
//! \return MOS_STATUS |
| 35 |
//! Return MOS_STATUS_SUCCESS if successful, otherwise failed |
| 36 |
//! |
| 37 |
MOS_STATUS VphalStateG11JslEhl::CreateRenderer() |
| 38 |
{ |
| 39 |
MOS_STATUS eStatus = MOS_STATUS_UNKNOWN; |
| 40 |
|
| 41 |
// Setup rendering interface functions |
| 42 |
m_renderer = MOS_New( |
| 43 |
VphalRendererG11JslEhl, |
| 44 |
m_renderHal, |
| 45 |
&eStatus); |
| 46 |
|
| 47 |
if (m_renderer == nullptr) |
| 48 |
{ |
| 49 |
return MOS_STATUS_NULL_POINTER; |
| 50 |
} |
| 51 |
else |
| 52 |
{ |
| 53 |
if (eStatus != MOS_STATUS_SUCCESS) |
| 54 |
{ |
| 55 |
MOS_Delete(m_renderer); |
| 56 |
m_renderer = nullptr; |
| 57 |
return eStatus; |
| 58 |
} |
| 59 |
else |
| 60 |
{ |
| 61 |
m_renderer->SetStatusReportTable(&m_statusTable); |
| 62 |
} |
| 63 |
} |
| 64 |
|
| 65 |
eStatus = m_renderer->InitKdllParam(); |
| 66 |
if (eStatus != MOS_STATUS_SUCCESS) |
| 67 |
{ |
| 68 |
MOS_Delete(m_renderer); |
| 69 |
m_renderer = nullptr; |
| 70 |
return eStatus; |
| 71 |
} |
| 72 |
|
| 73 |
eStatus = m_renderer->AllocateRenderComponents( |
| 74 |
m_veboxInterface, |
| 75 |
m_sfcInterface); |
| 76 |
|
| 77 |
return eStatus; |
| 78 |
} |