ath79/mikrotik: use routerbootpart partitions
[oweals/openwrt.git] / target / linux / layerscape / patches-5.4 / 805-display-0027-drm-imx-hdp-force-a-mode-set-when-colorspace-is-chan.patch
1 From da02a33c186db04986166659caafb0c2da5bf7f0 Mon Sep 17 00:00:00 2001
2 From: Laurentiu Palcu <laurentiu.palcu@nxp.com>
3 Date: Fri, 15 Nov 2019 10:00:55 +0200
4 Subject: [PATCH] drm/imx/hdp: force a mode set when colorspace is changed
5
6 If the userspace changes the connector Colorspace property, we need to force a
7 modeset, so that the entire pipeline is properly configured.
8
9 Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
10 ---
11  drivers/gpu/drm/bridge/cadence/cdns-hdmi-core.c | 6 ++++--
12  1 file changed, 4 insertions(+), 2 deletions(-)
13
14 --- a/drivers/gpu/drm/bridge/cadence/cdns-hdmi-core.c
15 +++ b/drivers/gpu/drm/bridge/cadence/cdns-hdmi-core.c
16 @@ -314,14 +314,16 @@ static int cdns_hdmi_connector_atomic_ch
17         struct drm_crtc_state *new_crtc_state;
18  
19         if (!blob_equal(new_con_state->hdr_output_metadata,
20 -                       old_con_state->hdr_output_metadata)) {
21 +                       old_con_state->hdr_output_metadata) ||
22 +           new_con_state->colorspace != old_con_state->colorspace) {
23                 new_crtc_state = drm_atomic_get_crtc_state(state, crtc);
24                 if (IS_ERR(new_crtc_state))
25                         return PTR_ERR(new_crtc_state);
26  
27                 new_crtc_state->mode_changed =
28                         !new_con_state->hdr_output_metadata ||
29 -                       !old_con_state->hdr_output_metadata;
30 +                       !old_con_state->hdr_output_metadata ||
31 +                       new_con_state->colorspace != old_con_state->colorspace;
32         }
33  
34         return 0;