From: "Ville Syrjälä" <ville.syrjala@linux.intel.com> To: Keith Packard <keithp@keithp.com> Cc: intel-gfx@lists.freedesktop.org, Daniel Vetter <daniel.vetter@ffwll.ch>, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: Re: [Intel-gfx] [PATCH 2/2] drm/i915: Add async page flip support for SNB Date: Tue, 30 Jul 2013 19:28:44 +0300 [thread overview] Message-ID: <20130730162844.GT5004@intel.com> (raw) In-Reply-To: <1374790515-29657-3-git-send-email-keithp@keithp.com> On Thu, Jul 25, 2013 at 03:15:15PM -0700, Keith Packard wrote: > Just copies the IVB code > > Signed-off-by: Keith Packard <keithp@keithp.com> > --- > drivers/gpu/drm/i915/intel_display.c | 17 +++++++++++++---- > 1 file changed, 13 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c > index 166aa2c..4a118c3 100644 > --- a/drivers/gpu/drm/i915/intel_display.c > +++ b/drivers/gpu/drm/i915/intel_display.c > @@ -7465,20 +7465,29 @@ static int intel_gen6_queue_flip(struct drm_device *dev, > struct intel_crtc *intel_crtc = to_intel_crtc(crtc); > struct intel_ring_buffer *ring = &dev_priv->ring[RCS]; > uint32_t pf, pipesrc; > + uint32_t cmd; > + uint32_t base; > int ret; > > ret = intel_pin_and_fence_fb_obj(dev, obj, ring); > if (ret) > goto err; > > + cmd = MI_DISPLAY_FLIP | MI_DISPLAY_FLIP_PLANE(intel_crtc->plane); > + base = i915_gem_obj_ggtt_offset(obj) + intel_crtc->dspaddr_offset; > + > + if (flags & DRM_MODE_PAGE_FLIP_ASYNC) { > + cmd |= MI_DISPLAY_FLIP_ASYNC_INDICATOR; > + base |= MI_DISPLAY_FLIP_TYPE_ASYNC; > + } > + > ret = intel_ring_begin(ring, 4); > if (ret) > goto err_unpin; > > - intel_ring_emit(ring, MI_DISPLAY_FLIP | > - MI_DISPLAY_FLIP_PLANE(intel_crtc->plane)); > + intel_ring_emit(ring, cmd); > intel_ring_emit(ring, fb->pitches[0] | obj->tiling_mode); > - intel_ring_emit(ring, i915_gem_obj_ggtt_offset(obj) + intel_crtc->dspaddr_offset); > + intel_ring_emit(ring, base); > > /* Contrary to the suggestions in the documentation, > * "Enable Panel Fitter" does not seem to be required when page This PF flip stuff is a bit of a mystery. I'm not sure it exists on SNB anymore. Some of the docs say that it's MBZ for SNB/IVB. Gen4/5 docs say that DW3 must not be sent w/ async flips, and some SNB+ docs say that it must not be sent with either sync or async flips. Did you test this patch on actual hardware, and if so did it work as expected? :) I guess one would need to perform some empirical testing to figure out what DW3 actually does. > @@ -9731,7 +9740,7 @@ void intel_modeset_init(struct drm_device *dev) > dev->mode_config.max_height = 8192; > } > > - if (IS_GEN7(dev)) > + if (IS_GEN6(dev) || IS_GEN7(dev)) > dev->mode_config.async_page_flip = true; > > dev->mode_config.fb_base = dev_priv->gtt.mappable_base; > -- > 1.8.3.2 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/intel-gfx -- Ville Syrjälä Intel OTC
WARNING: multiple messages have this Message-ID (diff)
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com> To: Keith Packard <keithp@keithp.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>, intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: Re: [Intel-gfx] [PATCH 2/2] drm/i915: Add async page flip support for SNB Date: Tue, 30 Jul 2013 19:28:44 +0300 [thread overview] Message-ID: <20130730162844.GT5004@intel.com> (raw) In-Reply-To: <1374790515-29657-3-git-send-email-keithp@keithp.com> On Thu, Jul 25, 2013 at 03:15:15PM -0700, Keith Packard wrote: > Just copies the IVB code > > Signed-off-by: Keith Packard <keithp@keithp.com> > --- > drivers/gpu/drm/i915/intel_display.c | 17 +++++++++++++---- > 1 file changed, 13 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c > index 166aa2c..4a118c3 100644 > --- a/drivers/gpu/drm/i915/intel_display.c > +++ b/drivers/gpu/drm/i915/intel_display.c > @@ -7465,20 +7465,29 @@ static int intel_gen6_queue_flip(struct drm_device *dev, > struct intel_crtc *intel_crtc = to_intel_crtc(crtc); > struct intel_ring_buffer *ring = &dev_priv->ring[RCS]; > uint32_t pf, pipesrc; > + uint32_t cmd; > + uint32_t base; > int ret; > > ret = intel_pin_and_fence_fb_obj(dev, obj, ring); > if (ret) > goto err; > > + cmd = MI_DISPLAY_FLIP | MI_DISPLAY_FLIP_PLANE(intel_crtc->plane); > + base = i915_gem_obj_ggtt_offset(obj) + intel_crtc->dspaddr_offset; > + > + if (flags & DRM_MODE_PAGE_FLIP_ASYNC) { > + cmd |= MI_DISPLAY_FLIP_ASYNC_INDICATOR; > + base |= MI_DISPLAY_FLIP_TYPE_ASYNC; > + } > + > ret = intel_ring_begin(ring, 4); > if (ret) > goto err_unpin; > > - intel_ring_emit(ring, MI_DISPLAY_FLIP | > - MI_DISPLAY_FLIP_PLANE(intel_crtc->plane)); > + intel_ring_emit(ring, cmd); > intel_ring_emit(ring, fb->pitches[0] | obj->tiling_mode); > - intel_ring_emit(ring, i915_gem_obj_ggtt_offset(obj) + intel_crtc->dspaddr_offset); > + intel_ring_emit(ring, base); > > /* Contrary to the suggestions in the documentation, > * "Enable Panel Fitter" does not seem to be required when page This PF flip stuff is a bit of a mystery. I'm not sure it exists on SNB anymore. Some of the docs say that it's MBZ for SNB/IVB. Gen4/5 docs say that DW3 must not be sent w/ async flips, and some SNB+ docs say that it must not be sent with either sync or async flips. Did you test this patch on actual hardware, and if so did it work as expected? :) I guess one would need to perform some empirical testing to figure out what DW3 actually does. > @@ -9731,7 +9740,7 @@ void intel_modeset_init(struct drm_device *dev) > dev->mode_config.max_height = 8192; > } > > - if (IS_GEN7(dev)) > + if (IS_GEN6(dev) || IS_GEN7(dev)) > dev->mode_config.async_page_flip = true; > > dev->mode_config.fb_base = dev_priv->gtt.mappable_base; > -- > 1.8.3.2 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/intel-gfx -- Ville Syrjälä Intel OTC
next prev parent reply other threads:[~2013-07-30 16:28 UTC|newest] Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top 2013-07-23 1:49 drm: Asynchronouse page flipping interface and Intel implementation Keith Packard 2013-07-23 1:49 ` [PATCH 1/5] drm: Pass page flip ioctl flags to driver Keith Packard 2013-07-23 1:49 ` [PATCH 2/5] drm: Add DRM_MODE_PAGE_FLIP_ASYNC flag definition Keith Packard 2013-07-23 1:50 ` [PATCH 3/5] drm: Advertise async page flip ability through GETCAP ioctl Keith Packard 2013-07-23 1:50 ` [PATCH 4/5] drm/i915: Add async page flip support for IVB Keith Packard 2013-07-23 5:28 ` Daniel Vetter 2013-07-24 20:26 ` Keith Packard 2013-07-24 21:23 ` Daniel Vetter 2013-07-25 1:40 ` Keith Packard 2013-07-25 1:40 ` Keith Packard 2013-07-25 7:47 ` Daniel Vetter 2013-07-25 7:47 ` Daniel Vetter 2013-07-25 18:13 ` Keith Packard 2013-07-25 18:13 ` Keith Packard 2013-07-25 19:18 ` Daniel Vetter 2013-07-25 22:15 ` Keith Packard 2013-07-25 22:15 ` [PATCH 1/2] " Keith Packard 2013-07-30 16:42 ` Ville Syrjälä 2013-07-30 16:42 ` Ville Syrjälä 2013-07-25 22:15 ` [PATCH 2/2] drm/i915: Add async page flip support for SNB Keith Packard 2013-07-30 16:28 ` Ville Syrjälä [this message] 2013-07-30 16:28 ` [Intel-gfx] " Ville Syrjälä 2013-07-23 1:50 ` [PATCH 5/5] " Keith Packard 2013-07-23 20:15 ` drm: Asynchronouse page flipping interface and Intel implementation Daniel Vetter 2013-07-23 20:33 ` Keith Packard
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=20130730162844.GT5004@intel.com \ --to=ville.syrjala@linux.intel.com \ --cc=daniel.vetter@ffwll.ch \ --cc=dri-devel@lists.freedesktop.org \ --cc=intel-gfx@lists.freedesktop.org \ --cc=keithp@keithp.com \ --cc=linux-kernel@vger.kernel.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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.