From: Ville Syrjälä Date: Fri, 25 May 2018 18:50:35 +0000 (+0300) Subject: drm/vmwgfx: Stop using plane->fb in vmw_kms_update_implicit_fb() X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=ec8a31a7d0eb9f2bc675bf4ad6bdcc9cc84e6221;p=openwrt%2Fstaging%2Fblogic.git drm/vmwgfx: Stop using plane->fb in vmw_kms_update_implicit_fb() The only caller of vmw_kms_update_implicit_fb() is the page_flip hook which itself gets called with the plane mutex already held. Hence we can look at plane->state safely. v2: Drop the bogus lockdep assert Cc: Deepak Rawat Cc: Thomas Hellstrom Cc: Sinclair Yeh Cc: VMware Graphics Cc: Daniel Vetter Signed-off-by: Ville Syrjälä Reviewed-by: Deepak Rawat Link: https://patchwork.freedesktop.org/patch/msgid/20180525185045.29689-4-ville.syrjala@linux.intel.com Reviewed-by: Sinclair Yeh --- diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c index 146ea18d765e..e6889682205f 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c @@ -2803,6 +2803,7 @@ void vmw_kms_update_implicit_fb(struct vmw_private *dev_priv, struct drm_crtc *crtc) { struct vmw_display_unit *du = vmw_crtc_to_du(crtc); + struct drm_plane *plane = crtc->primary; struct vmw_framebuffer *vfb; mutex_lock(&dev_priv->global_kms_state_mutex); @@ -2810,7 +2811,7 @@ void vmw_kms_update_implicit_fb(struct vmw_private *dev_priv, if (!du->is_implicit) goto out_unlock; - vfb = vmw_framebuffer_to_vfb(crtc->primary->fb); + vfb = vmw_framebuffer_to_vfb(plane->state->fb); WARN_ON_ONCE(dev_priv->num_implicit != 1 && dev_priv->implicit_fb != vfb);