diff mbox series

[v3,10/18] drm/vmwgfx: Updated comment for stdu plane update

Message ID 20181011001657.1715-10-drawat@vmware.com (mailing list archive)
State New, archived
Headers show
Series [v3,01/18] drm: Add a new plane property to send damage during plane update | expand

Commit Message

Deepak Singh Rawat Oct. 11, 2018, 12:16 a.m. UTC
Update the commet to sync with code.

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

Comments

Thomas Hellstrom Oct. 15, 2018, 1:09 p.m. UTC | #1
On 10/11/2018 02:16 AM, Deepak Rawat wrote:
> Update the commet to sync with code.
Minor typo above^

>
> Signed-off-by: Deepak Rawat <drawat@vmware.com>
> ---
>   drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c | 18 +++---------------
>   1 file changed, 3 insertions(+), 15 deletions(-)
>
> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c b/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c
> index 64d11af2b81b..1821c4be0ef4 100644
> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c
> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c
> @@ -1653,7 +1653,6 @@ static int vmw_stdu_plane_update_surface(struct vmw_private *dev_priv,
>   
>   /**
>    * vmw_stdu_primary_plane_atomic_update - formally switches STDU to new plane
> - *
>    * @plane: display plane
>    * @old_state: Only used to get crtc info
>    *
> @@ -1674,10 +1673,7 @@ vmw_stdu_primary_plane_atomic_update(struct drm_plane *plane,
>   	struct vmw_private *dev_priv;
>   	int ret;
>   
> -	/*
> -	 * We cannot really fail this function, so if we do, then output an
> -	 * error and maintain consistent atomic state.
> -	 */
> +	/* If somehow gets a device error, maintain consistent atomic state */

Perhaps: "If we somehow get", or "In case of"

>   	if (crtc && plane->state->fb) {
>   		struct vmw_framebuffer *vfb =
>   			vmw_framebuffer_to_vfb(plane->state->fb);
> @@ -1706,12 +1702,7 @@ vmw_stdu_primary_plane_atomic_update(struct drm_plane *plane,
>   		stdu = vmw_crtc_to_stdu(crtc);
>   		dev_priv = vmw_priv(crtc->dev);
>   
> -		/*
> -		 * When disabling a plane, CRTC and FB should always be NULL
> -		 * together, otherwise it's an error.
> -		 * Here primary plane is being disable so blank the screen
> -		 * target display unit, if not already done.
> -		 */
> +		/* Blank STDU when fb and crtc are NULL */
>   		if (!stdu->defined)
>   			return;
>   
> @@ -1726,11 +1717,8 @@ vmw_stdu_primary_plane_atomic_update(struct drm_plane *plane,
>   		return;
>   	}
>   
> +	/* In case of error vblank event is sent in 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;
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c b/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c
index 64d11af2b81b..1821c4be0ef4 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c
@@ -1653,7 +1653,6 @@  static int vmw_stdu_plane_update_surface(struct vmw_private *dev_priv,
 
 /**
  * vmw_stdu_primary_plane_atomic_update - formally switches STDU to new plane
- *
  * @plane: display plane
  * @old_state: Only used to get crtc info
  *
@@ -1674,10 +1673,7 @@  vmw_stdu_primary_plane_atomic_update(struct drm_plane *plane,
 	struct vmw_private *dev_priv;
 	int ret;
 
-	/*
-	 * We cannot really fail this function, so if we do, then output an
-	 * error and maintain consistent atomic state.
-	 */
+	/* If somehow gets a device error, maintain consistent atomic state */
 	if (crtc && plane->state->fb) {
 		struct vmw_framebuffer *vfb =
 			vmw_framebuffer_to_vfb(plane->state->fb);
@@ -1706,12 +1702,7 @@  vmw_stdu_primary_plane_atomic_update(struct drm_plane *plane,
 		stdu = vmw_crtc_to_stdu(crtc);
 		dev_priv = vmw_priv(crtc->dev);
 
-		/*
-		 * When disabling a plane, CRTC and FB should always be NULL
-		 * together, otherwise it's an error.
-		 * Here primary plane is being disable so blank the screen
-		 * target display unit, if not already done.
-		 */
+		/* Blank STDU when fb and crtc are NULL */
 		if (!stdu->defined)
 			return;
 
@@ -1726,11 +1717,8 @@  vmw_stdu_primary_plane_atomic_update(struct drm_plane *plane,
 		return;
 	}
 
+	/* In case of error vblank event is sent in 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;