| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
#ifndef __VPHAL_H__ |
| 29 |
#define __VPHAL_H__ |
| 30 |
|
| 31 |
#include "mos_utilities.h" |
| 32 |
#include "mos_util_debug.h" |
| 33 |
#include "mhw_vebox.h" |
| 34 |
#include "mhw_sfc.h" |
| 35 |
#include "vp_pipeline_adapter_base.h" |
| 36 |
#include "vphal_common_hdr.h" |
| 37 |
#include "vp_common.h" |
| 38 |
#include "vp_base.h" |
| 39 |
#include "renderhal_legacy.h" |
| 40 |
|
| 41 |
|
| 42 |
#define YUV_RANGE_FROM_DDI 3 |
| 43 |
|
| 44 |
|
| 45 |
#define RGB_RANGE_16_235 1 |
| 46 |
#define RGB_RANGE_0_255 0 |
| 47 |
|
| 48 |
|
| 49 |
|
| 50 |
|
| 51 |
|
| 52 |
|
| 53 |
|
| 54 |
|
| 55 |
|
| 56 |
#define VPHAL_HW_ASSERT(_expr) \ |
| 57 |
MOS_ASSERT(MOS_COMPONENT_VP, MOS_VP_SUBCOMP_HW, _expr) |
| 58 |
|
| 59 |
#define VPHAL_HW_ASSERTMESSAGE(_message, ...) \ |
| 60 |
MOS_ASSERTMESSAGE(MOS_COMPONENT_VP, MOS_VP_SUBCOMP_HW, _message, ##__VA_ARGS__) |
| 61 |
|
| 62 |
#define VPHAL_HW_WARNINGMESSAGE(_message, ...) \ |
| 63 |
MOS_WARNINGMESSAGE(MOS_COMPONENT_VP, MOS_VP_SUBCOMP_HW, _message, ##__VA_ARGS__) |
| 64 |
|
| 65 |
#define VPHAL_HW_NORMALMESSAGE(_message, ...) \ |
| 66 |
MOS_NORMALMESSAGE(MOS_COMPONENT_VP, MOS_VP_SUBCOMP_HW, _message, ##__VA_ARGS__) |
| 67 |
|
| 68 |
#define VPHAL_HW_VERBOSEMESSAGE(_message, ...) \ |
| 69 |
MOS_VERBOSEMESSAGE(MOS_COMPONENT_VP, MOS_VP_SUBCOMP_HW, _message, ##__VA_ARGS__) |
| 70 |
|
| 71 |
#define VPHAL_HW_FUNCTION_ENTER \ |
| 72 |
MOS_FUNCTION_ENTER(MOS_COMPONENT_VP, MOS_VP_SUBCOMP_HW) |
| 73 |
|
| 74 |
#define VPHAL_HW_CHK_STATUS(_stmt) \ |
| 75 |
MOS_CHK_STATUS(MOS_COMPONENT_VP, MOS_VP_SUBCOMP_HW, _stmt) |
| 76 |
|
| 77 |
#define VPHAL_HW_CHK_NULL(_ptr) \ |
| 78 |
MOS_CHK_NULL(MOS_COMPONENT_VP, MOS_VP_SUBCOMP_HW, _ptr) |
| 79 |
|
| 80 |
#define VPHAL_HW_CHK_NULL_NO_STATUS(_ptr) \ |
| 81 |
MOS_CHK_NULL_NO_STATUS(MOS_COMPONENT_VP, MOS_VP_SUBCOMP_HW, _ptr) |
| 82 |
|
| 83 |
|
| 84 |
|
| 85 |
|
| 86 |
#define VPHAL_PUBLIC_ASSERT(_expr) \ |
| 87 |
MOS_ASSERT(MOS_COMPONENT_VP, MOS_VP_SUBCOMP_PUBLIC, _expr) |
| 88 |
|
| 89 |
#define VPHAL_PUBLIC_ASSERTMESSAGE(_message, ...) \ |
| 90 |
MOS_ASSERTMESSAGE(MOS_COMPONENT_VP, MOS_VP_SUBCOMP_PUBLIC, _message, ##__VA_ARGS__) |
| 91 |
|
| 92 |
#define VPHAL_PUBLIC_WARNINGMESSAGE(_message, ...) \ |
| 93 |
MOS_WARNINGMESSAGE(MOS_COMPONENT_VP, MOS_VP_SUBCOMP_PUBLIC, _message, ##__VA_ARGS__) |
| 94 |
|
| 95 |
#define VPHAL_PUBLIC_NORMALMESSAGE(_message, ...) \ |
| 96 |
MOS_NORMALMESSAGE(MOS_COMPONENT_VP, MOS_VP_SUBCOMP_PUBLIC, _message, ##__VA_ARGS__) |
| 97 |
|
| 98 |
#define VPHAL_PUBLIC_VERBOSEMESSAGE(_message, ...) \ |
| 99 |
MOS_VERBOSEMESSAGE(MOS_COMPONENT_VP, MOS_VP_SUBCOMP_PUBLIC, _message, ##__VA_ARGS__) |
| 100 |
|
| 101 |
#define VPHAL_PUBLIC_FUNCTION_ENTER \ |
| 102 |
MOS_FUNCTION_ENTER(MOS_COMPONENT_VP, MOS_VP_SUBCOMP_PUBLIC) |
| 103 |
|
| 104 |
#define VPHAL_PUBLIC_CHK_STATUS(_stmt) \ |
| 105 |
MOS_CHK_STATUS(MOS_COMPONENT_VP, MOS_VP_SUBCOMP_PUBLIC, _stmt) |
| 106 |
|
| 107 |
#define VPHAL_PUBLIC_CHK_STATUS_RETURN(_stmt) \ |
| 108 |
MOS_CHK_STATUS_RETURN(MOS_COMPONENT_VP, MOS_VP_SUBCOMP_PUBLIC, _stmt) |
| 109 |
|
| 110 |
#define VPHAL_PUBLIC_CHK_NULL(_ptr) \ |
| 111 |
MOS_CHK_NULL(MOS_COMPONENT_VP, MOS_VP_SUBCOMP_PUBLIC, _ptr) |
| 112 |
|
| 113 |
#define VPHAL_PUBLIC_CHK_NULL_NO_STATUS(_ptr) \ |
| 114 |
MOS_CHK_NULL_NO_STATUS(MOS_COMPONENT_VP, MOS_VP_SUBCOMP_PUBLIC, _ptr) |
| 115 |
|
| 116 |
#define VPHAL_PUBLIC_CHK_NULL_NO_STATUS_RETURN(_ptr) \ |
| 117 |
MOS_CHK_NULL_NO_STATUS_RETURN(MOS_COMPONENT_VP, MOS_VP_SUBCOMP_PUBLIC, _ptr) |
| 118 |
|
| 119 |
|
| 120 |
|
| 121 |
|
| 122 |
#define VPHAL_DEBUG_ASSERT(_expr) \ |
| 123 |
MOS_ASSERT(MOS_COMPONENT_VP, MOS_VP_SUBCOMP_DEBUG, _expr) |
| 124 |
|
| 125 |
#define VPHAL_DEBUG_ASSERTMESSAGE(_message, ...) \ |
| 126 |
MOS_ASSERTMESSAGE(MOS_COMPONENT_VP, MOS_VP_SUBCOMP_DEBUG, _message, ##__VA_ARGS__) |
| 127 |
|
| 128 |
#define VPHAL_DEBUG_WARNINGMESSAGE(_message, ...) \ |
| 129 |
MOS_WARNINGMESSAGE(MOS_COMPONENT_VP, MOS_VP_SUBCOMP_DEBUG, _message, ##__VA_ARGS__) |
| 130 |
|
| 131 |
#define VPHAL_DEBUG_NORMALMESSAGE(_message, ...) \ |
| 132 |
MOS_NORMALMESSAGE(MOS_COMPONENT_VP, MOS_VP_SUBCOMP_DEBUG, _message, ##__VA_ARGS__) |
| 133 |
|
| 134 |
#define VPHAL_DEBUG_VERBOSEMESSAGE(_message, ...) \ |
| 135 |
MOS_VERBOSEMESSAGE(MOS_COMPONENT_VP, MOS_VP_SUBCOMP_DEBUG, _message, ##__VA_ARGS__) |
| 136 |
|
| 137 |
#define VPHAL_DEBUG_FUNCTION_ENTER \ |
| 138 |
MOS_FUNCTION_ENTER(MOS_COMPONENT_VP, MOS_VP_SUBCOMP_DEBUG) |
| 139 |
|
| 140 |
#define VPHAL_DEBUG_FUNCTION_EXIT \ |
| 141 |
MOS_FUNCTION_EXIT(MOS_COMPONENT_VP, MOS_VP_SUBCOMP_DEBUG) |
| 142 |
|
| 143 |
#define VPHAL_DEBUG_CHK_STATUS(_stmt) \ |
| 144 |
MOS_CHK_STATUS(MOS_COMPONENT_VP, MOS_VP_SUBCOMP_DEBUG, _stmt) |
| 145 |
|
| 146 |
#define VPHAL_DEBUG_CHK_NULL(_ptr) \ |
| 147 |
MOS_CHK_NULL(MOS_COMPONENT_VP, MOS_VP_SUBCOMP_DEBUG, _ptr) |
| 148 |
|
| 149 |
#define VPHAL_DEBUG_CHK_NULL_NO_STATUS(_ptr) \ |
| 150 |
MOS_CHK_NULL_NO_STATUS(MOS_COMPONENT_VP, MOS_VP_SUBCOMP_DEBUG, _ptr) |
| 151 |
|
| 152 |
|
| 153 |
|
| 154 |
|
| 155 |
#define VPHAL_RENDER_ASSERT(_expr) \ |
| 156 |
MOS_ASSERT(MOS_COMPONENT_VP, MOS_VP_SUBCOMP_RENDER, _expr) |
| 157 |
|
| 158 |
#define VPHAL_RENDER_ASSERTMESSAGE(_message, ...) \ |
| 159 |
MOS_ASSERTMESSAGE(MOS_COMPONENT_VP, MOS_VP_SUBCOMP_RENDER, _message, ##__VA_ARGS__) |
| 160 |
|
| 161 |
#define VPHAL_RENDER_WARNINGMESSAGE(_message, ...) \ |
| 162 |
MOS_WARNINGMESSAGE(MOS_COMPONENT_VP, MOS_VP_SUBCOMP_RENDER, _message, ##__VA_ARGS__) |
| 163 |
|
| 164 |
#define VPHAL_RENDER_NORMALMESSAGE(_message, ...) \ |
| 165 |
MOS_NORMALMESSAGE(MOS_COMPONENT_VP, MOS_VP_SUBCOMP_RENDER, _message, ##__VA_ARGS__) |
| 166 |
|
| 167 |
#define VPHAL_RENDER_VERBOSEMESSAGE(_message, ...) \ |
| 168 |
MOS_VERBOSEMESSAGE(MOS_COMPONENT_VP, MOS_VP_SUBCOMP_RENDER, _message, ##__VA_ARGS__) |
| 169 |
|
| 170 |
#define VPHAL_RENDER_FUNCTION_ENTER \ |
| 171 |
MOS_FUNCTION_ENTER(MOS_COMPONENT_VP, MOS_VP_SUBCOMP_RENDER) |
| 172 |
|
| 173 |
#define VPHAL_RENDER_EXITMESSAGE(_message, ...) \ |
| 174 |
MOS_DEBUGMESSAGE(MOS_MESSAGE_LVL_FUNCTION_EXIT, MOS_COMPONENT_VP, MOS_VP_SUBCOMP_RENDER, _message, ##__VA_ARGS__) |
| 175 |
|
| 176 |
#define VPHAL_RENDER_CHK_STATUS(_stmt) \ |
| 177 |
MOS_CHK_STATUS(MOS_COMPONENT_VP, MOS_VP_SUBCOMP_RENDER, _stmt) |
| 178 |
|
| 179 |
#define VPHAL_RENDER_CHK_STATUS_RETURN(_stmt) \ |
| 180 |
MOS_CHK_STATUS_RETURN(MOS_COMPONENT_VP, MOS_VP_SUBCOMP_RENDER, _stmt) |
| 181 |
|
| 182 |
#define VPHAL_RENDER_CHK_STATUS_MESSAGE(_stmt, _message, ...) \ |
| 183 |
MOS_CHK_STATUS_MESSAGE(MOS_COMPONENT_VP, MOS_VP_SUBCOMP_RENDER, _stmt, _message, ##__VA_ARGS__) |
| 184 |
|
| 185 |
#define VPHAL_RENDER_CHK_NULL(_ptr) \ |
| 186 |
MOS_CHK_NULL(MOS_COMPONENT_VP, MOS_VP_SUBCOMP_RENDER, _ptr) |
| 187 |
|
| 188 |
#define VPHAL_RENDER_CHK_NULL_RETURN(_ptr) \ |
| 189 |
MOS_CHK_NULL_RETURN(MOS_COMPONENT_VP, MOS_VP_SUBCOMP_RENDER, _ptr) |
| 190 |
|
| 191 |
#define VPHAL_RENDER_CHK_NULL_NO_STATUS(_ptr) \ |
| 192 |
MOS_CHK_NULL_NO_STATUS(MOS_COMPONENT_VP, MOS_VP_SUBCOMP_RENDER, _ptr) |
| 193 |
|
| 194 |
|
| 195 |
|
| 196 |
|
| 197 |
#define VPHAL_RENDER_CHK_NULL_NO_STATUS_RETURN(_ptr) \ |
| 198 |
MOS_CHK_NULL_NO_STATUS_RETURN(MOS_COMPONENT_VP, MOS_VP_SUBCOMP_RENDER, _ptr) |
| 199 |
|
| 200 |
|
| 201 |
|
| 202 |
|
| 203 |
#define VP_DDI_ASSERT(_expr) \ |
| 204 |
MOS_ASSERT(MOS_COMPONENT_VP, MOS_VP_SUBCOMP_DDI, _expr) |
| 205 |
|
| 206 |
#define VP_DDI_ASSERTMESSAGE(_message, ...) \ |
| 207 |
MOS_ASSERTMESSAGE(MOS_COMPONENT_VP, MOS_VP_SUBCOMP_DDI, _message, ##__VA_ARGS__) |
| 208 |
|
| 209 |
#define VP_DDI_NORMALMESSAGE(_message, ...) \ |
| 210 |
MOS_NORMALMESSAGE(MOS_COMPONENT_VP, MOS_VP_SUBCOMP_DDI, _message, ##__VA_ARGS__) |
| 211 |
|
| 212 |
#define VP_DDI_WARNINGMESSAGE(_message, ...) \ |
| 213 |
MOS_WARNINGMESSAGE(MOS_COMPONENT_VP, MOS_VP_SUBCOMP_DDI, _message, ##__VA_ARGS__) |
| 214 |
|
| 215 |
#define VP_DDI_VERBOSEMESSAGE(_message, ...) \ |
| 216 |
MOS_VERBOSEMESSAGE(MOS_COMPONENT_VP, MOS_VP_SUBCOMP_DDI, _message, ##__VA_ARGS__) |
| 217 |
|
| 218 |
#define VP_DDI_FUNCTION_ENTER \ |
| 219 |
MOS_FUNCTION_ENTER(MOS_COMPONENT_VP, MOS_VP_SUBCOMP_DDI) |
| 220 |
|
| 221 |
#define VP_DDI_CHK_STATUS(_stmt) \ |
| 222 |
MOS_CHK_STATUS(MOS_COMPONENT_VP, MOS_VP_SUBCOMP_DDI, _stmt) |
| 223 |
|
| 224 |
#define VP_DDI_CHK_STATUS_MESSAGE(_stmt, _message, ...) \ |
| 225 |
MOS_CHK_STATUS_MESSAGE(MOS_COMPONENT_VP, MOS_VP_SUBCOMP_DDI, _stmt, _message, ##__VA_ARGS__) |
| 226 |
|
| 227 |
#define VP_DDI_CHK_NULL(_ptr) \ |
| 228 |
MOS_CHK_NULL(MOS_COMPONENT_VP, MOS_VP_SUBCOMP_DDI, _ptr) |
| 229 |
|
| 230 |
#define VP_DDI_CHK_NULL_NO_STATUS(_ptr) \ |
| 231 |
MOS_CHK_NULL_NO_STATUS(MOS_COMPONENT_VP, MOS_VP_SUBCOMP_DDI, _ptr) |
| 232 |
|
| 233 |
#define VPHAL_DDI_CHK_HR(_ptr) \ |
| 234 |
MOS_CHK_HR(MOS_COMPONENT_VP, MOS_VP_SUBCOMP_DDI, _ptr) |
| 235 |
|
| 236 |
#define VPHAL_DDI_CHK_NULL_WITH_HR(_ptr) \ |
| 237 |
MOS_CHK_NULL_WITH_HR(MOS_COMPONENT_VP, MOS_VP_SUBCOMP_DDI, _ptr) |
| 238 |
|
| 239 |
|
| 240 |
|
| 241 |
|
| 242 |
struct VphalSseuSetting |
| 243 |
{ |
| 244 |
uint8_t numSlices; |
| 245 |
uint8_t numSubSlices; |
| 246 |
uint8_t numEUs; |
| 247 |
uint8_t reserved; |
| 248 |
}; |
| 249 |
|
| 250 |
|
| 251 |
|
| 252 |
|
| 253 |
struct VPHAL_GPU_CONTEXT_ENTRY |
| 254 |
{ |
| 255 |
MOS_GPU_CONTEXT gpuCtxForMos = MOS_GPU_CONTEXT_MAX; |
| 256 |
GPU_CONTEXT_HANDLE gpuContextHandle = MOS_GPU_CONTEXT_INVALID_HANDLE; |
| 257 |
void* pGpuContext = nullptr; |
| 258 |
}; |
| 259 |
|
| 260 |
|
| 261 |
|
| 262 |
|
| 263 |
|
| 264 |
|
| 265 |
|
| 266 |
|
| 267 |
|
| 268 |
|
| 269 |
|
| 270 |
using VphalSettings = VpSettings; |
| 271 |
#pragma pack(push) |
| 272 |
#pragma pack(1) |
| 273 |
|
| 274 |
#pragma pack(pop) |
| 275 |
|
| 276 |
|
| 277 |
|
| 278 |
|
| 279 |
|
| 280 |
|
| 281 |
class VphalState : public VpBase |
| 282 |
{ |
| 283 |
public: |
| 284 |
|
| 285 |
bool m_clearVideoViewMode = false; |
| 286 |
|
| 287 |
|
| 288 |
static VphalState* VphalStateFactory( |
| 289 |
PMOS_INTERFACE pOsInterface, |
| 290 |
PMOS_CONTEXT pOsDriverContext, |
| 291 |
MOS_STATUS *peStatus); |
| 292 |
|
| 293 |
|
| 294 |
|
| 295 |
|
| 296 |
|
| 297 |
|
| 298 |
|
| 299 |
|
| 300 |
|
| 301 |
|
| 302 |
|
| 303 |
|
| 304 |
|
| 305 |
VphalState( |
| 306 |
PMOS_INTERFACE pOsInterface, |
| 307 |
MOS_STATUS *peStatus); |
| 308 |
|
| 309 |
|
| 310 |
|
| 311 |
|
| 312 |
VphalState(const VphalState&) = delete; |
| 313 |
|
| 314 |
|
| 315 |
|
| 316 |
|
| 317 |
VphalState& operator=(const VphalState&) = delete; |
| 318 |
|
| 319 |
|
| 320 |
|
| 321 |
|
| 322 |
|
| 323 |
virtual ~VphalState(); |
| 324 |
|
| 325 |
|
| 326 |
|
| 327 |
|
| 328 |
|
| 329 |
|
| 330 |
|
| 331 |
|
| 332 |
|
| 333 |
|
| 334 |
|
| 335 |
virtual MOS_STATUS Allocate( |
| 336 |
const VphalSettings *pVpHalSettings) override; |
| 337 |
|
| 338 |
|
| 339 |
|
| 340 |
|
| 341 |
|
| 342 |
|
| 343 |
|
| 344 |
|
| 345 |
|
| 346 |
|
| 347 |
virtual MOS_STATUS Render( |
| 348 |
PCVPHAL_RENDER_PARAMS pcRenderParams) override; |
| 349 |
|
| 350 |
|
| 351 |
|
| 352 |
|
| 353 |
|
| 354 |
|
| 355 |
|
| 356 |
virtual VphalFeatureReport* GetRenderFeatureReport() override; |
| 357 |
|
| 358 |
|
| 359 |
|
| 360 |
|
| 361 |
|
| 362 |
|
| 363 |
|
| 364 |
|
| 365 |
|
| 366 |
|
| 367 |
virtual MOS_STATUS GetStatusReport( |
| 368 |
PQUERY_STATUS_REPORT_APP pQueryReport, |
| 369 |
uint16_t numStatus) override; |
| 370 |
|
| 371 |
|
| 372 |
|
| 373 |
|
| 374 |
|
| 375 |
|
| 376 |
|
| 377 |
|
| 378 |
|
| 379 |
virtual MOS_STATUS GetStatusReportEntryLength( |
| 380 |
uint32_t *puiLength) override; |
| 381 |
|
| 382 |
virtual PLATFORM &GetPlatform() override |
| 383 |
{ |
| 384 |
return m_platform; |
| 385 |
} |
| 386 |
|
| 387 |
virtual MEDIA_FEATURE_TABLE *GetSkuTable() override |
| 388 |
{ |
| 389 |
return m_skuTable; |
| 390 |
} |
| 391 |
|
| 392 |
MEDIA_WA_TABLE* GetWaTable() |
| 393 |
{ |
| 394 |
return m_waTable; |
| 395 |
} |
| 396 |
|
| 397 |
virtual PMOS_INTERFACE GetOsInterface() override |
| 398 |
{ |
| 399 |
return m_osInterface; |
| 400 |
} |
| 401 |
|
| 402 |
virtual PRENDERHAL_INTERFACE GetRenderHal() override |
| 403 |
{ |
| 404 |
return m_renderHal; |
| 405 |
} |
| 406 |
|
| 407 |
PMHW_VEBOX_INTERFACE GetVeboxInterface() |
| 408 |
{ |
| 409 |
return m_veboxInterface; |
| 410 |
} |
| 411 |
|
| 412 |
MhwCpInterface* GetCpInterface() |
| 413 |
{ |
| 414 |
return m_cpInterface; |
| 415 |
} |
| 416 |
|
| 417 |
PMHW_SFC_INTERFACE GetSfcInterface() |
| 418 |
{ |
| 419 |
return m_sfcInterface; |
| 420 |
} |
| 421 |
|
| 422 |
VphalRenderer* GetRenderer() |
| 423 |
{ |
| 424 |
return m_renderer; |
| 425 |
} |
| 426 |
|
| 427 |
VPHAL_STATUS_TABLE& GetStatusTable() |
| 428 |
{ |
| 429 |
return m_statusTable; |
| 430 |
} |
| 431 |
|
| 432 |
void SetMhwVeboxInterface(MhwVeboxInterface* veboxInterface) |
| 433 |
{ |
| 434 |
if (veboxInterface == nullptr) |
| 435 |
{ |
| 436 |
return; |
| 437 |
} |
| 438 |
|
| 439 |
if (m_veboxInterface != nullptr) |
| 440 |
{ |
| 441 |
m_veboxItf = std::static_pointer_cast<mhw::vebox::Itf>(m_veboxInterface->GetNewVeboxInterface()); |
| 442 |
MOS_STATUS eStatus = MOS_STATUS_SUCCESS; |
| 443 |
|
| 444 |
if (m_veboxItf) |
| 445 |
{ |
| 446 |
eStatus = m_veboxItf->DestroyHeap(); |
| 447 |
if (eStatus != MOS_STATUS_SUCCESS) |
| 448 |
{ |
| 449 |
VPHAL_PUBLIC_ASSERTMESSAGE("Failed to destroy Vebox Interface, eStatus:%d.\n", eStatus); |
| 450 |
} |
| 451 |
} |
| 452 |
|
| 453 |
eStatus = m_veboxInterface->DestroyHeap(); |
| 454 |
MOS_Delete(m_veboxInterface); |
| 455 |
m_veboxInterface = nullptr; |
| 456 |
if (eStatus != MOS_STATUS_SUCCESS) |
| 457 |
{ |
| 458 |
VPHAL_PUBLIC_ASSERTMESSAGE("Failed to destroy Vebox Interface, eStatus:%d.\n", eStatus); |
| 459 |
} |
| 460 |
} |
| 461 |
|
| 462 |
m_veboxInterface = veboxInterface; |
| 463 |
m_veboxItf = std::static_pointer_cast<mhw::vebox::Itf>(veboxInterface->GetNewVeboxInterface()); |
| 464 |
} |
| 465 |
|
| 466 |
void SetMhwSfcInterface(MhwSfcInterface* sfcInterface) |
| 467 |
{ |
| 468 |
if (sfcInterface == nullptr) |
| 469 |
{ |
| 470 |
return; |
| 471 |
} |
| 472 |
|
| 473 |
if (m_sfcInterface != nullptr) |
| 474 |
{ |
| 475 |
MOS_Delete(m_sfcInterface); |
| 476 |
m_sfcInterface = nullptr; |
| 477 |
} |
| 478 |
|
| 479 |
m_sfcInterface = sfcInterface; |
| 480 |
} |
| 481 |
|
| 482 |
virtual MOS_STATUS GetVpMhwInterface( |
| 483 |
VP_MHWINTERFACE &vpMhwinterface); |
| 484 |
|
| 485 |
protected: |
| 486 |
|
| 487 |
PLATFORM m_platform; |
| 488 |
MEDIA_FEATURE_TABLE *m_skuTable; |
| 489 |
MEDIA_WA_TABLE *m_waTable; |
| 490 |
|
| 491 |
|
| 492 |
PMOS_INTERFACE m_osInterface; |
| 493 |
PRENDERHAL_INTERFACE_LEGACY m_renderHal; |
| 494 |
PMHW_VEBOX_INTERFACE m_veboxInterface; |
| 495 |
MhwCpInterface *m_cpInterface; |
| 496 |
PMHW_SFC_INTERFACE m_sfcInterface; |
| 497 |
VphalRenderer *m_renderer; |
| 498 |
std::shared_ptr<mhw::vebox::Itf> m_veboxItf = nullptr; |
| 499 |
|
| 500 |
|
| 501 |
MOS_GPU_NODE m_renderGpuNode; |
| 502 |
MOS_GPU_CONTEXT m_renderGpuContext; |
| 503 |
|
| 504 |
|
| 505 |
VPHAL_STATUS_TABLE m_statusTable = {}; |
| 506 |
|
| 507 |
MediaUserSettingSharedPtr m_userSettingPtr = nullptr; |
| 508 |
|
| 509 |
|
| 510 |
|
| 511 |
|
| 512 |
|
| 513 |
std::vector<VPHAL_GPU_CONTEXT_ENTRY> m_gpuContextCheckList; |
| 514 |
|
| 515 |
|
| 516 |
|
| 517 |
|
| 518 |
|
| 519 |
|
| 520 |
|
| 521 |
virtual MOS_STATUS CreateRenderer() = 0; |
| 522 |
|
| 523 |
virtual bool IsApoEnabled() override |
| 524 |
{ |
| 525 |
return false; |
| 526 |
} |
| 527 |
|
| 528 |
virtual bool IsRenderContextBasedSchedulingNeeded() |
| 529 |
{ |
| 530 |
return false; |
| 531 |
} |
| 532 |
|
| 533 |
private: |
| 534 |
|
| 535 |
|
| 536 |
|
| 537 |
|
| 538 |
|
| 539 |
|
| 540 |
|
| 541 |
|
| 542 |
MOS_STATUS AddGpuContextToCheckList( |
| 543 |
MOS_GPU_CONTEXT mosGpuConext); |
| 544 |
|
| 545 |
|
| 546 |
|
| 547 |
|
| 548 |
|
| 549 |
|
| 550 |
|
| 551 |
MOS_STATUS DestroyGpuContextWithInvalidHandle(); |
| 552 |
|
| 553 |
|
| 554 |
|
| 555 |
|
| 556 |
|
| 557 |
|
| 558 |
|
| 559 |
|
| 560 |
|
| 561 |
bool IsGpuContextReused( |
| 562 |
MOS_GPU_CONTEXT mosGpuContext); |
| 563 |
}; |
| 564 |
|
| 565 |
#endif |