diff options
author | Dave Airlie <airlied@redhat.com> | 2009-06-30 16:55:26 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2009-07-02 14:43:01 +1000 |
commit | 1782ce28953184776c90eb1255208a3e0ad245f0 (patch) | |
tree | df4bdd3c4e1ff58a4890d29e3998506745954419 /src/radeon_exa.c | |
parent | ac4bd24a66c1bdda0293f770a3f891e2b88cc8ee (diff) |
radeon: add KMS support (still disabled)
This adds DRI2 + KMS + driver pixmaps support to the driver.
I've decided to just do a completely separate KMS driver file
instead of hacking the crap out of radeon_driver.c. So now
I do the KMS check in radeon_probe.c time and set the DDX
pointed up to a completely different set at this stage.
This avoids a lot of if (kms) type crap in the code at
the expense of making sure we make changes to both files
if necessary.
This code is still disabled in configure.ac as I broke EXA composite
rendering somehow in KMS mode
Diffstat (limited to 'src/radeon_exa.c')
-rw-r--r-- | src/radeon_exa.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/radeon_exa.c b/src/radeon_exa.c index 5b20ecab..9444da38 100644 --- a/src/radeon_exa.c +++ b/src/radeon_exa.c @@ -344,7 +344,7 @@ static Bool RADEONPrepareAccess_CS(PixmapPtr pPix, int index) /* if we have more refs than just the BO then flush */ if (driver_priv->bo->cref > 1) - RADEONCPFlushIndirect(pScrn, 0); + radeon_cs_flush_indirect(pScrn); radeon_bo_wait(driver_priv->bo); @@ -387,7 +387,7 @@ void *RADEONEXACreatePixmap(ScreenPtr pScreen, int size, int align) return new_priv; new_priv->bo = radeon_bo_open(info->bufmgr, 0, size, - align, 0, 0); + align, 0, 0); if (!new_priv->bo) { xfree(new_priv); ErrorF("Failed to alloc memory\n"); @@ -404,6 +404,9 @@ static void RADEONEXADestroyPixmap(ScreenPtr pScreen, void *driverPriv) RADEONInfoPtr info = RADEONPTR(pScrn); struct radeon_exa_pixmap_priv *driver_priv = driverPriv; + if (!driverPriv) + return; + radeon_bo_unref(driver_priv->bo); xfree(driverPriv); } |