]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/zte: Stop consulting plane->crtc
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 26 Mar 2018 12:14:42 +0000 (15:14 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 29 Mar 2018 16:14:21 +0000 (19:14 +0300)
We want to get rid of plane->crtc on atomic drivers. Stop looking at it.

v2: Use old_state->crtc (Maarten)
v3: s/fb/crtc/ in commit message to actually match the patch (Shawn)

Cc: Shawn Guo <shawnguo@kernel.org>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Acked-by: Shawn Guo <shawnguo@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20180326121442.32009-1-ville.syrjala@linux.intel.com
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
drivers/gpu/drm/zte/zx_plane.c
drivers/gpu/drm/zte/zx_vou.c
drivers/gpu/drm/zte/zx_vou.h

index 94545adac50d2d727cb19e8ade00b1b0b74e29d9..d1931f5ea0b2e401fcc621e6a22587f1a4c110f5 100644 (file)
@@ -268,7 +268,7 @@ static void zx_plane_atomic_disable(struct drm_plane *plane,
        struct zx_plane *zplane = to_zx_plane(plane);
        void __iomem *hbsc = zplane->hbsc;
 
-       zx_vou_layer_disable(plane);
+       zx_vou_layer_disable(plane, old_state);
 
        /* Disable HBSC block */
        zx_writel_mask(hbsc + HBSC_CTRL0, HBSC_CTRL_EN, 0);
index 7491813131f3515690ac79775e2cc027dd061b39..442311d31110161d14532983d0fa335ca51a2dac 100644 (file)
@@ -627,9 +627,10 @@ void zx_vou_layer_enable(struct drm_plane *plane)
        zx_writel_mask(vou->osd + OSD_CTRL0, bits->enable, bits->enable);
 }
 
-void zx_vou_layer_disable(struct drm_plane *plane)
+void zx_vou_layer_disable(struct drm_plane *plane,
+                         struct drm_plane_state *old_state)
 {
-       struct zx_crtc *zcrtc = to_zx_crtc(plane->crtc);
+       struct zx_crtc *zcrtc = to_zx_crtc(old_state->crtc);
        struct zx_vou_hw *vou = zcrtc->vou;
        struct zx_plane *zplane = to_zx_plane(plane);
        const struct vou_layer_bits *bits = zplane->bits;
index 97d72bfce982cdc4c0481fca4db87a8f050e1e3a..5b7f84fbb112a4d81c08c2be77bf7524d7faa54d 100644 (file)
@@ -62,6 +62,7 @@ void zx_vou_config_dividers(struct drm_crtc *crtc,
                            struct vou_div_config *configs, int num);
 
 void zx_vou_layer_enable(struct drm_plane *plane);
-void zx_vou_layer_disable(struct drm_plane *plane);
+void zx_vou_layer_disable(struct drm_plane *plane,
+                         struct drm_plane_state *old_state);
 
 #endif /* __ZX_VOU_H__ */