wsi/display: Allow atomic modeset for change of Colorspace or HDR poperties

At least some drivers need a full modeset to change the Colorspace
property or to en-/disable HDR mode. E.g., at least amdgpu-kms as
tested under Linux 6.8 on Polaris needs it. Otherwise the atomic
commit for disabling HDR in _wsi_display_cleanup_state() will fail,
and the connector stays stuck in HDR mode after vkDestroySwapchainKHR().

Fixes: 1ed78dd7ec ("wsi/display: Clean up DRM hdr/color state on swapchain destruction")
Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Reviewed-by: Autumn Ashton <misyl@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37880>
This commit is contained in:
Mario Kleiner 2025-10-15 07:25:18 +01:00 committed by Marge Bot
parent 19b2e3b81b
commit ba82d36dce

View file

@ -2733,6 +2733,11 @@ drm_atomic_commit(wsi_display_connector *connector, struct wsi_display_image *im
connector->colorspace_enum[drm_colorspace]);
}
/* At least some drivers need a modeset for HDR or Colorspace change, e.g., amdgpu
* at least for Colorspace change or HDR en-/disable.
*/
flags |= DRM_MODE_ATOMIC_ALLOW_MODESET;
connector->color_outcome_serial = image->chain->color_outcome_serial;
}