From 811b651793b4893b1189c180c4f2bcc4a3e251b6 Mon Sep 17 00:00:00 2001 From: HeFan Date: Mon, 21 Oct 2019 15:26:03 +0800 Subject: [PATCH] [CM] Change the read/write surface according to gmm's change After tile page align changes from gmm, the alloc height also need to be align Change-Id: I49843097cdef7b214dbe3df96e6641c64c77575d (cherry picked from commit 4d247bea67d47f9259dfa0cb7f88829cadbcd1fa) --- media_driver/agnostic/common/cm/cm_surface_2d_rt_base.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/media_driver/agnostic/common/cm/cm_surface_2d_rt_base.cpp b/media_driver/agnostic/common/cm/cm_surface_2d_rt_base.cpp index 49f13b01c6d..a7f316b204e 100644 --- a/media_driver/agnostic/common/cm/cm_surface_2d_rt_base.cpp +++ b/media_driver/agnostic/common/cm/cm_surface_2d_rt_base.cpp @@ -552,7 +552,7 @@ CM_RT_API int32_t CmSurface2DRTBase::WriteSurfaceFullStride( { offsetn = offset1; // Limit the Gmm offset usage to after Gen11 - if ((platform <= IGFX_GEN11LP_CORE) || !inParam.useGmmOffset) + if (!inParam.useGmmOffset) { offsetn = (planeHeight * pitch); } @@ -571,7 +571,7 @@ CM_RT_API int32_t CmSurface2DRTBase::WriteSurfaceFullStride( { offsetn = offset2; // Limit the Gmm offset usage to after Gen11 - if ((platform <= IGFX_GEN11LP_CORE) || !inParam.useGmmOffset) + if (!inParam.useGmmOffset) { offsetn = (planeHeight * pitch) + (UVHeight * UVpitch); } @@ -872,7 +872,7 @@ CM_RT_API int32_t CmSurface2DRTBase::ReadSurfaceFullStride( unsigned char* sysMe { int offsetn = offset1; // Limit the Gmm offset usage to after Gen11 - if ((platform <= IGFX_GEN11LP_CORE) || !inParam.useGmmOffset) + if (!inParam.useGmmOffset) { offsetn = planeHeight * pitch; } @@ -891,7 +891,7 @@ CM_RT_API int32_t CmSurface2DRTBase::ReadSurfaceFullStride( unsigned char* sysMe { int offsetn = offset2; // Limit the Gmm offset usage to after Gen11 - if ((platform <= IGFX_GEN11LP_CORE) || !inParam.useGmmOffset) + if (!inParam.useGmmOffset) { offsetn = (planeHeight * pitch) + (UVHeight * UVpitch); }