diff options
author | Dave Airlie <airlied@redhat.com> | 2012-06-15 10:05:03 +0100 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2012-06-15 15:41:52 +0100 |
commit | 18d5ae3bd9075ac1a2ee21b071ac133e2e634b62 (patch) | |
tree | 82e60e279e52956df3c4d4f124c8d489d2ed106d /src/radeon_exa_shared.c | |
parent | 248e912c487636d7352cfad43c03fc9f19fc2215 (diff) |
radeon: drop all UMS/DRI1/XAA/overlay support.
This overhauls the radeon driver and removes all the old UMS-only code,
it drops all the UMS, DRI1, XAA, overlay Xv, video capture, tv tuners
There are probably a lot more cleanups that will fall out of this afterwards.
So far this is compile/build tested.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'src/radeon_exa_shared.c')
-rw-r--r-- | src/radeon_exa_shared.c | 92 |
1 files changed, 17 insertions, 75 deletions
diff --git a/src/radeon_exa_shared.c b/src/radeon_exa_shared.c index b83eb81c..a1a7cf96 100644 --- a/src/radeon_exa_shared.c +++ b/src/radeon_exa_shared.c @@ -35,9 +35,6 @@ #endif #include "radeon.h" -#ifdef XF86DRI -#include "radeon_drm.h" -#endif #include "radeon_macros.h" #include "radeon_probe.h" #include "radeon_version.h" @@ -128,76 +125,32 @@ Bool RADEONCheckBPP(int bpp) PixmapPtr RADEONSolidPixmap(ScreenPtr pScreen, uint32_t solid) { - ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); - RADEONInfoPtr info = RADEONPTR(pScrn); PixmapPtr pPix = pScreen->CreatePixmap(pScreen, 1, 1, 32, 0); - + struct radeon_bo *bo; exaMoveInPixmap(pPix); -#if defined(XF86DRM_MODE) - if (info->cs) { - struct radeon_bo *bo; - - bo = radeon_get_pixmap_bo(pPix); - - if (radeon_bo_map(bo, 1)) { - pScreen->DestroyPixmap(pPix); - return NULL; - } - - memcpy(bo->ptr, &solid, 4); - radeon_bo_unmap(bo); + bo = radeon_get_pixmap_bo(pPix); - return pPix; - } -#endif - - if (!exaDrawableIsOffscreen(&pPix->drawable)) { + if (radeon_bo_map(bo, 1)) { pScreen->DestroyPixmap(pPix); return NULL; } - /* XXX: Big hammer... */ - info->accel_state->exa->WaitMarker(pScreen, info->accel_state->exaSyncMarker); - memcpy(info->FB + exaGetPixmapOffset(pPix), &solid, 4); + memcpy(bo->ptr, &solid, 4); + radeon_bo_unmap(bo); return pPix; } -static Bool radeon_vb_get(ScrnInfoPtr pScrn) -{ - RADEONInfoPtr info = RADEONPTR(pScrn); - struct radeon_accel_state *accel_state = info->accel_state; - - accel_state->vbo.vb_mc_addr = info->gartLocation + info->dri->bufStart + - (accel_state->ib->idx*accel_state->ib->total)+ - (accel_state->ib->total / 2); - accel_state->vbo.vb_total = (accel_state->ib->total / 2); - accel_state->vbo.vb_ptr = (pointer)((char*)accel_state->ib->address + - (accel_state->ib->total / 2)); - accel_state->vbo.vb_offset = 0; - return TRUE; -} - int radeon_cp_start(ScrnInfoPtr pScrn) { RADEONInfoPtr info = RADEONPTR(pScrn); struct radeon_accel_state *accel_state = info->accel_state; -#if defined(XF86DRM_MODE) - if (info->cs) { - if (CS_FULL(info->cs)) { - radeon_cs_flush_indirect(pScrn); - } - accel_state->ib_reset_op = info->cs->cdw; - } else -#endif - { - accel_state->ib = RADEONCPGetBuffer(pScrn); - if (!radeon_vb_get(pScrn)) { - return -1; - } + if (CS_FULL(info->cs)) { + radeon_cs_flush_indirect(pScrn); } + accel_state->ib_reset_op = info->cs->cdw; accel_state->vbo.vb_start_op = accel_state->vbo.vb_offset; accel_state->cbuf.vb_start_op = accel_state->cbuf.vb_offset; return 0; @@ -210,30 +163,20 @@ void radeon_vb_no_space(ScrnInfoPtr pScrn, RADEONInfoPtr info = RADEONPTR(pScrn); struct radeon_accel_state *accel_state = info->accel_state; -#if defined(XF86DRM_MODE) - if (info->cs) { - if (vbo->vb_bo) { - if (vbo->vb_start_op != vbo->vb_offset) { - accel_state->finish_op(pScrn, vert_size); - accel_state->ib_reset_op = info->cs->cdw; - } - - /* release the current VBO */ - radeon_vbo_put(pScrn, vbo); + if (vbo->vb_bo) { + if (vbo->vb_start_op != vbo->vb_offset) { + accel_state->finish_op(pScrn, vert_size); + accel_state->ib_reset_op = info->cs->cdw; } - /* get a new one */ - radeon_vbo_get(pScrn, vbo); - return; - } -#endif - if (vbo->vb_start_op != -1) { - accel_state->finish_op(pScrn, vert_size); - radeon_cp_start(pScrn); + + /* release the current VBO */ + radeon_vbo_put(pScrn, vbo); } + /* get a new one */ + radeon_vbo_get(pScrn, vbo); return; } -#if defined(XF86DRM_MODE) void radeon_ib_discard(ScrnInfoPtr pScrn) { RADEONInfoPtr info = RADEONPTR(pScrn); @@ -277,4 +220,3 @@ void radeon_ib_discard(ScrnInfoPtr pScrn) } } -#endif |