Skip to content

Commit 31da2df

Browse files
deepak-rawatthomashvmw
authored andcommitted
drm/vmwgfx: Update comments for sou plane update function
Update comments to sync with code. Signed-off-by: Deepak Rawat <drawat@vmware.com> Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
1 parent 67a51b3 commit 31da2df

File tree

1 file changed

+3
-15
lines changed

1 file changed

+3
-15
lines changed

drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -770,6 +770,7 @@ vmw_sou_primary_plane_atomic_update(struct drm_plane *plane,
770770
struct vmw_fence_obj *fence = NULL;
771771
int ret;
772772

773+
/* In case of device error, maintain consistent atomic state */
773774
if (crtc && plane->state->fb) {
774775
struct vmw_private *dev_priv = vmw_priv(crtc->dev);
775776
struct vmw_framebuffer *vfb =
@@ -782,28 +783,15 @@ vmw_sou_primary_plane_atomic_update(struct drm_plane *plane,
782783
ret = vmw_sou_plane_update_surface(dev_priv, plane,
783784
old_state, vfb,
784785
&fence);
785-
786-
/*
787-
* We cannot really fail this function, so if we do, then output
788-
* an error and maintain consistent atomic state.
789-
*/
790786
if (ret != 0)
791787
DRM_ERROR("Failed to update screen.\n");
792788
} else {
793-
/*
794-
* When disabling a plane, CRTC and FB should always be NULL
795-
* together, otherwise it's an error.
796-
* Here primary plane is being disable so should really blank
797-
* the screen object display unit, if not already done.
798-
*/
789+
/* Do nothing when fb and crtc is NULL (blank crtc) */
799790
return;
800791
}
801792

793+
/* For error case vblank event is send from vmw_du_crtc_atomic_flush */
802794
event = crtc->state->event;
803-
/*
804-
* In case of failure and other cases, vblank event will be sent in
805-
* vmw_du_crtc_atomic_flush.
806-
*/
807795
if (event && fence) {
808796
struct drm_file *file_priv = event->base.file_priv;
809797

0 commit comments

Comments
 (0)