summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-07-16 14:05:54 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2011-07-20 22:00:53 +0100
commit6dbbb74bde034f5f00aee0396ccd1e03a6625fbd (patch)
tree631ee291e370d5c7f9ae3478ab92ee423419d9ae
parent3e55f3e88b40471706d5cd45c4df4010f8675c75 (diff)
sna: Enable gen6 scan-line waiting
The code was ready and waiting, just forgot to turn it on. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/sna_display.c21
1 files changed, 16 insertions, 5 deletions
diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c
index b3b3185e..5abe5405 100644
--- a/src/sna/sna_display.c
+++ b/src/sna/sna_display.c
@@ -604,6 +604,11 @@ sna_crtc_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode,
__FUNCTION__, rotation, x, y,
mode->HDisplay, mode->VDisplay, mode->Clock));
+ DBG(("%s: current fb pixmap = %d, front is %lu\n",
+ __FUNCTION__,
+ sna_mode->fb_pixmap,
+ sna->front->drawable.serialNumber));
+
if (sna_mode->fb_pixmap != sna->front->drawable.serialNumber)
sna_mode_remove_fb(sna);
@@ -1597,6 +1602,9 @@ sna_crtc_resize(ScrnInfoPtr scrn, int width, int height)
if (scrn->virtualX == width && scrn->virtualY == height)
return TRUE;
+ assert(scrn->pScreen->GetScreenPixmap(scrn->pScreen) == sna->front);
+ assert(scrn->pScreen->GetWindowPixmap(scrn->pScreen->root) == sna->front);
+
kgem_submit(&sna->kgem);
old_fb_id = mode->fb_id;
@@ -1625,8 +1633,9 @@ sna_crtc_resize(ScrnInfoPtr scrn, int width, int height)
goto fail;
}
- DBG(("%s: handle %d attached to fb %d\n",
- __FUNCTION__, bo->handle, mode->fb_id));
+ DBG(("%s: handle %d, pixmap serial %lu attached to fb %d\n",
+ __FUNCTION__, bo->handle,
+ sna->front->drawable.serialNumber, mode->fb_id));
for (i = 0; i < xf86_config->num_crtc; i++) {
xf86CrtcPtr crtc = xf86_config->crtc[i];
@@ -1852,6 +1861,9 @@ sna_mode_remove_fb(struct sna *sna)
{
struct sna_mode *mode = &sna->mode;
+ DBG(("%s: deleting fb id %d for pixmap serial %d\n",
+ __FUNCTION__, mode->fb_id,mode->fb_pixmap));
+
if (mode->fb_id) {
drmModeRmFB(sna->kgem.fd, mode->fb_id);
mode->fb_id = 0;
@@ -2009,6 +2021,8 @@ static void sna_emit_wait_for_scanline_gen6(struct sna *sna,
uint32_t event;
uint32_t *b;
+ assert (y2 > 0);
+
/* We just wait until the trace passes the roi */
if (pipe == 0) {
pipe = GEN6_PIPEA_SLC;
@@ -2075,9 +2089,6 @@ sna_wait_for_scanline(struct sna *sna,
Bool full_height;
int y1, y2, pipe;
- if (sna->kgem.gen >= 60)
- return false;
-
if (!pixmap_is_scanout(pixmap))
return false;