Re: [PATCH v3 15/18] drm/vmwgfx: Update comments for sou plane update function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/11/2018 02:16 AM, Deepak Rawat wrote:
Update comments to sync with code.

Signed-off-by: Deepak Rawat <drawat@xxxxxxxxxx>
---
  drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c | 18 +++---------------
  1 file changed, 3 insertions(+), 15 deletions(-)

diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c b/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
index 1cef622a779e..14bcd4db4f9c 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
@@ -771,6 +771,7 @@ vmw_sou_primary_plane_atomic_update(struct drm_plane *plane,
  	struct vmw_fence_obj *fence = NULL;
  	int ret;
+ /* If somehow gets a device error maintain consistent atomic state */

Same here, "If we somehow get" or "In case of"

  	if (crtc && plane->state->fb) {
  		struct vmw_private *dev_priv = vmw_priv(crtc->dev);
  		struct vmw_framebuffer *vfb =
@@ -783,28 +784,15 @@ vmw_sou_primary_plane_atomic_update(struct drm_plane *plane,
  			ret = vmw_sou_plane_update_surface(dev_priv, plane,
  							   old_state, vfb,
  							   &fence);
-
-		/*
-		 * We cannot really fail this function, so if we do, then output
-		 * an error and maintain consistent atomic state.
-		 */
  		if (ret != 0)
  			DRM_ERROR("Failed to update screen.\n");
  	} else {
-		/*
-		 * When disabling a plane, CRTC and FB should always be NULL
-		 * together, otherwise it's an error.
-		 * Here primary plane is being disable so should really blank
-		 * the screen object display unit, if not already done.
-		 */
+		/* Do nothing when fb and crtc is NULL (blank crtc) */
  		return;
  	}
+ /* For error case vblank event is sent from vmw_du_crtc_atomic_flush */
  	event = crtc->state->event;
-	/*
-	 * In case of failure and other cases, vblank event will be sent in
-	 * vmw_du_crtc_atomic_flush.
-	 */
  	if (event && fence) {
  		struct drm_file *file_priv = event->base.file_priv;


_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux