diff options
author | Dave Airlie <airlied@linux.ie> | 2008-05-08 17:12:16 +1000 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2008-05-08 17:12:16 +1000 |
commit | 4466fea7bab2af5c1e25947af474d0ae69df1ffd (patch) | |
tree | b2cdc7eba8f80346a9d52589b0b0b208c75ca59b /shared-core | |
parent | 2a78ad22647933aa8842d534bce6495ff93fbf76 (diff) |
Revert "i915: fix vbl swap for multi-master"
This reverts commit 2a78ad22647933aa8842d534bce6495ff93fbf76.
Diffstat (limited to 'shared-core')
-rw-r--r-- | shared-core/i915_irq.c | 37 |
1 files changed, 15 insertions, 22 deletions
diff --git a/shared-core/i915_irq.c b/shared-core/i915_irq.c index ea2c88a1..0ee0c444 100644 --- a/shared-core/i915_irq.c +++ b/shared-core/i915_irq.c @@ -198,6 +198,9 @@ static void i915_vblank_tasklet(struct drm_device *dev) if ((counter[pipe] - vbl_swap->sequence) > (1<<23)) continue; + master_priv = vbl_swap->minor->master->driver_priv; + sarea_priv = master_priv->sarea_priv; + list_del(list); dev_priv->swaps_pending--; drm_vblank_put(dev, pipe); @@ -246,6 +249,16 @@ static void i915_vblank_tasklet(struct drm_device *dev) i915_kernel_lost_context(dev); + upper[0] = upper[1] = 0; + slice[0] = max(sarea_priv->planeA_h / nhits, 1); + slice[1] = max(sarea_priv->planeB_h / nhits, 1); + lower[0] = sarea_priv->planeA_y + slice[0]; + lower[1] = sarea_priv->planeB_y + slice[0]; + + offsets[0] = sarea_priv->front_offset; + offsets[1] = sarea_priv->back_offset; + offsets[2] = sarea_priv->third_offset; + num_pages = sarea_priv->third_handle ? 3 : 2; DRM_SPINLOCK(&dev->drw_lock); @@ -259,6 +272,8 @@ static void i915_vblank_tasklet(struct drm_device *dev) upper[1] = lower[1], lower[1] += slice[1]) { int init_drawrect = 1; + if (i == nhits) + lower[0] = lower[1] = sarea_priv->height; list_for_each(hit, &hits) { struct drm_i915_vbl_swap *swap_hit = @@ -267,24 +282,6 @@ static void i915_vblank_tasklet(struct drm_device *dev) int num_rects, plane, front, back; unsigned short top, bottom; - sarea_priv = master_priv->sarea_priv; - - upper[0] = upper[1] = 0; - slice[0] = max(sarea_priv->planeA_h / nhits, 1); - slice[1] = max(sarea_priv->planeB_h / nhits, 1); - lower[0] = sarea_priv->planeA_y + slice[0]; - lower[1] = sarea_priv->planeB_y + slice[0]; - - offsets[0] = sarea_priv->front_offset; - offsets[1] = sarea_priv->back_offset; - offsets[2] = sarea_priv->third_offset; - num_pages = sarea_priv->third_handle ? 3 : 2; - if (i == nhits) - lower[0] = lower[1] = sarea_priv->height; - - pitchropcpp = (sarea_priv->pitch * cpp) | (0xcc << 16) | - (cpp << 23) | (1 << 24); - drw = drm_get_drawable_info(dev, swap_hit->drw_id); if (!drw) @@ -297,8 +294,6 @@ static void i915_vblank_tasklet(struct drm_device *dev) continue; } - master_priv = swap_hit->minor->master->driver_priv; - if (init_drawrect) { int width = sarea_priv->width; int height = sarea_priv->height; @@ -337,8 +332,6 @@ static void i915_vblank_tasklet(struct drm_device *dev) (2 * plane)) & 0x3; back = (front + 1) % num_pages; - - for (num_rects = drw->num_rects; num_rects--; rect++) { int y1 = max(rect->y1, top); int y2 = min(rect->y2, bottom); |