* [PATCH] drm/i915: intel_update_fbc() requires struct_mutex, so no longer atomic
@ 2012-04-17 14:08 Chris Wilson
2012-04-17 15:49 ` Jesse Barnes
0 siblings, 1 reply; 3+ messages in thread
From: Chris Wilson @ 2012-04-17 14:08 UTC (permalink / raw)
To: intel-gfx
As we need to manipulate our device structure and allocate queue a task,
it is no longer a simple atomic operation and cannot be performed along
the atomic modeset paths. Instead make sure that we disable FBC (which
must be therefore kept as a set of simple register writes) when
performing the atomic modeset and leave the heavy-weight
intel_update_fbc() for the normal modeset.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
---
drivers/gpu/drm/i915/intel_display.c | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 39c13e3..1a0483f 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -2330,15 +2330,11 @@ intel_pipe_set_base_atomic(struct drm_crtc *crtc, struct drm_framebuffer *fb,
{
struct drm_device *dev = crtc->dev;
struct drm_i915_private *dev_priv = dev->dev_private;
- int ret;
-
- ret = dev_priv->display.update_plane(crtc, fb, x, y);
- if (ret)
- return ret;
- intel_update_fbc(dev);
+ if (dev_priv->display.disable_fbc)
+ dev_priv->display.disable_fbc(dev);
- return 0;
+ return dev_priv->display.update_plane(crtc, fb, x, y);
}
static int
@@ -2373,6 +2369,7 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y,
struct drm_framebuffer *old_fb)
{
struct drm_device *dev = crtc->dev;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct drm_i915_master_private *master_priv;
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
int ret;
@@ -2409,8 +2406,7 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y,
if (old_fb)
intel_finish_fb(old_fb);
- ret = intel_pipe_set_base_atomic(crtc, crtc->fb, x, y,
- LEAVE_ATOMIC_MODE_SET);
+ ret = dev_priv->display.update_plane(crtc, crtc->fb, x, y);
if (ret) {
intel_unpin_fb_obj(to_intel_framebuffer(crtc->fb)->obj);
mutex_unlock(&dev->struct_mutex);
@@ -2423,6 +2419,7 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y,
intel_unpin_fb_obj(to_intel_framebuffer(old_fb)->obj);
}
+ intel_update_fbc(dev);
mutex_unlock(&dev->struct_mutex);
intel_increase_pllclock(crtc);
--
1.7.10
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] drm/i915: intel_update_fbc() requires struct_mutex, so no longer atomic
2012-04-17 14:08 [PATCH] drm/i915: intel_update_fbc() requires struct_mutex, so no longer atomic Chris Wilson
@ 2012-04-17 15:49 ` Jesse Barnes
2012-04-18 10:02 ` Daniel Vetter
0 siblings, 1 reply; 3+ messages in thread
From: Jesse Barnes @ 2012-04-17 15:49 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
On Tue, 17 Apr 2012 15:08:19 +0100
Chris Wilson <chris@chris-wilson.co.uk> wrote:
> As we need to manipulate our device structure and allocate queue a task,
> it is no longer a simple atomic operation and cannot be performed along
> the atomic modeset paths. Instead make sure that we disable FBC (which
> must be therefore kept as a set of simple register writes) when
> performing the atomic modeset and leave the heavy-weight
> intel_update_fbc() for the normal modeset.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
> ---
Looks good.
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/i915: intel_update_fbc() requires struct_mutex, so no longer atomic
2012-04-17 15:49 ` Jesse Barnes
@ 2012-04-18 10:02 ` Daniel Vetter
0 siblings, 0 replies; 3+ messages in thread
From: Daniel Vetter @ 2012-04-18 10:02 UTC (permalink / raw)
To: Jesse Barnes; +Cc: intel-gfx
On Tue, Apr 17, 2012 at 08:49:06AM -0700, Jesse Barnes wrote:
> On Tue, 17 Apr 2012 15:08:19 +0100
> Chris Wilson <chris@chris-wilson.co.uk> wrote:
>
> > As we need to manipulate our device structure and allocate queue a task,
> > it is no longer a simple atomic operation and cannot be performed along
> > the atomic modeset paths. Instead make sure that we disable FBC (which
> > must be therefore kept as a set of simple register writes) when
> > performing the atomic modeset and leave the heavy-weight
> > intel_update_fbc() for the normal modeset.
> >
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
> > ---
>
> Looks good.
>
> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Queued for -next, thanks for the patch.
-Daniel
--
Daniel Vetter
Mail: daniel@ffwll.ch
Mobile: +41 (0)79 365 57 48
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-04-18 10:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-17 14:08 [PATCH] drm/i915: intel_update_fbc() requires struct_mutex, so no longer atomic Chris Wilson
2012-04-17 15:49 ` Jesse Barnes
2012-04-18 10:02 ` Daniel Vetter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox