]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/vmwgfx: Stop using plane->fb in atomic_enable()
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 25 May 2018 18:50:37 +0000 (21:50 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 11 Jun 2018 17:22:44 +0000 (20:22 +0300)
Instead of looking at the (soon to be deprecated) plane->fb we'll
examing plane->state->fb instead. We can do this because
vmw_du_crtc_atomic_check() prevents us from enabling a crtc
without the primary plane also being enabled.

Due to that same reason, I'm actually not sure what the checks here are
for NULL fb. If we can't enable the crtc without an enabled plane
we should always have an fb. But I'll leave that for someone else
to figure out.

Cc: Deepak Rawat <drawat@vmware.com>
Cc: Thomas Hellstrom <thellstrom@vmware.com>
Cc: Sinclair Yeh <syeh@vmware.com>
Cc: VMware Graphics <linux-graphics-maintainer@vmware.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Deepak Rawat <drawat@vmware.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180525185045.29689-6-ville.syrjala@linux.intel.com
Reviewed-by: Sinclair Yeh <syeh@vmware.com>
drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c

index 90445bc590cba03e7dba48aadd6270b48a9687d4..152e96cb1c01ade533ec7a0f1a83039a0b2c05b6 100644 (file)
@@ -414,6 +414,7 @@ static void vmw_stdu_crtc_helper_prepare(struct drm_crtc *crtc)
 static void vmw_stdu_crtc_atomic_enable(struct drm_crtc *crtc,
                                        struct drm_crtc_state *old_state)
 {
+       struct drm_plane_state *plane_state = crtc->primary->state;
        struct vmw_private *dev_priv;
        struct vmw_screen_target_display_unit *stdu;
        struct vmw_framebuffer *vfb;
@@ -422,7 +423,7 @@ static void vmw_stdu_crtc_atomic_enable(struct drm_crtc *crtc,
 
        stdu     = vmw_crtc_to_stdu(crtc);
        dev_priv = vmw_priv(crtc->dev);
-       fb       = crtc->primary->fb;
+       fb       = plane_state->fb;
 
        vfb = (fb) ? vmw_framebuffer_to_vfb(fb) : NULL;