aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_crtc.c
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2018-03-22 17:22:56 +0200
committerVille Syrjälä <ville.syrjala@linux.intel.com>2018-03-29 19:14:21 +0300
commitbf2d5eb902e29d6e7c25540b85242744591b703e (patch)
tree25b623f55975811384b3a3fded153b137cb3feb7 /drivers/gpu/drm/drm_crtc.c
parentdrm: Add local 'plane' variable for primary/cursor planes (diff)
downloadlinux-dev-bf2d5eb902e29d6e7c25540b85242744591b703e.tar.xz
linux-dev-bf2d5eb902e29d6e7c25540b85242744591b703e.zip
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: 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>
Diffstat (limited to 'drivers/gpu/drm/drm_crtc.c')
-rw-r--r--drivers/gpu/drm/drm_crtc.c4
1 files changed, 3 insertions, 1 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 @@ 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);