提交 493942cd 编写于 作者: Y Yue Hin Lau 提交者: Alex Deucher

drm/amd/display: dpp clean up

Signed-off-by: NYue Hin Lau <Yuehin.Lau@amd.com>
Reviewed-by: NTony Cheng <Tony.Cheng@amd.com>
Acked-by: NHarry Wentland <harry.wentland@amd.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 7bc6f1ca
...@@ -49,6 +49,8 @@ ...@@ -49,6 +49,8 @@
#define FN(reg_name, field_name) \ #define FN(reg_name, field_name) \
dpp->tf_shift->field_name, dpp->tf_mask->field_name dpp->tf_shift->field_name, dpp->tf_mask->field_name
#define NUM_ELEMENTS(a) (sizeof(a) / sizeof((a)[0]))
struct dcn10_input_csc_matrix { struct dcn10_input_csc_matrix {
enum dc_color_space color_space; enum dc_color_space color_space;
uint16_t regval[12]; uint16_t regval[12];
...@@ -270,7 +272,7 @@ void dpp1_cm_set_output_csc_default( ...@@ -270,7 +272,7 @@ void dpp1_cm_set_output_csc_default(
struct dcn10_dpp *dpp = TO_DCN10_DPP(dpp_base); struct dcn10_dpp *dpp = TO_DCN10_DPP(dpp_base);
struct out_csc_color_matrix tbl_entry; struct out_csc_color_matrix tbl_entry;
int i, j; int i, j;
int arr_size = sizeof(output_csc_matrix) / sizeof(struct output_csc_matrix); int arr_size = NUM_ELEMENTS(output_csc_matrix);
uint32_t ocsc_mode = 4; uint32_t ocsc_mode = 4;
tbl_entry.color_space = colorspace; tbl_entry.color_space = colorspace;
......
...@@ -131,12 +131,7 @@ struct out_csc_color_matrix { ...@@ -131,12 +131,7 @@ struct out_csc_color_matrix {
uint16_t regval[12]; uint16_t regval[12];
}; };
struct output_csc_matrix { static const struct out_csc_color_matrix output_csc_matrix[] = {
enum dc_color_space color_space;
uint16_t regval[12];
};
static const struct output_csc_matrix output_csc_matrix[] = {
{ COLOR_SPACE_SRGB, { COLOR_SPACE_SRGB,
{ 0x2000, 0, 0, 0, 0, 0x2000, 0, 0, 0, 0, 0x2000, 0} }, { 0x2000, 0, 0, 0, 0, 0x2000, 0, 0, 0, 0, 0x2000, 0} },
{ COLOR_SPACE_SRGB_LIMITED, { COLOR_SPACE_SRGB_LIMITED,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册