summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/display/dc/inc/core_types.h
diff options
context:
space:
mode:
authorGeorge Shen <george.shen@amd.com>2023-09-22 14:26:39 -0400
committerAlex Deucher <alexander.deucher@amd.com>2023-10-09 17:00:57 -0400
commit051d90070d4c811d7413756cc42a59f2c28e0d0f (patch)
tree282ebc2ce5d5c92b4a5d1f0a7def2c9cb442dbf2 /drivers/gpu/drm/amd/display/dc/inc/core_types.h
parentef013f6fcd8affaae4a5bf4b51cb6244c8a2ed3f (diff)
drm/amd/display: Refactor DPG test pattern logic for ODM cases
[Why] Current DPG test pattern logic does not account for ODM configuration changes after test pattern has already been programmed. For example, if ODM2:1 is enabled after test pattern is already being output, the second pipe is not programmed to output test pattern, causing half the screen to be black. [How] Move DPG test pattern parameter calculations into separate function. Whenever ODM pipe configuration changes, re-calculate DPG test pattern parameters and program DPG if test pattern is currently enabled. Reviewed-by: Wenjing Liu <wenjing.liu@amd.com> Acked-by: Tom Chung <chiahsuan.chung@amd.com> Signed-off-by: George Shen <george.shen@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/inc/core_types.h')
-rw-r--r--drivers/gpu/drm/amd/display/dc/inc/core_types.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/inc/core_types.h b/drivers/gpu/drm/amd/display/dc/inc/core_types.h
index 2e115861b17d..bac1420b1de8 100644
--- a/drivers/gpu/drm/amd/display/dc/inc/core_types.h
+++ b/drivers/gpu/drm/amd/display/dc/inc/core_types.h
@@ -308,6 +308,16 @@ struct dcn_fe_bandwidth {
};
+/* Parameters needed to call set_disp_pattern_generator */
+struct test_pattern_params {
+ enum controller_dp_test_pattern test_pattern;
+ enum controller_dp_color_space color_space;
+ enum dc_color_depth color_depth;
+ int width;
+ int height;
+ int offset;
+};
+
struct stream_resource {
struct output_pixel_processor *opp;
struct display_stream_compressor *dsc;
@@ -324,6 +334,8 @@ struct stream_resource {
* otherwise it's using group number 'gsl_group-1'
*/
uint8_t gsl_group;
+
+ struct test_pattern_params test_pattern_params;
};
struct plane_resource {
@@ -367,6 +379,7 @@ union pipe_update_flags {
uint32_t plane_changed : 1;
uint32_t det_size : 1;
uint32_t unbounded_req : 1;
+ uint32_t test_pattern_changed : 1;
} bits;
uint32_t raw;
};