diff options
author | Francisco Jerez <currojerez@riseup.net> | 2010-10-10 04:39:27 +0200 |
---|---|---|
committer | Francisco Jerez <currojerez@riseup.net> | 2010-10-12 04:00:35 +0200 |
commit | 4f42708c26fa57bac7854701a6e757958c8d0654 (patch) | |
tree | 8d9a841c14c874f41519a99bcd2c6983d6ba09ee | |
parent | 8c8f15c9d3a31c35bf2ef20faf8c4133295a678f (diff) | |
download | xorg-driver-xf86-video-nouveau-4f42708c26fa57bac7854701a6e757958c8d0654.tar.gz |
Update to the last libdrm API.
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
-rw-r--r-- | src/drmmode_display.c | 10 | ||||
-rw-r--r-- | src/nouveau_exa.c | 11 | ||||
-rw-r--r-- | src/nouveau_wfb.c | 2 | ||||
-rw-r--r-- | src/nv_dma.c | 3 | ||||
-rw-r--r-- | src/nv_driver.c | 4 |
5 files changed, 20 insertions, 10 deletions
diff --git a/src/drmmode_display.c b/src/drmmode_display.c index aafe0f6..0f82543 100644 --- a/src/drmmode_display.c +++ b/src/drmmode_display.c @@ -420,13 +420,13 @@ drmmode_crtc_shadow_allocate(xf86CrtcPtr crtc, int width, int height) drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; drmmode_ptr drmmode = drmmode_crtc->drmmode; NVPtr pNv = NVPTR(crtc->scrn); - uint32_t tile_mode = 0, tile_flags = 0; + uint32_t tile_mode = 0, tile_flags = NOUVEAU_BO_TILE_SCANOUT; int ah = height, ret, pitch; void *virtual; if (pNv->Architecture >= NV_ARCH_50 && pNv->tiled_scanout) { tile_mode = 4; - tile_flags = (drmmode->cpp == 2) ? 0x7000 : 0x7a00; + tile_flags |= (drmmode->cpp == 2) ? 0x7000 : 0x7a00; ah = NOUVEAU_ALIGN(height, 1 << (tile_mode + 2)); pitch = NOUVEAU_ALIGN(width * drmmode->cpp, 64); } else { @@ -1015,9 +1015,9 @@ drmmode_xf86crtc_resize(ScrnInfoPtr scrn, int width, int height) drmmode_ptr drmmode = drmmode_crtc->drmmode; uint32_t pitch, old_width, old_height, old_pitch, old_fb_id; struct nouveau_bo *old_bo = NULL; - uint32_t tile_mode = 0, tile_flags = 0, ah = height; + uint32_t tile_mode = 0, tile_flags = NOUVEAU_BO_TILE_SCANOUT; PixmapPtr ppix; - int ret, i; + int ret, i, ah = height; ErrorF("resize called %d %d\n", width, height); @@ -1026,7 +1026,7 @@ drmmode_xf86crtc_resize(ScrnInfoPtr scrn, int width, int height) if (pNv->Architecture >= NV_ARCH_50 && pNv->tiled_scanout) { tile_mode = 4; - tile_flags = (scrn->bitsPerPixel == 16) ? 0x7000 : 0x7a00; + tile_flags |= (scrn->bitsPerPixel == 16) ? 0x7000 : 0x7a00; ah = NOUVEAU_ALIGN(height, 1 << (tile_mode + 2)); pitch = NOUVEAU_ALIGN(width * (scrn->bitsPerPixel >> 3), 64); } else { diff --git a/src/nouveau_exa.c b/src/nouveau_exa.c index 92dc946..f3a2abd 100644 --- a/src/nouveau_exa.c +++ b/src/nouveau_exa.c @@ -354,6 +354,14 @@ nouveau_exa_create_pixmap(ScreenPtr pScreen, int width, int height, int depth, *new_pitch = NOUVEAU_ALIGN(*new_pitch, pitch_align); tile_mode = *new_pitch; + + if (bitsPerPixel == 32) + tile_flags |= NOUVEAU_BO_TILE_32BPP; + else if (bitsPerPixel == 16) + tile_flags |= NOUVEAU_BO_TILE_16BPP; + + if (usage_hint & NOUVEAU_CREATE_PIXMAP_ZETA) + tile_flags |= NOUVEAU_BO_TILE_ZETA; } } } else { @@ -392,7 +400,8 @@ nv50_style_tiled_pixmap(PixmapPtr ppix) NVPtr pNv = NVPTR(pScrn); return pNv->Architecture == NV_ARCH_50 && - nouveau_pixmap_bo(ppix)->tile_flags; + (nouveau_pixmap_bo(ppix)->tile_flags & + NOUVEAU_BO_TILE_LAYOUT_MASK); } static Bool diff --git a/src/nouveau_wfb.c b/src/nouveau_wfb.c index 7575672..2425e31 100644 --- a/src/nouveau_wfb.c +++ b/src/nouveau_wfb.c @@ -171,7 +171,7 @@ nouveau_wfb_setup_wrap(ReadMemoryProcPtr *pRead, WriteMemoryProcPtr *pWrite, wfb->ppix = ppix; wfb->base = (unsigned long)ppix->devPrivate.ptr; wfb->end = wfb->base + bo->size; - if (!bo->tile_flags) { + if (!nv50_style_tiled_pixmap(ppix)) { wfb->pitch = 0; } else { wfb->pitch = ppix->devKind; diff --git a/src/nv_dma.c b/src/nv_dma.c index c3d7639..409f42c 100644 --- a/src/nv_dma.c +++ b/src/nv_dma.c @@ -72,7 +72,8 @@ NVInitDma(ScrnInfoPtr pScrn) NVPtr pNv = NVPTR(pScrn); int ret; - ret = nouveau_channel_alloc(pNv->dev, NvDmaFB, NvDmaTT, &pNv->chan); + ret = nouveau_channel_alloc(pNv->dev, NvDmaFB, NvDmaTT, 24*1024, + &pNv->chan); if (ret) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Error creating GPU channel: %d\n", ret); diff --git a/src/nv_driver.c b/src/nv_driver.c index b241ac7..094067d 100644 --- a/src/nv_driver.c +++ b/src/nv_driver.c @@ -856,13 +856,13 @@ NVMapMem(ScrnInfoPtr pScrn) { NVPtr pNv = NVPTR(pScrn); struct nouveau_device *dev = pNv->dev; - uint32_t tile_mode = 0, tile_flags = 0; + uint32_t tile_mode = 0, tile_flags = NOUVEAU_BO_TILE_SCANOUT; int ret, size; size = pScrn->displayWidth * (pScrn->bitsPerPixel >> 3); if (pNv->Architecture >= NV_ARCH_50 && pNv->tiled_scanout) { tile_mode = 4; - tile_flags = pScrn->bitsPerPixel == 16 ? 0x7000 : 0x7a00; + tile_flags |= pScrn->bitsPerPixel == 16 ? 0x7000 : 0x7a00; size *= NOUVEAU_ALIGN(pScrn->virtualY, (1 << (tile_mode + 2))); } else { size *= pScrn->virtualY; |