drmmode: Reorder i830_set_pixmap_bo() so that the correct stride is used.

The pitch needs to be set on the pixmap prior to the private
intel_pixmap structure being created so that it can record the correct
value from the pixmap.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2010-05-11 15:50:23 +01:00
parent dfbaf9aab8
commit e1b7e8bf1d
1 changed files with 1 additions and 3 deletions

View File

@ -1290,10 +1290,8 @@ drmmode_xf86crtc_resize (ScrnInfoPtr scrn, int width, int height)
goto fail;
pixmap = screen->GetScreenPixmap(screen);
i830_set_pixmap_bo(pixmap, intel->front_buffer);
assert (i830_get_pixmap_intel(pixmap)->stride == pitch);
screen->ModifyPixmapHeader(pixmap, width, height, -1, -1, pitch, NULL);
i830_set_pixmap_bo(pixmap, intel->front_buffer);
for (i = 0; i < xf86_config->num_crtc; i++) {
xf86CrtcPtr crtc = xf86_config->crtc[i];