[Intel-gfx] [PATCH 06/23] drm: Adjust whitespace for legibility

Daniel Vetter daniel at ffwll.ch
Mon Mar 26 20:49:51 UTC 2018


On Thu, Mar 22, 2018 at 05:22:56PM +0200, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
> 
> Add a bit of whitespace here and there to make the code look a bit
> more structured.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>

Too lazy to grow a real opinion on whitespace :-)

Acked-by: Daniel Vetter <daniel.vetter at ffwll.ch>
> ---
>  drivers/gpu/drm/drm_crtc.c  | 4 +++-
>  drivers/gpu/drm/drm_plane.c | 6 +++++-
>  2 files changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
> index 8552ed419056..537ffaab855c 100644
> --- a/drivers/gpu/drm/drm_crtc.c
> +++ b/drivers/gpu/drm/drm_crtc.c
> @@ -434,13 +434,13 @@ int drm_mode_getcrtc(struct drm_device *dev,
>  		if (crtc->state->enable) {
>  			drm_mode_convert_to_umode(&crtc_resp->mode, &crtc->state->mode);
>  			crtc_resp->mode_valid = 1;
> -
>  		} else {
>  			crtc_resp->mode_valid = 0;
>  		}
>  	} else {
>  		crtc_resp->x = crtc->x;
>  		crtc_resp->y = crtc->y;
> +
>  		if (crtc->enabled) {
>  			drm_mode_convert_to_umode(&crtc_resp->mode, &crtc->mode);
>  			crtc_resp->mode_valid = 1;
> @@ -592,6 +592,7 @@ int drm_mode_setcrtc(struct drm_device *dev, void *data,
>  	ret = drm_modeset_lock_all_ctx(crtc->dev, &ctx);
>  	if (ret)
>  		goto out;
> +
>  	if (crtc_req->mode_valid) {
>  		/* If we have a mode we need a framebuffer. */
>  		/* If we pass -1, set the mode with the currently bound fb */
> @@ -601,6 +602,7 @@ int drm_mode_setcrtc(struct drm_device *dev, void *data,
>  				ret = -EINVAL;
>  				goto out;
>  			}
> +
>  			fb = plane->fb;
>  			/* Make refcounting symmetric with the lookup path. */
>  			drm_framebuffer_get(fb);
> diff --git a/drivers/gpu/drm/drm_plane.c b/drivers/gpu/drm/drm_plane.c
> index 38e2a628bfa2..bedceca7dd06 100644
> --- a/drivers/gpu/drm/drm_plane.c
> +++ b/drivers/gpu/drm/drm_plane.c
> @@ -785,6 +785,7 @@ static int drm_mode_cursor_universal(struct drm_crtc *crtc,
>  				DRM_DEBUG_KMS("failed to wrap cursor buffer in drm framebuffer\n");
>  				return PTR_ERR(fb);
>  			}
> +
>  			fb->hot_x = req->hot_x;
>  			fb->hot_y = req->hot_y;
>  		} else {
> @@ -1035,7 +1036,8 @@ int drm_mode_page_flip_ioctl(struct drm_device *dev,
>  						       state->src_h,
>  						       fb);
>  	} else {
> -		ret = drm_crtc_check_viewport(crtc, crtc->x, crtc->y, &crtc->mode, fb);
> +		ret = drm_crtc_check_viewport(crtc, crtc->x, crtc->y,
> +					      &crtc->mode, fb);
>  	}
>  	if (ret)
>  		goto out;
> @@ -1052,10 +1054,12 @@ int drm_mode_page_flip_ioctl(struct drm_device *dev,
>  			ret = -ENOMEM;
>  			goto out;
>  		}
> +
>  		e->event.base.type = DRM_EVENT_FLIP_COMPLETE;
>  		e->event.base.length = sizeof(e->event);
>  		e->event.vbl.user_data = page_flip->user_data;
>  		e->event.vbl.crtc_id = crtc->base.id;
> +
>  		ret = drm_event_reserve_init(dev, file_priv, &e->base, &e->event.base);
>  		if (ret) {
>  			kfree(e);
> -- 
> 2.16.1
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


More information about the Intel-gfx mailing list