Revert "i915: fix vbl swap for multi-master"

This reverts commit 2a78ad2264.
main
Dave Airlie 2008-05-08 17:12:16 +10:00
parent 2a78ad2264
commit 4466fea7ba
1 changed files with 15 additions and 22 deletions

View File

@ -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);