Skip to content

Commit

Permalink
[CM] Change the read/write surface according to gmm's change
Browse files Browse the repository at this point in the history
After tile page align changes from gmm, the alloc height also need to be align

Change-Id: I49843097cdef7b214dbe3df96e6641c64c77575d
(cherry picked from commit 4d247be)
  • Loading branch information
HeFan2017 authored and intel-mediadev committed Oct 21, 2019
1 parent 8d2469b commit 811b651
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions media_driver/agnostic/common/cm/cm_surface_2d_rt_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand All @@ -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);
}
Expand Down Expand Up @@ -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;
}
Expand All @@ -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);
}
Expand Down

0 comments on commit 811b651

Please sign in to comment.