Commit 302d19ac authored by Maarten Lankhorst's avatar Maarten Lankhorst Committed by Daniel Vetter

drm/i915: clean up plane commit functions

No point in hiding behind big ifs. This will be true most of the time.
Signed-off-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: default avatarMatt Roper <matthew.d.roper@intel.com>
Tested-by(IVB): Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent da20eabd
...@@ -13769,14 +13769,14 @@ intel_commit_primary_plane(struct drm_plane *plane, ...@@ -13769,14 +13769,14 @@ intel_commit_primary_plane(struct drm_plane *plane,
crtc->x = src->x1 >> 16; crtc->x = src->x1 >> 16;
crtc->y = src->y1 >> 16; crtc->y = src->y1 >> 16;
if (intel_crtc->active) { if (!intel_crtc->active)
if (state->visible) return;
/* FIXME: kill this fastboot hack */
intel_update_pipe_size(intel_crtc);
dev_priv->display.update_primary_plane(crtc, plane->fb, if (state->visible)
crtc->x, crtc->y); /* FIXME: kill this fastboot hack */
} intel_update_pipe_size(intel_crtc);
dev_priv->display.update_primary_plane(crtc, fb, crtc->x, crtc->y);
} }
static void static void
...@@ -14078,8 +14078,8 @@ intel_commit_cursor_plane(struct drm_plane *plane, ...@@ -14078,8 +14078,8 @@ intel_commit_cursor_plane(struct drm_plane *plane,
intel_crtc->cursor_addr = addr; intel_crtc->cursor_addr = addr;
intel_crtc->cursor_bo = obj; intel_crtc->cursor_bo = obj;
update:
update:
if (intel_crtc->active) if (intel_crtc->active)
intel_crtc_update_cursor(crtc, state->visible); intel_crtc_update_cursor(crtc, state->visible);
} }
......
...@@ -930,31 +930,26 @@ intel_commit_sprite_plane(struct drm_plane *plane, ...@@ -930,31 +930,26 @@ intel_commit_sprite_plane(struct drm_plane *plane,
struct intel_crtc *intel_crtc; struct intel_crtc *intel_crtc;
struct intel_plane *intel_plane = to_intel_plane(plane); struct intel_plane *intel_plane = to_intel_plane(plane);
struct drm_framebuffer *fb = state->base.fb; struct drm_framebuffer *fb = state->base.fb;
int crtc_x, crtc_y;
unsigned int crtc_w, crtc_h;
uint32_t src_x, src_y, src_w, src_h;
crtc = crtc ? crtc : plane->crtc; crtc = crtc ? crtc : plane->crtc;
intel_crtc = to_intel_crtc(crtc); intel_crtc = to_intel_crtc(crtc);
plane->fb = fb; plane->fb = fb;
if (intel_crtc->active) { if (!intel_crtc->active)
if (state->visible) { return;
crtc_x = state->dst.x1;
crtc_y = state->dst.y1; if (state->visible) {
crtc_w = drm_rect_width(&state->dst); intel_plane->update_plane(plane, crtc, fb,
crtc_h = drm_rect_height(&state->dst); state->dst.x1, state->dst.y1,
src_x = state->src.x1 >> 16; drm_rect_width(&state->dst),
src_y = state->src.y1 >> 16; drm_rect_height(&state->dst),
src_w = drm_rect_width(&state->src) >> 16; state->src.x1 >> 16,
src_h = drm_rect_height(&state->src) >> 16; state->src.y1 >> 16,
intel_plane->update_plane(plane, crtc, fb, drm_rect_width(&state->src) >> 16,
crtc_x, crtc_y, crtc_w, crtc_h, drm_rect_height(&state->src) >> 16);
src_x, src_y, src_w, src_h); } else {
} else { intel_plane->disable_plane(plane, crtc, false);
intel_plane->disable_plane(plane, crtc, false);
}
} }
} }
......
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