Commit ef319dff authored by Samson Tam's avatar Samson Tam Committed by Alex Deucher

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: default avatarJun Lei <jun.lei@amd.com>
Acked-by: default avatarRodrigo Siqueira <rodrigo.siqueira@amd.com>
Signed-off-by: default avatarSamson Tam <samson.tam@amd.com>
Tested-by: default avatarDaniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent d7fedf26
...@@ -1003,6 +1003,7 @@ struct dc_debug_options { ...@@ -1003,6 +1003,7 @@ struct dc_debug_options {
unsigned int static_screen_wait_frames; unsigned int static_screen_wait_frames;
bool force_chroma_subsampling_1tap; bool force_chroma_subsampling_1tap;
bool disable_422_left_edge_pixel; bool disable_422_left_edge_pixel;
unsigned int force_cositing;
}; };
struct gpu_info_soc_bounding_box_v1_0; struct gpu_info_soc_bounding_box_v1_0;
...@@ -1285,6 +1286,7 @@ struct dc_plane_state { ...@@ -1285,6 +1286,7 @@ struct dc_plane_state {
struct tg_color visual_confirm_color; struct tg_color visual_confirm_color;
bool is_statically_allocated; bool is_statically_allocated;
enum chroma_cositing cositing;
}; };
struct dc_plane_info { struct dc_plane_info {
...@@ -1303,6 +1305,7 @@ struct dc_plane_info { ...@@ -1303,6 +1305,7 @@ struct dc_plane_info {
int global_alpha_value; int global_alpha_value;
bool input_csc_enabled; bool input_csc_enabled;
int layer_index; int layer_index;
enum chroma_cositing cositing;
}; };
#include "dc_stream.h" #include "dc_stream.h"
......
...@@ -738,6 +738,13 @@ enum scanning_type { ...@@ -738,6 +738,13 @@ enum scanning_type {
SCANNING_TYPE_UNDEFINED SCANNING_TYPE_UNDEFINED
}; };
enum chroma_cositing {
CHROMA_COSITING_NONE,
CHROMA_COSITING_LEFT,
CHROMA_COSITING_TOPLEFT,
CHROMA_COSITING_COUNT
};
struct dc_crtc_timing_flags { struct dc_crtc_timing_flags {
uint32_t INTERLACE :1; uint32_t INTERLACE :1;
uint32_t HSYNC_POSITIVE_POLARITY :1; /* when set to 1, uint32_t HSYNC_POSITIVE_POLARITY :1; /* when set to 1,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment