diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-04-26 21:28:09 (GMT) |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-05-03 09:18:28 (GMT) |
commit | d05c617ea4643f19232a38a5190cfe95ee88f1dd (patch) | |
tree | 369c883256fb2b0f4efcb01251f6c15019aca1ac /drivers/gpu/drm/i915/i915_dma.c | |
parent | 9488867a67fda2310448e44a906f1a54faa72fb4 (diff) | |
download | linux-d05c617ea4643f19232a38a5190cfe95ee88f1dd.tar.xz |
drm/i915: extract dri1 breadcrumb update from irq handler
... and hide it in i915_dma.c.
This way all the legacy stuff dealing with READ_BREADCRUMB and
LP_RING and friends is in i915_dma.c.
v2: Rebase on top of Chris Wilson's rework irq handling code.
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_dma.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_dma.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c index 6f6c4bd..30cb446 100644 --- a/drivers/gpu/drm/i915/i915_dma.c +++ b/drivers/gpu/drm/i915/i915_dma.c @@ -47,6 +47,19 @@ #include <acpi/video.h> #include <asm/pat.h> +void i915_update_dri1_breadcrumb(struct drm_device *dev) +{ + drm_i915_private_t *dev_priv = dev->dev_private; + struct drm_i915_master_private *master_priv; + + if (dev->primary->master) { + master_priv = dev->primary->master->driver_priv; + if (master_priv->sarea_priv) + master_priv->sarea_priv->last_dispatch = + READ_BREADCRUMB(dev_priv); + } +} + static void i915_write_hws_pga(struct drm_device *dev) { drm_i915_private_t *dev_priv = dev->dev_private; |