]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm: Adjust whitespace for legibility
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 22 Mar 2018 15:22:56 +0000 (17:22 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 29 Mar 2018 16:14:21 +0000 (19:14 +0300)
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@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180322152313.6561-7-ville.syrjala@linux.intel.com
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
drivers/gpu/drm/drm_crtc.c
drivers/gpu/drm/drm_plane.c

index 8552ed4190569a76a89ba765d3cbf3b621a5685b..537ffaab855c5f9e0f55c82e89d5ec28adf306f7 100644 (file)
@@ -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 @@ retry:
        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 @@ retry:
                                ret = -EINVAL;
                                goto out;
                        }
+
                        fb = plane->fb;
                        /* Make refcounting symmetric with the lookup path. */
                        drm_framebuffer_get(fb);
index 38e2a628bfa22edeac73e47978fbe567e4a89142..bedceca7dd06cc4a82d8f3f93adacd10bda04dd4 100644 (file)
@@ -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 @@ retry:
                                                       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 @@ retry:
                        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);