Commit 44969a45 authored by Shashank Sharma's avatar Shashank Sharma Committed by Harish Krupo

compositor-drm: Reset HDR state

This patch handles a special situation, which is resetting
of HDR state. Consider this case, when HDR playback stops,
and now we are moving back to SDR desktop view. In this case,
we need to reset the HDR properties and color corrections
applied on the connector state.

This patch detects if this view is end of HDR sesstion, and
resets the connector state.
Signed-off-by: Shashank Sharma's avatarShashank Sharma <>
parent 9e9214b8
......@@ -4244,6 +4244,22 @@ drm_get_first_hdr_surface(struct weston_output *output_base)
return NULL;
static void
drm_head_reset_color_state(struct drm_backend *b,
struct weston_output *output_base)
struct weston_head *w_head = weston_output_get_first_head(output_base);
struct drm_head *head = to_drm_head(w_head);
struct drm_conn_color_state *cs;
if (!head)
cs = &head->color_state;
memset(cs, 0, sizeof(*cs));
cs->changed = 1;
static void
drm_assign_planes(struct weston_output *output_base, void *repaint_data)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment