Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amd/display: Make assert in DCE's program_bit_depth_reduction more lenient.

This is needed to avoid warnings with linebuffer depth 36 bpp.
Testing on a Polaris11, DCE-11.2 on a 10 bit HDR-10 monitor
showed no obvious problems, and this 12 bpc limit is consistent
with what other function in the DCE bit depth reduction path use.

Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Mario Kleiner and committed by
Alex Deucher
92e2b820 a316db72

+2 -2
+2 -2
drivers/gpu/drm/amd/display/dc/dce/dce_transform.c
··· 794 794 enum dcp_out_trunc_round_mode trunc_mode; 795 795 bool spatial_dither_enable; 796 796 797 - ASSERT(depth < COLOR_DEPTH_121212); /* Invalid clamp bit depth */ 797 + ASSERT(depth <= COLOR_DEPTH_121212); /* Invalid clamp bit depth */ 798 798 799 799 spatial_dither_enable = bit_depth_params->flags.SPATIAL_DITHER_ENABLED; 800 800 /* Default to 12 bit truncation without rounding */ ··· 854 854 enum dcp_out_trunc_round_mode trunc_mode; 855 855 bool spatial_dither_enable; 856 856 857 - ASSERT(depth < COLOR_DEPTH_121212); /* Invalid clamp bit depth */ 857 + ASSERT(depth <= COLOR_DEPTH_121212); /* Invalid clamp bit depth */ 858 858 859 859 spatial_dither_enable = bit_depth_params->flags.SPATIAL_DITHER_ENABLED; 860 860 /* Default to 12 bit truncation without rounding */