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

drm/amd/display: add support for chroma offset

[Why]
Adding support for chroma subsampling offset (cositing) in scaler
calculations to adjust reference point where we determine post-scaling
chroma value in YUV420 surfaces.

[How]
Add support for cositing options: NONE, LEFT and TOPLEFT Add debug
option force_cositing and set default to TOPLEFT to maintain same
behaviour as without offset support.

Reviewed-by: Jun Lei <jun.lei@amd.com>
Acked-by: Rodrigo Siqueira <rodrigo.siqueira@amd.com>
Signed-off-by: Samson Tam <samson.tam@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Samson Tam and committed by
Alex Deucher
ef319dff d7fedf26

+10
+3
drivers/gpu/drm/amd/display/dc/dc.h
··· 1003 1003 unsigned int static_screen_wait_frames; 1004 1004 bool force_chroma_subsampling_1tap; 1005 1005 bool disable_422_left_edge_pixel; 1006 + unsigned int force_cositing; 1006 1007 }; 1007 1008 1008 1009 struct gpu_info_soc_bounding_box_v1_0; ··· 1286 1285 struct tg_color visual_confirm_color; 1287 1286 1288 1287 bool is_statically_allocated; 1288 + enum chroma_cositing cositing; 1289 1289 }; 1290 1290 1291 1291 struct dc_plane_info { ··· 1305 1303 int global_alpha_value; 1306 1304 bool input_csc_enabled; 1307 1305 int layer_index; 1306 + enum chroma_cositing cositing; 1308 1307 }; 1309 1308 1310 1309 #include "dc_stream.h"
+7
drivers/gpu/drm/amd/display/dc/dc_hw_types.h
··· 738 738 SCANNING_TYPE_UNDEFINED 739 739 }; 740 740 741 + enum chroma_cositing { 742 + CHROMA_COSITING_NONE, 743 + CHROMA_COSITING_LEFT, 744 + CHROMA_COSITING_TOPLEFT, 745 + CHROMA_COSITING_COUNT 746 + }; 747 + 741 748 struct dc_crtc_timing_flags { 742 749 uint32_t INTERLACE :1; 743 750 uint32_t HSYNC_POSITIVE_POLARITY :1; /* when set to 1,