rpms/xorg-x11-drv-ati/devel radeon-exa-fixes.patch, 1.1, 1.2 xorg-x11-drv-ati.spec, 1.118, 1.119 radeon-dont-flush-new-pixmaps.patch, 1.1, NONE

Dave Airlie airlied at fedoraproject.org
Mon Sep 29 06:46:07 UTC 2008


Author: airlied

Update of /cvs/pkgs/rpms/xorg-x11-drv-ati/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv15424

Modified Files:
	radeon-exa-fixes.patch xorg-x11-drv-ati.spec 
Removed Files:
	radeon-dont-flush-new-pixmaps.patch 
Log Message:
- fix textured video + merge otaylor fix into exa fixes patch


radeon-exa-fixes.patch:

Index: radeon-exa-fixes.patch
===================================================================
RCS file: /cvs/pkgs/rpms/xorg-x11-drv-ati/devel/radeon-exa-fixes.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- radeon-exa-fixes.patch	26 Sep 2008 01:41:42 -0000	1.1
+++ radeon-exa-fixes.patch	29 Sep 2008 06:45:37 -0000	1.2
@@ -1,11 +1,69 @@
-commit 05f489fc270f3af78189b6f5d1f0ed46a99dbf1b
-Author: Dave Airlie <airlied at redhat.com>
-Date:   Fri Sep 26 11:38:36 2008 +1000
-
-    radeon: fix the offset checks for command submission
-    
-    since we are relocating in the kernel we don't need these
-
+diff --git a/src/radeon.h b/src/radeon.h
+index 32bfa4e..aeea221 100644
+--- a/src/radeon.h
++++ b/src/radeon.h
+@@ -408,6 +408,11 @@ typedef struct _atomBiosHandle *atomBiosHandlePtr;
+ 
+ #define RADEON_POOL_GART 0
+ #define RADEON_POOL_VRAM 1
++
++struct radeon_exa_pixmap_priv {
++    dri_bo *bo;
++    int flags;
++};
+     
+ typedef struct {
+     uint32_t pci_device_id;
+diff --git a/src/radeon_bufmgr_gem.c b/src/radeon_bufmgr_gem.c
+index db28edc..d7b5644 100644
+--- a/src/radeon_bufmgr_gem.c
++++ b/src/radeon_bufmgr_gem.c
+@@ -528,3 +528,10 @@ void radeon_bufmgr_emit_reloc(dri_bo *buf, uint32_t *head, uint32_t *count_p, ui
+ 	radeon_bufmgr = (struct radeon_bufmgr *)(buf->bufmgr + 1);
+ 	radeon_bufmgr->emit_reloc(buf, head, count_p, read_domains, write_domain);
+ }
++
++int radeon_bufmgr_gem_in_vram(dri_bo *buf)
++{
++	dri_bo_gem *gem_bo = (dri_bo_gem *)buf;
++	
++	return gem_bo->in_vram;
++}
+diff --git a/src/radeon_bufmgr_gem.h b/src/radeon_bufmgr_gem.h
+index e2f1ca6..d67ddf6 100644
+--- a/src/radeon_bufmgr_gem.h
++++ b/src/radeon_bufmgr_gem.h
+@@ -11,4 +11,5 @@ void radeon_bufmgr_post_submit(dri_bufmgr *bufmgr);
+ void radeon_bufmgr_pin(dri_bo *buf);
+ void radeon_bufmgr_unpin(dri_bo *buf);
+ uint32_t radeon_bufmgr_get_handle(dri_bo *buf);
++int radeon_bufmgr_gem_in_vram(dir_bo *buf);
+ #endif
+diff --git a/src/radeon_exa.c b/src/radeon_exa.c
+index 555ae16..4d0a582 100644
+--- a/src/radeon_exa.c
++++ b/src/radeon_exa.c
+@@ -50,10 +50,6 @@
+ #define RADEON_PIXMAP_IS_FRONTBUFFER 1
+ 
+ /* quick hacks lolz */
+-struct radeon_exa_pixmap_priv {
+-    dri_bo *bo;
+-    int flags;
+-};
+ 
+ /***********************************************************************/
+ #define RINFO_FROM_SCREEN(pScr) ScrnInfoPtr pScrn =  xf86Screens[pScr->myNum]; \
+@@ -235,7 +231,8 @@ static Bool RADEONPrepareAccess(PixmapPtr pPix, int index)
+ 	if (driver_priv->bo) {
+ 	    int ret;
+ 
+-	    RADEONCPFlushIndirect(pScrn, 0);
++	    if (radeon_bufmgr_gem_in_vram (driver_priv->bo))
++		RADEONCPFlushIndirect(pScrn, 0);
+ 
+ 	    //radeon_bufmgr_gem_wait_rendering(driver_priv->bo);
+ 
 diff --git a/src/radeon_exa_render.c b/src/radeon_exa_render.c
 index 456cefe..8f98e92 100644
 --- a/src/radeon_exa_render.c
@@ -32,3 +90,218 @@
  	RADEON_FALLBACK(("Bad destination offset 0x%x\n", (int)dst_offset));
      if (((dst_pitch >> pixel_shift) & 0x7) != 0)
  	RADEON_FALLBACK(("Bad destination pitch 0x%x\n", (int)dst_pitch));
+diff --git a/src/radeon_textured_video.c b/src/radeon_textured_video.c
+index 9682ad8..f93cded 100644
+--- a/src/radeon_textured_video.c
++++ b/src/radeon_textured_video.c
+@@ -199,10 +199,13 @@ RADEONPutImageTextured(ScrnInfoPtr pScrn,
+ 
+     if (pPriv->video_memory == NULL) {
+ 	pPriv->video_offset = RADEONAllocateMemory(pScrn,
+-						       &pPriv->video_memory,
+-						       size * 2);
++						   &pPriv->video_memory,
++						   size * 2);
+ 	if (pPriv->video_offset == 0)
+ 	    return BadAlloc;
++
++	if (info->new_cs)
++	    pPriv->src_bo = pPriv->video_memory;
+     }
+ 
+     /* Bicubic filter loading */
+@@ -215,6 +218,9 @@ RADEONPutImageTextured(ScrnInfoPtr pScrn,
+ 	pPriv->bicubic_src_offset = pPriv->bicubic_offset + info->fbLocation + pScrn->fbOffset;
+ 	if (pPriv->bicubic_offset == 0)
+ 		pPriv->bicubic_enabled = FALSE;
++
++	if (info->new_cs)
++	    pPriv->bicubic_bo = pPriv->bicubic_memory;
+     }
+ 
+     if (pDraw->type == DRAWABLE_WINDOW)
+@@ -245,7 +251,14 @@ RADEONPutImageTextured(ScrnInfoPtr pScrn,
+     npixels = ((((x2 + 0xffff) >> 16) + 1) & ~1) - left;
+ 
+     pPriv->src_offset = pPriv->video_offset;
+-    if (info->drm_mm) {
++    if (info->new_cs) {
++	int ret;
++	ret = dri_bo_map(pPriv->src_bo, 1);
++	if (ret) 
++	    return BadAlloc;
++      
++	pPriv->src_addr = pPriv->src_bo->virtual;
++    } else if (info->drm_mm) {
+         pPriv->src_addr = (uint8_t *)(info->mm.front_buffer->map + pPriv->video_offset + (top * dstPitch));
+     } else {
+         pPriv->src_addr = (uint8_t *)(info->FB + pPriv->video_offset + (top * dstPitch));
+@@ -290,8 +303,24 @@ RADEONPutImageTextured(ScrnInfoPtr pScrn,
+     }
+ 
+     /* Upload bicubic filter tex */
+-    if (pPriv->bicubic_enabled)
+-	RADEONCopyData(pScrn, (uint8_t *)bicubic_tex_512, (uint8_t *)(info->FB + pPriv->bicubic_offset), 1024, 1024, 1, 512, 2);
++    if (pPriv->bicubic_enabled) {
++	uint8_t *bicubic_addr;
++	int ret;
++
++	if (info->new_cs) {
++	    ret = dri_bo_map(pPriv->bicubic_bo, 1);
++	    if (ret)
++		return BadAlloc;
++
++	    bicubic_addr = pPriv->bicubic_bo->virtual;
++	} else
++	    bicubic_addr = (uint8_t *)(info->FB + pPriv->bicubic_offset);
++	
++	RADEONCopyData(pScrn, (uint8_t *)bicubic_tex_512, bicubic_addr, 1024, 1024, 1, 512, 2);
++	
++	if (info->new_cs)
++	    dri_bo_unmap(pPriv->bicubic_bo);
++    }
+ 
+     /* update cliplist */
+     if (!REGION_EQUAL(pScrn->pScreen, &pPriv->clip, clipBoxes)) {
+@@ -308,6 +337,8 @@ RADEONPutImageTextured(ScrnInfoPtr pScrn,
+     pPriv->w = width;
+     pPriv->h = height;
+ 
++    if (info->new_cs)
++	dri_bo_unmap(pPriv->src_bo);
+ #ifdef XF86DRI
+     if (info->directRenderingEnabled || info->drm_mode_setting)
+ 	RADEONDisplayTexturedVideoCP(pScrn, pPriv);
+diff --git a/src/radeon_textured_videofuncs.c b/src/radeon_textured_videofuncs.c
+index 1e9f3b1..d3574f4 100644
+--- a/src/radeon_textured_videofuncs.c
++++ b/src/radeon_textured_videofuncs.c
+@@ -95,6 +95,8 @@ FUNC_NAME(RADEONDisplayTexturedVideo)(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv
+ {
+     RADEONInfoPtr info = RADEONPTR(pScrn);
+     PixmapPtr pPixmap = pPriv->pPixmap;
++    struct radeon_exa_pixmap_priv *driver_priv;
++    dri_bo *dst_bo;
+     uint32_t txformat;
+     uint32_t txfilter, txformat0, txformat1, txoffset, txpitch;
+     uint32_t dst_offset, dst_pitch, dst_format;
+@@ -110,7 +112,13 @@ FUNC_NAME(RADEONDisplayTexturedVideo)(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv
+ 
+ #ifdef USE_EXA
+     if (info->useEXA) {
+-	dst_offset = exaGetPixmapOffset(pPixmap);
++	if (info->new_cs) {
++	    driver_priv = exaGetPixmapDriverPrivate(pPixmap);
++	    if (driver_priv)
++		dst_bo = driver_priv->bo;
++	} else {
++	    dst_offset = exaGetPixmapOffset(pPixmap);
++	}
+ 	dst_pitch = exaGetPixmapPitch(pPixmap);
+     } else
+ #endif
+@@ -219,8 +227,8 @@ FUNC_NAME(RADEONDisplayTexturedVideo)(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv
+ 	OUT_VIDEO_REG(R300_TX_FORMAT2_0, txpitch);
+ 
+ 	if (info->new_cs) {
+-	    OUT_VIDEO_REG(R300_TX_OFFSET_0, txoffset);
+-	    OUT_RELOC(info->mm.front_buffer->kernel_bo_handle, RADEON_GEM_DOMAIN_VRAM | RADEON_GEM_DOMAIN_GTT, 0);
++	    OUT_VIDEO_REG(R300_TX_OFFSET_0, 0);
++	    OUT_RELOC(pPriv->src_bo, RADEON_GEM_DOMAIN_VRAM | RADEON_GEM_DOMAIN_GTT, 0);
+ 	} else {
+ 	    txoffset += info->fbLocation + pScrn->fbOffset;
+ 	    OUT_VIDEO_REG(R300_TX_OFFSET_0, txoffset);
+@@ -245,13 +253,20 @@ FUNC_NAME(RADEONDisplayTexturedVideo)(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv
+ 			    R300_TX_MAG_FILTER_NEAREST |
+ 			    (1 << R300_TX_ID_SHIFT));
+ 
+-		BEGIN_VIDEO(6);
++		qwords = info->new_cs ? 8 : 6;
++		BEGIN_VIDEO(qwords);
+ 		OUT_VIDEO_REG(R300_TX_FILTER0_1, txfilter);
+ 		OUT_VIDEO_REG(R300_TX_FILTER1_1, 0);
+ 		OUT_VIDEO_REG(R300_TX_FORMAT0_1, txformat0);
+ 		OUT_VIDEO_REG(R300_TX_FORMAT1_1, txformat1);
+ 		OUT_VIDEO_REG(R300_TX_FORMAT2_1, txpitch);
+-		OUT_VIDEO_REG(R300_TX_OFFSET_1, pPriv->bicubic_src_offset);
++
++		if (info->new_cs) {
++		    OUT_VIDEO_REG(R300_TX_OFFSET_1, 0);
++		    OUT_RELOC(pPriv->bicubic_bo, RADEON_GEM_DOMAIN_VRAM | RADEON_GEM_DOMAIN_GTT, 0);
++		} else {
++		    OUT_VIDEO_REG(R300_TX_OFFSET_1, pPriv->bicubic_src_offset);
++		}
+ 		FINISH_VIDEO();
+ 
+ 		/* Enable tex 1 */
+@@ -994,8 +1009,8 @@ FUNC_NAME(RADEONDisplayTexturedVideo)(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv
+ 	OUT_VIDEO_REG(R300_TX_ENABLE, txenable);
+ 
+ 	if (info->new_cs) {
+-	    OUT_VIDEO_REG(R300_RB3D_COLOROFFSET0, dst_offset);
+-	    OUT_RELOC(info->mm.front_buffer->kernel_bo_handle, 0, RADEON_GEM_DOMAIN_VRAM);
++	    OUT_VIDEO_REG(R300_RB3D_COLOROFFSET0, 0);
++	    OUT_RELOC(dst_bo, 0, RADEON_GEM_DOMAIN_VRAM);
+ 	} else {
+ 	    dst_offset += info->fbLocation + pScrn->fbOffset;
+ 	    OUT_VIDEO_REG(R300_RB3D_COLOROFFSET0, dst_offset);
+diff --git a/src/radeon_video.c b/src/radeon_video.c
+index a7ea788..d708bf8 100644
+--- a/src/radeon_video.c
++++ b/src/radeon_video.c
+@@ -2180,7 +2180,7 @@ RADEONCopyData(
+ 
+ #ifdef XF86DRI
+ 
+-    if ( info->directRenderingEnabled && info->DMAForXv )
++    if ( info->directRenderingEnabled && info->DMAForXv && !info->new_cs )
+     {
+ 	uint8_t *buf;
+ 	uint32_t bufPitch, dstPitchOff;
+@@ -2443,6 +2443,20 @@ RADEONAllocateMemory(
+     int offset = 0;
+ 
+     pScreen = screenInfo.screens[pScrn->scrnIndex];
++
++    if (info->new_cs) {
++	dri_bo *video_bo;
++
++	video_bo = dri_bo_alloc(info->bufmgr, "xv pixmap", size, 4096);
++
++	*mem_struct = video_bo;
++
++	if (!video_bo)
++	    return 0;
++	
++	return (uint32_t)-1;
++
++    }
+ #ifdef USE_EXA
+     if (info->useEXA) {
+ 	ExaOffscreenArea *area = *mem_struct;
+@@ -2516,6 +2530,11 @@ RADEONFreeMemory(
+ ){
+     RADEONInfoPtr info = RADEONPTR(pScrn);
+ 
++    if (info->new_cs) {
++	struct dri_bo *bo = mem_struct;
++	dri_bo_free(bo);
++	return;
++    }
+ #ifdef USE_EXA
+     if (info->useEXA) {
+ 	ExaOffscreenArea *area = mem_struct;
+diff --git a/src/radeon_video.h b/src/radeon_video.h
+index b9d900d..0687969 100644
+--- a/src/radeon_video.h
++++ b/src/radeon_video.h
+@@ -114,6 +114,9 @@ typedef struct {
+     int src_w, src_h, dst_w, dst_h;
+     int w, h;
+     int drw_x, drw_y;
++
++    dri_bo *src_bo;
++    dri_bo *bicubic_bo;
+ } RADEONPortPrivRec, *RADEONPortPrivPtr;
+ 
+ void RADEONInitI2C(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv);


Index: xorg-x11-drv-ati.spec
===================================================================
RCS file: /cvs/pkgs/rpms/xorg-x11-drv-ati/devel/xorg-x11-drv-ati.spec,v
retrieving revision 1.118
retrieving revision 1.119
diff -u -r1.118 -r1.119
--- xorg-x11-drv-ati.spec	26 Sep 2008 21:16:01 -0000	1.118
+++ xorg-x11-drv-ati.spec	29 Sep 2008 06:45:37 -0000	1.119
@@ -5,7 +5,7 @@
 Summary:   Xorg X11 ati video driver
 Name:      xorg-x11-drv-ati
 Version:   6.9.0
-Release:   18%{?dist}
+Release:   19%{?dist}
 URL:       http://www.x.org
 License:   MIT
 Group:     User Interface/X Hardware Support
@@ -20,7 +20,6 @@
 Patch4:     radeon-6.9.0-remove-limit-heuristics.patch
 Patch5:	    radeon-6.9.0-panel-size-sanity.patch
 Patch6:     copy-fb-contents.patch
-Patch7:     radeon-dont-flush-new-pixmaps.patch
 
 ExcludeArch: s390 s390x
 
@@ -45,7 +44,6 @@
 %patch4 -p1 -b .remove-limit-heuristics
 %patch5 -p1 -b .panel-size
 %patch6 -p1 -b .copy-fb-contents
-%patch7 -p1 -b .dont-flush
 
 %build
 autoreconf
@@ -77,6 +75,9 @@
 %{_mandir}/man4/radeon.4*
 
 %changelog
+* Mon Sep 29 2008 Dave Airlie <airlied at redhat.com> 6.9.0-19
+- fix textured video + merge otaylor fix into exa fixes patch
+
 * Sat Sep 27 2008 Dave Airlie <airlied at redhat.com> 6.9.0-18
 - fix fb contents patch
 - EXA speedup from otaylor.


--- radeon-dont-flush-new-pixmaps.patch DELETED ---




More information about the fedora-extras-commits mailing list