00e6bf34652288ff73869aa97ddb48f5daae5d48
[openwrt/staging/blogic.git] /
1 From 93d9ca68c731839126930c6e5a8254c8e1885641 Mon Sep 17 00:00:00 2001
2 From: Dom Cobley <popcornmix@gmail.com>
3 Date: Thu, 5 May 2022 18:50:04 +0100
4 Subject: [PATCH] drm/vc4_hdmi: Force a modeset when Broadcast RGB
5 setting changes
6
7 Without this the change is not visible until the next modeset
8
9 Signed-off-by: Dom Cobley <popcornmix@gmail.com>
10 ---
11 drivers/gpu/drm/vc4/vc4_hdmi.c | 3 +++
12 1 file changed, 3 insertions(+)
13
14 --- a/drivers/gpu/drm/vc4/vc4_hdmi.c
15 +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
16 @@ -334,14 +334,17 @@ static int vc4_hdmi_connector_atomic_che
17 {
18 struct drm_connector_state *old_state =
19 drm_atomic_get_old_connector_state(state, connector);
20 + struct vc4_hdmi_connector_state *old_vc4_state = conn_state_to_vc4_hdmi_conn_state(old_state);
21 struct drm_connector_state *new_state =
22 drm_atomic_get_new_connector_state(state, connector);
23 + struct vc4_hdmi_connector_state *new_vc4_state = conn_state_to_vc4_hdmi_conn_state(new_state);
24 struct drm_crtc *crtc = new_state->crtc;
25
26 if (!crtc)
27 return 0;
28
29 if (old_state->colorspace != new_state->colorspace ||
30 + old_vc4_state->broadcast_rgb != new_vc4_state->broadcast_rgb ||
31 !drm_connector_atomic_hdr_metadata_equal(old_state, new_state)) {
32 struct drm_crtc_state *crtc_state;
33