Commit bf2d5eb9 authored by Ville Syrjälä's avatar Ville Syrjälä

drm: Adjust whitespace for legibility

Add a bit of whitespace here and there to make the code look a bit
more structured.
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180322152313.6561-7-ville.syrjala@linux.intel.comAcked-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
parent 64c32b49
...@@ -434,13 +434,13 @@ int drm_mode_getcrtc(struct drm_device *dev, ...@@ -434,13 +434,13 @@ int drm_mode_getcrtc(struct drm_device *dev,
if (crtc->state->enable) { if (crtc->state->enable) {
drm_mode_convert_to_umode(&crtc_resp->mode, &crtc->state->mode); drm_mode_convert_to_umode(&crtc_resp->mode, &crtc->state->mode);
crtc_resp->mode_valid = 1; crtc_resp->mode_valid = 1;
} else { } else {
crtc_resp->mode_valid = 0; crtc_resp->mode_valid = 0;
} }
} else { } else {
crtc_resp->x = crtc->x; crtc_resp->x = crtc->x;
crtc_resp->y = crtc->y; crtc_resp->y = crtc->y;
if (crtc->enabled) { if (crtc->enabled) {
drm_mode_convert_to_umode(&crtc_resp->mode, &crtc->mode); drm_mode_convert_to_umode(&crtc_resp->mode, &crtc->mode);
crtc_resp->mode_valid = 1; crtc_resp->mode_valid = 1;
...@@ -592,6 +592,7 @@ int drm_mode_setcrtc(struct drm_device *dev, void *data, ...@@ -592,6 +592,7 @@ int drm_mode_setcrtc(struct drm_device *dev, void *data,
ret = drm_modeset_lock_all_ctx(crtc->dev, &ctx); ret = drm_modeset_lock_all_ctx(crtc->dev, &ctx);
if (ret) if (ret)
goto out; goto out;
if (crtc_req->mode_valid) { if (crtc_req->mode_valid) {
/* If we have a mode we need a framebuffer. */ /* If we have a mode we need a framebuffer. */
/* If we pass -1, set the mode with the currently bound fb */ /* 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, ...@@ -601,6 +602,7 @@ int drm_mode_setcrtc(struct drm_device *dev, void *data,
ret = -EINVAL; ret = -EINVAL;
goto out; goto out;
} }
fb = plane->fb; fb = plane->fb;
/* Make refcounting symmetric with the lookup path. */ /* Make refcounting symmetric with the lookup path. */
drm_framebuffer_get(fb); drm_framebuffer_get(fb);
......
...@@ -785,6 +785,7 @@ static int drm_mode_cursor_universal(struct drm_crtc *crtc, ...@@ -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"); DRM_DEBUG_KMS("failed to wrap cursor buffer in drm framebuffer\n");
return PTR_ERR(fb); return PTR_ERR(fb);
} }
fb->hot_x = req->hot_x; fb->hot_x = req->hot_x;
fb->hot_y = req->hot_y; fb->hot_y = req->hot_y;
} else { } else {
...@@ -1035,7 +1036,8 @@ int drm_mode_page_flip_ioctl(struct drm_device *dev, ...@@ -1035,7 +1036,8 @@ int drm_mode_page_flip_ioctl(struct drm_device *dev,
state->src_h, state->src_h,
fb); fb);
} else { } 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) if (ret)
goto out; goto out;
...@@ -1052,10 +1054,12 @@ int drm_mode_page_flip_ioctl(struct drm_device *dev, ...@@ -1052,10 +1054,12 @@ int drm_mode_page_flip_ioctl(struct drm_device *dev,
ret = -ENOMEM; ret = -ENOMEM;
goto out; goto out;
} }
e->event.base.type = DRM_EVENT_FLIP_COMPLETE; e->event.base.type = DRM_EVENT_FLIP_COMPLETE;
e->event.base.length = sizeof(e->event); e->event.base.length = sizeof(e->event);
e->event.vbl.user_data = page_flip->user_data; e->event.vbl.user_data = page_flip->user_data;
e->event.vbl.crtc_id = crtc->base.id; e->event.vbl.crtc_id = crtc->base.id;
ret = drm_event_reserve_init(dev, file_priv, &e->base, &e->event.base); ret = drm_event_reserve_init(dev, file_priv, &e->base, &e->event.base);
if (ret) { if (ret) {
kfree(e); kfree(e);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment