On Tue, 16 Sept 2025 at 22:09, <[email protected]> wrote:
>
> From: Alvin Lee <[email protected]>
>
> [Description]
> Modifications in per asic capability means mpc.preblend flag should be used
> to indicate preblend. Update relevant paths to use this flag.
>
> Reviewed-by: Dillon Varone <[email protected]>
> Signed-off-by: Alvin Lee <[email protected]>
> Signed-off-by: Ivan Lipski <[email protected]>
> ---
> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c | 2 +-
> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c
> b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c
> index c7387af725d6..b0ef157f1333 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c
> @@ -821,7 +821,7 @@ int amdgpu_dm_verify_lut3d_size(struct amdgpu_device
> *adev,
> struct dm_plane_state *dm_plane_state =
> to_dm_plane_state(plane_state);
> const struct drm_color_lut *shaper = NULL, *lut3d = NULL;
> uint32_t exp_size, size, dim_size = MAX_COLOR_3DLUT_SIZE;
> - bool has_3dlut = adev->dm.dc->caps.color.dpp.hw_3d_lut;
> + bool has_3dlut = adev->dm.dc->caps.color.dpp.hw_3d_lut ||
> adev->dm.dc->caps.color.mpc.preblend;
>
> /* shaper LUT is only available if 3D LUT color caps */
> exp_size = has_3dlut ? MAX_COLOR_LUT_ENTRIES : 0;
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c
> b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c
> index b7c6e8d13435..96914f372d53 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c
> @@ -1633,7 +1633,7 @@ dm_atomic_plane_attach_color_mgmt_properties(struct
> amdgpu_display_manager *dm,
> drm_object_attach_property(&plane->base,
>
> dm->adev->mode_info.plane_ctm_property, 0);
>
> - if (dpp_color_caps.hw_3d_lut) {
> + if (dpp_color_caps.hw_3d_lut || dm->dc->caps.color.mpc.preblend) {
Hi,
this line here enables shaper_lut, shaper_tf, and lut3d. Does preblend
imply all three features?
Users with a RX7800XT and with a RX 9070 XT report that their hardware
incorrectly advertises these features, breaking non-compositing
rendering in gamescope [1][2; was necroed and bumped].
Reverting this commit, fixes the issue for those devices as it forces
compositing. It was also not an issue for devices connected to an HDR
display, as without dpp_color_caps.ogam_ram those GPUs are forced to
composite for the sRGB to PQ transition.
However, for the HX370, reverting this commit forces compositing even
though it supports these three features.
I recall this was a potential fix for 39923050615c ("drm/amd/display:
Clear DPP 3DLUT Cap").
Reverting both commits fixes the regression while the HX370 still does
direct scannout. Perhaps amdgpu_dm_verify_lut3d_size should be used to
check if the flags under color management should be shown?
Antheas
[1] https://github.com/ublue-os/bazzite/issues/3488
[2] https://github.com/ublue-os/bazzite/issues/1538
> drm_object_attach_property(&plane->base,
>
> mode_info.plane_shaper_lut_property, 0);
> drm_object_attach_property(&plane->base,
> --
> 2.43.0
>