From: Ander Conselvan de Oliveira <conselvan2@gmail.com>
To: Matt Roper <matthew.d.roper@intel.com>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 5/5] drm/i915: Drop unused position fields (v2)
Date: Tue, 23 Dec 2014 15:34:34 +0200 [thread overview]
Message-ID: <54996F6A.4090102@gmail.com> (raw)
In-Reply-To: <1418689401-22957-6-git-send-email-matthew.d.roper@intel.com>
On 12/16/2014 02:23 AM, Matt Roper wrote:
> The userspace-requested plane coordinates are now always available via
> plane->state.base (and the i915-adjusted values are stored in
> plane->state), so we no longer use the coordinate fields in intel_plane
> and can drop them.
>
> Also, note that the error case for pageflip calls update_plane() to
> program the values from plane->state; it's simpler to just call
> intel_plane_restore() which does the same thing.
>
> v2: Replace manual update_plane() with intel_plane_restore() in pageflip
> error handler.
>
> Reviewed-by(v1): Bob Paauwe <bob.j.paauwe@intel.com>
> Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Reviewed-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
> ---
> drivers/gpu/drm/i915/intel_display.c | 27 +--------------------------
> drivers/gpu/drm/i915/intel_drv.h | 4 ----
> drivers/gpu/drm/i915/intel_sprite.c | 19 ++++---------------
> 3 files changed, 5 insertions(+), 45 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 934e6a8..d664104 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -9616,7 +9616,6 @@ static int intel_crtc_page_flip(struct drm_crtc *crtc,
> struct drm_i915_gem_object *obj = intel_fb_obj(fb);
> struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
> struct drm_plane *primary = crtc->primary;
> - struct intel_plane *intel_plane = to_intel_plane(primary);
> enum pipe pipe = intel_crtc->pipe;
> struct intel_unpin_work *work;
> struct intel_engine_cs *ring;
> @@ -9775,15 +9774,7 @@ free_work:
>
> if (ret == -EIO) {
> out_hang:
> - ret = primary->funcs->update_plane(primary, crtc, fb,
> - intel_plane->crtc_x,
> - intel_plane->crtc_y,
> - intel_plane->crtc_h,
> - intel_plane->crtc_w,
> - intel_plane->src_x,
> - intel_plane->src_y,
> - intel_plane->src_h,
> - intel_plane->src_w);
> + ret = intel_plane_restore(primary);
> if (ret == 0 && event) {
> spin_lock_irq(&dev->event_lock);
> drm_send_vblank_event(dev, pipe, event);
> @@ -11827,14 +11818,6 @@ intel_commit_primary_plane(struct drm_plane *plane,
> crtc->x = src->x1 >> 16;
> crtc->y = src->y1 >> 16;
>
> - intel_plane->crtc_x = state->base.crtc_x;
> - intel_plane->crtc_y = state->base.crtc_y;
> - intel_plane->crtc_w = state->base.crtc_w;
> - intel_plane->crtc_h = state->base.crtc_h;
> - intel_plane->src_x = state->base.src_x;
> - intel_plane->src_y = state->base.src_y;
> - intel_plane->src_w = state->base.src_w;
> - intel_plane->src_h = state->base.src_h;
> intel_plane->obj = obj;
>
> if (intel_crtc->active) {
> @@ -12099,14 +12082,6 @@ intel_commit_cursor_plane(struct drm_plane *plane,
> crtc->cursor_x = state->base.crtc_x;
> crtc->cursor_y = state->base.crtc_y;
>
> - intel_plane->crtc_x = state->base.crtc_x;
> - intel_plane->crtc_y = state->base.crtc_y;
> - intel_plane->crtc_w = state->base.crtc_w;
> - intel_plane->crtc_h = state->base.crtc_h;
> - intel_plane->src_x = state->base.src_x;
> - intel_plane->src_y = state->base.src_y;
> - intel_plane->src_w = state->base.src_w;
> - intel_plane->src_h = state->base.src_h;
> intel_plane->obj = obj;
>
> if (intel_crtc->cursor_bo == obj)
> diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
> index ab23190..dbf04dc 100644
> --- a/drivers/gpu/drm/i915/intel_drv.h
> +++ b/drivers/gpu/drm/i915/intel_drv.h
> @@ -517,10 +517,6 @@ struct intel_plane {
> struct drm_i915_gem_object *obj;
> bool can_scale;
> int max_downscale;
> - int crtc_x, crtc_y;
> - unsigned int crtc_w, crtc_h;
> - uint32_t src_x, src_y;
> - uint32_t src_w, src_h;
> unsigned int rotation;
>
> /* Since we need to change the watermarks before/after
> diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c
> index f8efcfd..d874ce0 100644
> --- a/drivers/gpu/drm/i915/intel_sprite.c
> +++ b/drivers/gpu/drm/i915/intel_sprite.c
> @@ -1257,15 +1257,6 @@ intel_commit_sprite_plane(struct drm_plane *plane,
> unsigned int crtc_w, crtc_h;
> uint32_t src_x, src_y, src_w, src_h;
>
> - intel_plane->crtc_x = state->base.crtc_x;
> - intel_plane->crtc_y = state->base.crtc_y;
> - intel_plane->crtc_w = state->base.crtc_w;
> - intel_plane->crtc_h = state->base.crtc_h;
> - intel_plane->src_x = state->base.src_x;
> - intel_plane->src_y = state->base.src_y;
> - intel_plane->src_w = state->base.src_w;
> - intel_plane->src_h = state->base.src_h;
> -
> crtc = crtc ? crtc : plane->crtc;
> intel_crtc = to_intel_crtc(crtc);
>
> @@ -1380,16 +1371,14 @@ int intel_plane_set_property(struct drm_plane *plane,
>
> int intel_plane_restore(struct drm_plane *plane)
> {
> - struct intel_plane *intel_plane = to_intel_plane(plane);
> -
> if (!plane->crtc || !plane->fb)
> return 0;
>
> return plane->funcs->update_plane(plane, plane->crtc, plane->fb,
> - intel_plane->crtc_x, intel_plane->crtc_y,
> - intel_plane->crtc_w, intel_plane->crtc_h,
> - intel_plane->src_x, intel_plane->src_y,
> - intel_plane->src_w, intel_plane->src_h);
> + plane->state->crtc_x, plane->state->crtc_y,
> + plane->state->crtc_w, plane->state->crtc_h,
> + plane->state->src_x, plane->state->src_y,
> + plane->state->src_w, plane->state->src_h);
> }
>
> static const struct drm_plane_funcs intel_sprite_plane_funcs = {
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2014-12-23 13:34 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-16 0:23 [PATCH 0/5] i915 atomic plane helper conversion (v4) Matt Roper
2014-12-16 0:23 ` [PATCH 1/5] drm/i915: Refactor work that can sleep out of commit (v5) Matt Roper
2014-12-22 14:12 ` Ander Conselvan de Oliveira
2014-12-16 0:23 ` [PATCH 2/5] drm/i915: Move vblank evasion to commit (v3) Matt Roper
2014-12-23 10:01 ` Ander Conselvan de Oliveira
2014-12-16 0:23 ` [PATCH 3/5] drm/i915: Clarify sprite plane function names (v3) Matt Roper
2014-12-23 10:08 ` Ander Conselvan de Oliveira
2015-01-05 9:54 ` Daniel Vetter
2014-12-16 0:23 ` [PATCH 4/5] drm/i915: Move to atomic plane helpers (v8) Matt Roper
2014-12-23 13:27 ` Ander Conselvan de Oliveira
2014-12-16 0:23 ` [PATCH 5/5] drm/i915: Drop unused position fields (v2) Matt Roper
2014-12-16 5:31 ` shuang.he
2014-12-23 13:34 ` Ander Conselvan de Oliveira [this message]
-- strict thread matches above, loose matches on Subject: below --
2014-12-23 18:41 [PATCH 0/5] i915 atomic plane helper conversion (v5) Matt Roper
2014-12-23 18:41 ` [PATCH 5/5] drm/i915: Drop unused position fields (v2) Matt Roper
2014-12-23 22:59 ` shuang.he
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54996F6A.4090102@gmail.com \
--to=conselvan2@gmail.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=matthew.d.roper@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox