[PATCH] drm/amd/display: Enable ogam_ram for dcn32+dcn35+dcn351
Ethan Lee
flibitijibibo at gmail.com
Thu Apr 11 01:46:43 UTC 2024
On Wed, Apr 10, 2024 at 6:13 PM Joshua Ashton <joshua at froggi.es> wrote:
>
> The comment here states "no OGAM in DPP since DCN1", yet that is not
> true.
>
> Testing on an RX 7900XTX (dcn32), it actually does exist in hardware and
> works fine.
> My best guess is the comment is confused with OGAM ROM for DPP, rather
> than OGAM RAM.
>
> I did not test dcn35/351 as I do not have that hardware, but I assume
> the same follows there given the seemingly erroneous comment.
> Someone at AMD should check that before merging this commit.
>
> Signed-off-by: Joshua Ashton <joshua at froggi.es>
>
> Cc: Harry Wentland <harry.wentland at amd.com>
> Cc: Xaver Hugl <xaver.hugl at gmail.com>
> Cc: Melissa Wen <mwen at igalia.com>
> Cc: Ethan Lee <flibitijibibo at gmail.com>
> ---
> drivers/gpu/drm/amd/display/dc/resource/dcn32/dcn32_resource.c | 2 +-
> drivers/gpu/drm/amd/display/dc/resource/dcn35/dcn35_resource.c | 2 +-
> .../gpu/drm/amd/display/dc/resource/dcn351/dcn351_resource.c | 2 +-
> 3 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/resource/dcn32/dcn32_resource.c b/drivers/gpu/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
> index 9aa39bd25be9..94f5d2b5aadf 100644
> --- a/drivers/gpu/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
> +++ b/drivers/gpu/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
> @@ -2182,7 +2182,7 @@ static bool dcn32_resource_construct(
> dc->caps.color.dpp.dgam_rom_for_yuv = 0;
>
> dc->caps.color.dpp.hw_3d_lut = 1;
> - dc->caps.color.dpp.ogam_ram = 0; // no OGAM in DPP since DCN1
> + dc->caps.color.dpp.ogam_ram = 1;
> // no OGAM ROM on DCN2 and later ASICs
> dc->caps.color.dpp.ogam_rom_caps.srgb = 0;
> dc->caps.color.dpp.ogam_rom_caps.bt2020 = 0;
> diff --git a/drivers/gpu/drm/amd/display/dc/resource/dcn35/dcn35_resource.c b/drivers/gpu/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
> index 25ac450944e7..708d63cc3f7f 100644
> --- a/drivers/gpu/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
> +++ b/drivers/gpu/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
> @@ -1861,7 +1861,7 @@ static bool dcn35_resource_construct(
> dc->caps.color.dpp.dgam_rom_for_yuv = 0;
>
> dc->caps.color.dpp.hw_3d_lut = 1;
> - dc->caps.color.dpp.ogam_ram = 0; // no OGAM in DPP since DCN1
> + dc->caps.color.dpp.ogam_ram = 1;
> // no OGAM ROM on DCN301
> dc->caps.color.dpp.ogam_rom_caps.srgb = 0;
> dc->caps.color.dpp.ogam_rom_caps.bt2020 = 0;
> diff --git a/drivers/gpu/drm/amd/display/dc/resource/dcn351/dcn351_resource.c b/drivers/gpu/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
> index 8a57adb27264..053e8ec6d1ef 100644
> --- a/drivers/gpu/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
> +++ b/drivers/gpu/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
> @@ -1841,7 +1841,7 @@ static bool dcn351_resource_construct(
> dc->caps.color.dpp.dgam_rom_for_yuv = 0;
>
> dc->caps.color.dpp.hw_3d_lut = 1;
> - dc->caps.color.dpp.ogam_ram = 0; // no OGAM in DPP since DCN1
> + dc->caps.color.dpp.ogam_ram = 1;
> // no OGAM ROM on DCN301
> dc->caps.color.dpp.ogam_rom_caps.srgb = 0;
> dc->caps.color.dpp.ogam_rom_caps.bt2020 = 0;
> --
> 2.44.0
>
Tested dcn32 on a 7900XTX, applied against kernel 6.8.5, confirmed
working with gamescope compositor.
Tested-by: Ethan Lee <flibitijibibo at gmail.com>
-Ethan
More information about the amd-gfx
mailing list