From: Daniel Vetter <daniel@ffwll.ch>
To: Damien Lespiau <damien.lespiau@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 2/4] drm/i915: Introduce a vfunc for platform-specfic MMIO flip code
Date: Mon, 27 Oct 2014 10:16:06 +0100 [thread overview]
Message-ID: <20141027091606.GM26941@phenom.ffwll.local> (raw)
In-Reply-To: <1414192274-15933-2-git-send-email-damien.lespiau@intel.com>
On Sat, Oct 25, 2014 at 12:11:12AM +0100, Damien Lespiau wrote:
> SKL will specialize it.
>
> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
So with atomic I'd expect that we'd have one giant mmio_flip driver
function and that just calls into the relevant platform/plane update
hooks. Gustavo&Ville are working on that monster.
Now this here seems to add another incarnation. Can't I have just one
please?
Thanks, Daniel
> ---
> drivers/gpu/drm/i915/i915_drv.h | 1 +
> drivers/gpu/drm/i915/intel_display.c | 17 +++++++++++++----
> 2 files changed, 14 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index 627b7e7..d979549 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -492,6 +492,7 @@ struct drm_i915_display_funcs {
> struct drm_i915_gem_object *obj,
> struct intel_engine_cs *ring,
> uint32_t flags);
> + void (*do_mmio_flip)(struct intel_crtc *crtc);
> void (*update_primary_plane)(struct drm_crtc *crtc,
> struct drm_framebuffer *fb,
> int x, int y);
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 5133ef9..07440ad 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -9552,7 +9552,7 @@ static bool use_mmio_flip(struct intel_engine_cs *ring,
> return ring != obj->ring;
> }
>
> -static void intel_do_mmio_flip(struct intel_crtc *intel_crtc)
> +static void ilk_do_mmio_flip(struct intel_crtc *intel_crtc)
> {
> struct drm_device *dev = intel_crtc->base.dev;
> struct drm_i915_private *dev_priv = dev->dev_private;
> @@ -9561,9 +9561,6 @@ static void intel_do_mmio_flip(struct intel_crtc *intel_crtc)
> struct drm_i915_gem_object *obj = intel_fb->obj;
> u32 dspcntr;
> u32 reg;
> -
> - intel_mark_page_flip_active(intel_crtc);
> -
> reg = DSPCNTR(intel_crtc->plane);
> dspcntr = I915_READ(reg);
>
> @@ -9579,6 +9576,15 @@ static void intel_do_mmio_flip(struct intel_crtc *intel_crtc)
> POSTING_READ(DSPSURF(intel_crtc->plane));
> }
>
> +static void intel_do_mmio_flip(struct intel_crtc *intel_crtc)
> +{
> + struct drm_device *dev = intel_crtc->base.dev;
> + struct drm_i915_private *dev_priv = dev->dev_private;
> +
> + intel_mark_page_flip_active(intel_crtc);
> + dev_priv->display.do_mmio_flip(intel_crtc);
> +}
> +
> static int intel_postpone_flip(struct drm_i915_gem_object *obj)
> {
> struct intel_engine_cs *ring;
> @@ -12694,6 +12700,9 @@ static void intel_init_display(struct drm_device *dev)
> break;
> }
>
> + if (INTEL_INFO(dev)->gen >= 5)
> + dev_priv->display.do_mmio_flip = ilk_do_mmio_flip;
> +
> intel_panel_init_backlight_funcs(dev);
>
> mutex_init(&dev_priv->pps_mutex);
> --
> 1.8.3.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2014-10-27 9:15 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-24 23:11 [PATCH 1/4] drm/i915: Remove unnecessary test on the gen in intel_do_mmio_flip() Damien Lespiau
2014-10-24 23:11 ` [PATCH 2/4] drm/i915: Introduce a vfunc for platform-specfic MMIO flip code Damien Lespiau
2014-10-27 9:16 ` Daniel Vetter [this message]
2014-10-27 11:08 ` Damien Lespiau
2014-10-27 14:25 ` Daniel Vetter
2014-10-27 14:38 ` Ander Conselvan de Oliveira
2014-10-27 14:47 ` Ville Syrjälä
2014-10-27 14:53 ` Damien Lespiau
2014-10-28 7:25 ` Daniel Vetter
2014-10-28 7:42 ` Damien Lespiau
2014-10-24 23:11 ` [PATCH 3/4] drm/i915: Add space between variable declarations and code Damien Lespiau
2014-10-25 9:03 ` Chris Wilson
2014-10-25 11:05 ` [PATCH 3/4 v2] " Damien Lespiau
2014-10-24 23:11 ` [PATCH 4/4] drm/i915/skl: Implement do_mmio_flip for SKL Damien Lespiau
2014-10-25 10:37 ` shuang.he
2014-10-25 9:01 ` [PATCH 1/4] drm/i915: Remove unnecessary test on the gen in intel_do_mmio_flip() Chris Wilson
2014-10-25 9:04 ` Chris Wilson
2014-10-25 9:05 ` Chris Wilson
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=20141027091606.GM26941@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=damien.lespiau@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
/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