From de70557d6aa9ce7af889d34df95f1df4ded8b4c4 Mon Sep 17 00:00:00 2001 From: Cai_Jianxing Date: Thu, 19 Oct 2023 12:34:12 +0800 Subject: [PATCH] [Media Common] [VP] cache setting on non apo path cache setting on non apo path --- media_driver/agnostic/common/os/mos_graphicsresource.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/media_driver/agnostic/common/os/mos_graphicsresource.h b/media_driver/agnostic/common/os/mos_graphicsresource.h index ed428d9b21f..5bc56ef9191 100644 --- a/media_driver/agnostic/common/os/mos_graphicsresource.h +++ b/media_driver/agnostic/common/os/mos_graphicsresource.h @@ -168,9 +168,9 @@ class GraphicsResource m_width = pParams->dwWidth; m_memType = pParams->dwMemType; m_tileModeByForce = pParams->m_tileModeByForce; - m_gmmResUsageType = MosInterface::GetGmmResourceUsageType(pParams->ResUsageType); - if (pParams->ResUsageType >= MOS_HW_RESOURCE_USAGE_MEDIA_BATCH_BUFFERS || pParams->ResUsageType == MOS_CODEC_RESOURCE_USAGE_BEGIN_CODEC) + if (pParams->ResUsageType == MOS_CODEC_RESOURCE_USAGE_BEGIN_CODEC || + pParams->ResUsageType == MOS_HW_RESOURCE_DEF_MAX) // the usage type is invalid, set to default usage. { m_mocsMosResUsageType = MOS_MP_RESOURCE_USAGE_DEFAULT; } @@ -178,6 +178,7 @@ class GraphicsResource { m_mocsMosResUsageType = pParams->ResUsageType; } + m_gmmResUsageType = MosInterface::GetGmmResourceUsageType(m_mocsMosResUsageType); }; CreateParams()