mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-02 06:17:26 -04:00
drm/amd/display: force use sRGB for video TF is sRGB or BT709
[Why] When mpo enabled, video comes is 709. Desktop use sRGB. So color change easily noticeable especially when switch between mpo/non-mpo. [How] Force use sRGB for video TF is sRGB or BT709. DCN1/DCN2 use predefined type with YUV. DCN3 use distributed points type with YUV. Signed-off-by: Jing Zhou <Jing.Zhou@amd.com> Acked-by: Bindu Ramamurthy <bindu.r@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
@@ -125,6 +125,7 @@ struct dpp_color_caps {
|
||||
uint16_t hw_3d_lut : 1;
|
||||
uint16_t ogam_ram : 1; // blnd gam
|
||||
uint16_t ocsc : 1;
|
||||
uint16_t dgam_rom_for_yuv : 1;
|
||||
struct rom_curve_caps dgam_rom_caps;
|
||||
struct rom_curve_caps ogam_rom_caps;
|
||||
};
|
||||
|
||||
@@ -1439,6 +1439,7 @@ static bool dcn10_resource_construct(
|
||||
dc->caps.color.dpp.dgam_rom_caps.hlg = 0;
|
||||
dc->caps.color.dpp.post_csc = 0;
|
||||
dc->caps.color.dpp.gamma_corr = 0;
|
||||
dc->caps.color.dpp.dgam_rom_for_yuv = 1;
|
||||
|
||||
dc->caps.color.dpp.hw_3d_lut = 0;
|
||||
dc->caps.color.dpp.ogam_ram = 1; // RGAM on DCN1
|
||||
|
||||
@@ -3820,6 +3820,7 @@ static bool dcn20_resource_construct(
|
||||
dc->caps.color.dpp.dgam_rom_caps.hlg = 0;
|
||||
dc->caps.color.dpp.post_csc = 0;
|
||||
dc->caps.color.dpp.gamma_corr = 0;
|
||||
dc->caps.color.dpp.dgam_rom_for_yuv = 1;
|
||||
|
||||
dc->caps.color.dpp.hw_3d_lut = 1;
|
||||
dc->caps.color.dpp.ogam_ram = 1;
|
||||
|
||||
@@ -1978,6 +1978,7 @@ static bool dcn21_resource_construct(
|
||||
dc->caps.color.dpp.dgam_rom_caps.hlg = 0;
|
||||
dc->caps.color.dpp.post_csc = 0;
|
||||
dc->caps.color.dpp.gamma_corr = 0;
|
||||
dc->caps.color.dpp.dgam_rom_for_yuv = 1;
|
||||
|
||||
dc->caps.color.dpp.hw_3d_lut = 1;
|
||||
dc->caps.color.dpp.ogam_ram = 1;
|
||||
|
||||
@@ -2681,6 +2681,7 @@ static bool dcn30_resource_construct(
|
||||
dc->caps.color.dpp.dgam_rom_caps.hlg = 1;
|
||||
dc->caps.color.dpp.post_csc = 1;
|
||||
dc->caps.color.dpp.gamma_corr = 1;
|
||||
dc->caps.color.dpp.dgam_rom_for_yuv = 0;
|
||||
|
||||
dc->caps.color.dpp.hw_3d_lut = 1;
|
||||
dc->caps.color.dpp.ogam_ram = 1;
|
||||
|
||||
@@ -1748,6 +1748,7 @@ static bool dcn301_resource_construct(
|
||||
dc->caps.color.dpp.dgam_rom_caps.hlg = 1;
|
||||
dc->caps.color.dpp.post_csc = 1;
|
||||
dc->caps.color.dpp.gamma_corr = 1;
|
||||
dc->caps.color.dpp.dgam_rom_for_yuv = 0;
|
||||
|
||||
dc->caps.color.dpp.hw_3d_lut = 1;
|
||||
dc->caps.color.dpp.ogam_ram = 1;
|
||||
|
||||
@@ -1327,6 +1327,7 @@ static bool dcn302_resource_construct(
|
||||
dc->caps.color.dpp.dgam_rom_caps.hlg = 1;
|
||||
dc->caps.color.dpp.post_csc = 1;
|
||||
dc->caps.color.dpp.gamma_corr = 1;
|
||||
dc->caps.color.dpp.dgam_rom_for_yuv = 0;
|
||||
|
||||
dc->caps.color.dpp.hw_3d_lut = 1;
|
||||
dc->caps.color.dpp.ogam_ram = 1;
|
||||
|
||||
Reference in New Issue
Block a user