From: "Jindal, Sonika" <sonika.jindal@intel.com>
To: ville.syrjala@linux.intel.com, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v2 6/9] drm/i915: Pass the primary plane position to .update_primary_plane()
Date: Fri, 20 Mar 2015 16:52:30 +0530 [thread overview]
Message-ID: <550C02F6.9010804@intel.com> (raw)
In-Reply-To: <1426775349-24863-1-git-send-email-ville.syrjala@linux.intel.com>
On 3/19/2015 7:59 PM, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> In preparation for changing the primary plane position pass the clipped
> position to .update_primary_plane().
>
> v2: Rebased
>
> Cc: Sonika Jindal <sonika.jindal@intel.com>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
> drivers/gpu/drm/i915/i915_drv.h | 1 +
> drivers/gpu/drm/i915/intel_display.c | 20 +++++++++++++++-----
> 2 files changed, 16 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index 054be42..c42e3c5 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -583,6 +583,7 @@ struct drm_i915_display_funcs {
> struct drm_framebuffer *fb,
> int x, int y,
> int src_w, int src_h,
> + int crtc_x, int crtc_y,
> int crtc_w, int crtc_h);
> void (*hpd_irq_setup)(struct drm_device *dev);
> /* clock updates for mode set */
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 2e9fdaa..362089f 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -2484,6 +2484,7 @@ static void i9xx_update_primary_plane(struct drm_crtc *crtc,
> struct drm_framebuffer *fb,
> int x, int y,
> int src_w, int src_h,
> + int crtc_x, int crtc_y,
> int crtc_w, int crtc_h)
> {
> struct drm_device *dev = crtc->dev;
> @@ -2523,13 +2524,14 @@ static void i9xx_update_primary_plane(struct drm_crtc *crtc,
> if (intel_crtc->pipe == PIPE_B)
> dspcntr |= DISPPLANE_SEL_PIPE_B;
> I915_WRITE(DSPSIZE(plane), ((crtc_h - 1) << 16) | (crtc_w - 1));
> - I915_WRITE(DSPPOS(plane), 0);
> + I915_WRITE(DSPPOS(plane), (crtc_y << 16) | crtc_x);
> } else if (IS_CHERRYVIEW(dev) && plane == PLANE_B) {
> I915_WRITE(PRIMSIZE(plane), ((crtc_h - 1) << 16) | (crtc_w - 1));
> - I915_WRITE(PRIMPOS(plane), 0);
> + I915_WRITE(PRIMPOS(plane), (crtc_y << 16) | crtc_x);
> I915_WRITE(PRIMCNSTALPHA(plane), 0);
> } else {
> - WARN_ONCE(crtc_w != intel_crtc->config->pipe_src_w ||
> + WARN_ONCE(crtc_x != 0 || crtc_y != 0 ||
> + crtc_w != intel_crtc->config->pipe_src_w ||
> crtc_h != intel_crtc->config->pipe_src_h,
> "primary plane size doesn't match pipe size\n");
> }
> @@ -2614,6 +2616,7 @@ static void ironlake_update_primary_plane(struct drm_crtc *crtc,
> struct drm_framebuffer *fb,
> int x, int y,
> int src_w, int src_h,
> + int crtc_x, int crtc_y,
> int crtc_w, int crtc_h)
> {
> struct drm_device *dev = crtc->dev;
> @@ -2649,7 +2652,8 @@ static void ironlake_update_primary_plane(struct drm_crtc *crtc,
> WARN_ONCE(src_w != crtc_w || src_h != crtc_h,
> "primary plane doesn't support scaling\n");
>
> - WARN_ONCE(crtc_w != intel_crtc->config->pipe_src_w ||
> + WARN_ONCE(crtc_x != 0 || crtc_y != 0 ||
> + crtc_w != intel_crtc->config->pipe_src_w ||
> crtc_h != intel_crtc->config->pipe_src_h,
> "primary plane size doesn't match pipe size\n");
>
> @@ -2759,6 +2763,7 @@ static void skylake_update_primary_plane(struct drm_crtc *crtc,
> struct drm_framebuffer *fb,
> int x, int y,
> int src_w, int src_h,
> + int crtc_x, int crtc_y,
> int crtc_w, int crtc_h)
> {
> struct drm_device *dev = crtc->dev;
> @@ -2839,7 +2844,7 @@ static void skylake_update_primary_plane(struct drm_crtc *crtc,
>
> I915_WRITE(PLANE_CTL(pipe, 0), plane_ctl);
>
> - I915_WRITE(PLANE_POS(pipe, 0), 0);
> + I915_WRITE(PLANE_POS(pipe, 0), (crtc_y << 16) | crtc_x);
> I915_WRITE(PLANE_OFFSET(pipe, 0), (y << 16) | x);
> I915_WRITE(PLANE_SIZE(pipe, 0), ((src_h - 1) << 16) | (src_w - 1));
> I915_WRITE(PLANE_STRIDE(pipe, 0), fb->pitches[0] / stride_div);
> @@ -2866,6 +2871,7 @@ intel_pipe_set_base_atomic(struct drm_crtc *crtc, struct drm_framebuffer *fb,
> /* FIXME: this will go badly if the fb isn't big enough */
> to_intel_crtc(crtc)->primary_enabled = true;
> dev_priv->display.update_primary_plane(crtc, fb, x, y,
> + 0, 0,
> intel_crtc->config->pipe_src_w,
> intel_crtc->config->pipe_src_h,
> intel_crtc->config->pipe_src_w,
> @@ -2907,6 +2913,8 @@ static void intel_update_primary_planes(struct drm_device *dev)
> state->src.y1 >> 16,
> drm_rect_width(&state->src) >> 16,
> drm_rect_height(&state->src) >> 16,
> + state->dst.x1,
> + state->dst.y1,
> drm_rect_width(&state->dst),
> drm_rect_height(&state->dst));
> }
> @@ -12096,6 +12104,8 @@ intel_commit_primary_plane(struct drm_plane *plane,
> state->src.y1 >> 16,
> drm_rect_width(&state->src) >> 16,
> drm_rect_height(&state->src) >> 16,
> + state->dst.x1,
> + state->dst.y1,
> drm_rect_width(&state->dst),
> drm_rect_height(&state->dst));
> }
>
Reviewed-by: Sonika Jindal <sonika.jindal@intel.com>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2015-03-20 11:22 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-10 11:15 [PATCH 0/9] drm/i915: Update derived plane state at crtc enable/disable ville.syrjala
2015-03-10 11:15 ` [PATCH 1/9] drm/i915: Remove debug prints from primary plane update funcs ville.syrjala
2015-03-10 15:55 ` Jesse Barnes
2015-03-10 11:15 ` [PATCH 2/9] drm/i915: Reduce clutter by using the local plane pointer ville.syrjala
2015-03-10 16:00 ` Jesse Barnes
2015-03-10 11:15 ` [PATCH 3/9] drm/i915: Use plane->state->fb instead of plane->fb in intel_plane_restore() ville.syrjala
2015-03-10 17:01 ` Matt Roper
2015-03-10 17:48 ` Ville Syrjälä
2015-03-11 9:41 ` Daniel Vetter
2015-03-11 10:04 ` Daniel Vetter
2015-03-10 11:15 ` [PATCH 4/9] drm/i915: Make derived plane state correct after crtc_enable ville.syrjala
2015-03-10 17:01 ` Matt Roper
2015-03-10 17:57 ` Ville Syrjälä
2015-03-11 9:52 ` Daniel Vetter
2015-03-11 10:03 ` Daniel Vetter
2015-03-11 10:05 ` Ville Syrjälä
2015-03-11 10:24 ` Daniel Vetter
2015-03-11 12:19 ` Ville Syrjälä
2015-03-11 16:23 ` Daniel Vetter
2015-03-11 16:40 ` Ville Syrjälä
2015-03-10 11:15 ` [PATCH 5/9] drm/i915: Pass primary plane size to .update_primary_plane() ville.syrjala
2015-03-10 17:10 ` Matt Roper
2015-03-10 17:59 ` Ville Syrjälä
2015-03-10 20:57 ` Matt Roper
2015-03-11 9:42 ` Ville Syrjälä
2015-03-11 9:57 ` Daniel Vetter
2015-03-11 5:09 ` sonika
2015-03-11 9:27 ` Ville Syrjälä
2015-03-11 9:26 ` sonika
2015-03-19 14:28 ` [PATCH v2 " ville.syrjala
2015-03-20 9:49 ` Jindal, Sonika
2015-03-20 10:04 ` Ville Syrjälä
2015-03-20 10:53 ` Jindal, Sonika
2015-03-20 14:26 ` Ville Syrjälä
2015-03-23 4:11 ` sonika
2015-03-10 11:15 ` [PATCH 6/9] drm/i915: Pass the primary plane position " ville.syrjala
2015-03-19 14:29 ` [PATCH v2 " ville.syrjala
2015-03-20 11:22 ` Jindal, Sonika [this message]
2015-03-10 11:15 ` [PATCH 7/9] drm/i915: Update watermarks after the derived plane state is uptodate ville.syrjala
2015-03-10 17:13 ` Matt Roper
2015-03-11 9:59 ` Daniel Vetter
2015-03-10 11:15 ` [PATCH 8/9] drm/i915: Use state->visible in wm calculation ville.syrjala
2015-03-10 17:19 ` Matt Roper
2015-03-10 18:01 ` Ville Syrjälä
2015-03-19 14:31 ` [PATCH v2 " ville.syrjala
2015-03-10 11:15 ` [PATCH 9/9] drm/i915: Don't re-enable an explicitly disabled primary plane due to sprite coverage changes ville.syrjala
2015-03-10 17:58 ` shuang.he
2015-03-11 10:00 ` Daniel Vetter
2015-03-11 10:09 ` Ville Syrjälä
2015-03-11 10:28 ` Daniel Vetter
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=550C02F6.9010804@intel.com \
--to=sonika.jindal@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=ville.syrjala@linux.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