diff options
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2777-drm-amd-display-move-csc-matrix-to-hw_shared.patch')
-rw-r--r-- | meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2777-drm-amd-display-move-csc-matrix-to-hw_shared.patch | 91 |
1 files changed, 91 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2777-drm-amd-display-move-csc-matrix-to-hw_shared.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2777-drm-amd-display-move-csc-matrix-to-hw_shared.patch new file mode 100644 index 00000000..c0ebb374 --- /dev/null +++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2777-drm-amd-display-move-csc-matrix-to-hw_shared.patch @@ -0,0 +1,91 @@ +From bb42d4d0a2e7a97cb7cc11012488b814e5177a5b Mon Sep 17 00:00:00 2001 +From: Yue Hin Lau <Yuehin.Lau@amd.com> +Date: Mon, 13 Nov 2017 14:55:07 -0500 +Subject: [PATCH 2777/4131] drm/amd/display: move csc matrix to hw_shared + +Signed-off-by: Yue Hin Lau <Yuehin.Lau@amd.com> +Reviewed-by: Eric Bernstein <Eric.Bernstein@amd.com> +Acked-by: Harry Wentland <harry.wentland@amd.com> +Signed-off-by: Alex Deucher <alexander.deucher@amd.com> +--- + .../gpu/drm/amd/display/dc/dcn10/dcn10_dpp_cm.c | 26 ---------------------- + drivers/gpu/drm/amd/display/dc/inc/hw/hw_shared.h | 26 ++++++++++++++++++++++ + 2 files changed, 26 insertions(+), 26 deletions(-) + +diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp_cm.c b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp_cm.c +index b601a00..4c90043 100644 +--- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp_cm.c ++++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp_cm.c +@@ -117,32 +117,6 @@ static const struct dcn10_input_csc_matrix dcn10_input_csc_matrix[] = { + 0x2568, 0x43ee, 0xdbb2} } + }; + +-struct 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, +- { 0x2000, 0, 0, 0, 0, 0x2000, 0, 0, 0, 0, 0x2000, 0} }, +- { COLOR_SPACE_SRGB_LIMITED, +- { 0x1B67, 0, 0, 0x201, 0, 0x1B67, 0, 0x201, 0, 0, 0x1B67, 0x201} }, +- { COLOR_SPACE_YCBCR601, +- { 0xE04, 0xF444, 0xFDB9, 0x1004, 0x831, 0x1016, 0x320, 0x201, 0xFB45, +- 0xF6B7, 0xE04, 0x1004} }, +- { COLOR_SPACE_YCBCR709, +- { 0xE04, 0xF345, 0xFEB7, 0x1004, 0x5D3, 0x1399, 0x1FA, +- 0x201, 0xFCCA, 0xF533, 0xE04, 0x1004} }, +- +- /* TODO: correct values below */ +- { COLOR_SPACE_YCBCR601_LIMITED, +- { 0xE00, 0xF447, 0xFDB9, 0x1000, 0x991, +- 0x12C9, 0x3A6, 0x200, 0xFB47, 0xF6B9, 0xE00, 0x1000} }, +- { COLOR_SPACE_YCBCR709_LIMITED, +- { 0xE00, 0xF349, 0xFEB7, 0x1000, 0x6CE, 0x16E3, +- 0x24F, 0x200, 0xFCCB, 0xF535, 0xE00, 0x1000} }, +-}; +- + static void program_gamut_remap( + struct dcn10_dpp *dpp, + const uint16_t *regval, +diff --git a/drivers/gpu/drm/amd/display/dc/inc/hw/hw_shared.h b/drivers/gpu/drm/amd/display/dc/inc/hw/hw_shared.h +index a650ede..ddc5670 100644 +--- a/drivers/gpu/drm/amd/display/dc/inc/hw/hw_shared.h ++++ b/drivers/gpu/drm/amd/display/dc/inc/hw/hw_shared.h +@@ -131,6 +131,32 @@ struct out_csc_color_matrix { + uint16_t regval[12]; + }; + ++struct 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, ++ { 0x2000, 0, 0, 0, 0, 0x2000, 0, 0, 0, 0, 0x2000, 0} }, ++ { COLOR_SPACE_SRGB_LIMITED, ++ { 0x1B67, 0, 0, 0x201, 0, 0x1B67, 0, 0x201, 0, 0, 0x1B67, 0x201} }, ++ { COLOR_SPACE_YCBCR601, ++ { 0xE04, 0xF444, 0xFDB9, 0x1004, 0x831, 0x1016, 0x320, 0x201, 0xFB45, ++ 0xF6B7, 0xE04, 0x1004} }, ++ { COLOR_SPACE_YCBCR709, ++ { 0xE04, 0xF345, 0xFEB7, 0x1004, 0x5D3, 0x1399, 0x1FA, ++ 0x201, 0xFCCA, 0xF533, 0xE04, 0x1004} }, ++ ++ /* TODO: correct values below */ ++ { COLOR_SPACE_YCBCR601_LIMITED, ++ { 0xE00, 0xF447, 0xFDB9, 0x1000, 0x991, ++ 0x12C9, 0x3A6, 0x200, 0xFB47, 0xF6B9, 0xE00, 0x1000} }, ++ { COLOR_SPACE_YCBCR709_LIMITED, ++ { 0xE00, 0xF349, 0xFEB7, 0x1000, 0x6CE, 0x16E3, ++ 0x24F, 0x200, 0xFCCB, 0xF535, 0xE00, 0x1000} }, ++}; ++ + enum opp_regamma { + OPP_REGAMMA_BYPASS = 0, + OPP_REGAMMA_SRGB, +-- +2.7.4 + |