From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 4/5] drm/i915: dspaddr_offset doesn't need to be more than local variable
Date: Mon, 9 Oct 2017 20:13:38 +0300 [thread overview]
Message-ID: <20171009171338.GI10981@intel.com> (raw)
In-Reply-To: <1505850249-23527-5-git-send-email-juhapekka.heikkila@gmail.com>
On Tue, Sep 19, 2017 at 10:44:08PM +0300, Juha-Pekka Heikkila wrote:
> Move u32 dspaddr_offset from struct intel_crtc member into local
> variable in i9xx_update_primary_plane()
I would reorder the series so that this is done before you eliminate the
SKL primary plane functions. Would make it more obvious that there are
no real differences between the SKL primary vs. sprite functions.
>
> Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
> ---
> drivers/gpu/drm/i915/intel_display.c | 12 ++++++------
> drivers/gpu/drm/i915/intel_drv.h | 5 -----
> 2 files changed, 6 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 48d5975..d214977 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -3298,7 +3298,6 @@ static void i9xx_update_primary_plane(struct intel_plane *primary,
> const struct intel_plane_state *plane_state)
> {
> struct drm_i915_private *dev_priv = to_i915(primary->base.dev);
> - struct intel_crtc *crtc = to_intel_crtc(crtc_state->base.crtc);
> const struct drm_framebuffer *fb = plane_state->base.fb;
> enum plane plane = primary->plane;
> u32 linear_offset;
> @@ -3308,13 +3307,14 @@ static void i9xx_update_primary_plane(struct intel_plane *primary,
> int y = plane_state->main.y;
> unsigned long irqflags;
> struct intel_fbc *fbc = &dev_priv->fbc;
> + u32 dspaddr_offset;
>
> linear_offset = intel_fb_xy_to_linear(x, y, plane_state, 0);
>
> if (INTEL_GEN(dev_priv) >= 4)
> - crtc->dspaddr_offset = plane_state->main.offset;
> + dspaddr_offset = plane_state->main.offset;
> else
> - crtc->dspaddr_offset = linear_offset;
> + dspaddr_offset = linear_offset;
>
> fbc->state_cache.plane.adjusted_x = x;
> fbc->state_cache.plane.adjusted_y = y;
> @@ -3343,18 +3343,18 @@ static void i9xx_update_primary_plane(struct intel_plane *primary,
> if (IS_HASWELL(dev_priv) || IS_BROADWELL(dev_priv)) {
> I915_WRITE_FW(DSPSURF(plane),
> intel_plane_ggtt_offset(plane_state) +
> - crtc->dspaddr_offset);
> + dspaddr_offset);
> I915_WRITE_FW(DSPOFFSET(plane), (y << 16) | x);
> } else if (INTEL_GEN(dev_priv) >= 4) {
> I915_WRITE_FW(DSPSURF(plane),
> intel_plane_ggtt_offset(plane_state) +
> - crtc->dspaddr_offset);
> + dspaddr_offset);
> I915_WRITE_FW(DSPTILEOFF(plane), (y << 16) | x);
> I915_WRITE_FW(DSPLINOFF(plane), linear_offset);
> } else {
> I915_WRITE_FW(DSPADDR(plane),
> intel_plane_ggtt_offset(plane_state) +
> - crtc->dspaddr_offset);
> + dspaddr_offset);
> }
> POSTING_READ_FW(reg);
>
> diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
> index 56fb493..a92c2e2 100644
> --- a/drivers/gpu/drm/i915/intel_drv.h
> +++ b/drivers/gpu/drm/i915/intel_drv.h
> @@ -803,11 +803,6 @@ struct intel_crtc {
> unsigned long long enabled_power_domains;
> struct intel_overlay *overlay;
>
> - /* Display surface base address adjustement for pageflips. Note that on
> - * gen4+ this only adjusts up to a tile, offsets within a tile are
> - * handled in the hw itself (with the TILEOFF register). */
> - u32 dspaddr_offset;
> -
> struct intel_crtc_state *config;
>
> /* global reset count when the last flip was submitted */
> --
> 2.7.4
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-10-09 17:13 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-19 19:44 [PATCH 0/5] drm/i915: Skylake plane update/disable unifications [v5] Juha-Pekka Heikkila
2017-09-19 19:44 ` [PATCH 1/5] drm/i915: move adjusted_x/y from crtc to cache Juha-Pekka Heikkila
2017-10-09 17:12 ` Ville Syrjälä
2017-09-19 19:44 ` [PATCH 2/5] drm/i915: Unify skylake plane update Juha-Pekka Heikkila
2017-09-19 19:44 ` [PATCH 3/5] drm/i915: Unify skylake plane disable Juha-Pekka Heikkila
2017-09-19 19:44 ` [PATCH 4/5] drm/i915: dspaddr_offset doesn't need to be more than local variable Juha-Pekka Heikkila
2017-10-09 17:13 ` Ville Syrjälä [this message]
2017-09-19 19:44 ` [PATCH 5/5] drm/i915: adjust get_crtc_fence_y_offset() to use base.y instead of crtc.y Juha-Pekka Heikkila
2017-10-09 17:14 ` Ville Syrjälä
2017-09-19 21:13 ` ✓ Fi.CI.BAT: success for drm/i915: Skylake plane update/disable unifications [v5] Patchwork
2017-09-20 1:00 ` ✓ Fi.CI.IGT: " Patchwork
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=20171009171338.GI10981@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=juhapekka.heikkila@gmail.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