diff options
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3067-drm-amd-display-Cache-the-use_pitch_c-conditional.patch')
-rw-r--r-- | meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3067-drm-amd-display-Cache-the-use_pitch_c-conditional.patch | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3067-drm-amd-display-Cache-the-use_pitch_c-conditional.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3067-drm-amd-display-Cache-the-use_pitch_c-conditional.patch new file mode 100644 index 00000000..2fad8881 --- /dev/null +++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3067-drm-amd-display-Cache-the-use_pitch_c-conditional.patch @@ -0,0 +1,47 @@ +From 283a2a8ff3094db6016321baabc3e49ff8bac8c5 Mon Sep 17 00:00:00 2001 +From: Ilya Bakoulin <Ilya.Bakoulin@amd.com> +Date: Wed, 19 Jun 2019 17:33:02 -0400 +Subject: [PATCH 3067/4256] drm/amd/display: Cache the use_pitch_c conditional + +For clarity, save the use_pitch_c logic to a bool + +Signed-off-by: Ilya Bakoulin <Ilya.Bakoulin@amd.com> +Reviewed-by: Eric Bernstein <eric.bernstein@amd.com> +Acked-by: Leo Li <sunpeng.li@amd.com> +--- + drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hubp.c | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hubp.c b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hubp.c +index 02e8c0c6a233..a167f867cb72 100644 +--- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hubp.c ++++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hubp.c +@@ -402,11 +402,14 @@ void hubp2_program_size( + { + struct dcn20_hubp *hubp2 = TO_DCN20_HUBP(hubp); + uint32_t pitch, meta_pitch, pitch_c, meta_pitch_c; ++ bool use_pitch_c = false; + + /* Program data and meta surface pitch (calculation from addrlib) + * 444 or 420 luma + */ +- if (format >= SURFACE_PIXEL_FORMAT_VIDEO_BEGIN && format < SURFACE_PIXEL_FORMAT_SUBSAMPLE_END) { ++ use_pitch_c = format >= SURFACE_PIXEL_FORMAT_VIDEO_BEGIN ++ && format < SURFACE_PIXEL_FORMAT_SUBSAMPLE_END; ++ if (use_pitch_c) { + ASSERT(plane_size->video.chroma_pitch != 0); + /* Chroma pitch zero can cause system hang! */ + +@@ -429,7 +432,8 @@ void hubp2_program_size( + REG_UPDATE_2(DCSURF_SURFACE_PITCH, + PITCH, pitch, META_PITCH, meta_pitch); + +- if (format >= SURFACE_PIXEL_FORMAT_VIDEO_BEGIN) ++ use_pitch_c = format >= SURFACE_PIXEL_FORMAT_VIDEO_BEGIN; ++ if (use_pitch_c) + REG_UPDATE_2(DCSURF_SURFACE_PITCH_C, + PITCH_C, pitch_c, META_PITCH_C, meta_pitch_c); + } +-- +2.17.1 + |