summaryrefslogtreecommitdiff
path: root/x11
diff options
context:
space:
mode:
authorwiz <wiz@pkgsrc.org>2014-10-26 10:20:42 +0000
committerwiz <wiz@pkgsrc.org>2014-10-26 10:20:42 +0000
commit44c19c28a64937b4807959a9f2fcc9a7f30a6257 (patch)
treea97dfe04710413dfc5071309cf066c9ac536f847 /x11
parente8e6e999620806a855f285b83f2f39cccd9df75c (diff)
downloadpkgsrc-44c19c28a64937b4807959a9f2fcc9a7f30a6257.tar.gz
Merge all xsrc patches for better KMS support on NetBSD, requested
and tested by chs. Bump PKGREVISION.
Diffstat (limited to 'x11')
-rw-r--r--x11/xf86-video-ati6/Makefile4
-rw-r--r--x11/xf86-video-ati6/distinfo10
-rw-r--r--x11/xf86-video-ati6/patches/patch-src_r600__exa.c123
-rw-r--r--x11/xf86-video-ati6/patches/patch-src_r600__textured__videofuncs.c24
-rw-r--r--x11/xf86-video-ati6/patches/patch-src_r6xx__accel.c22
-rw-r--r--x11/xf86-video-ati6/patches/patch-src_radeon__exa.c13
-rw-r--r--x11/xf86-video-ati6/patches/patch-src_radeon__exa__funcs.c13
-rw-r--r--x11/xf86-video-ati6/patches/patch-src_radeon__exa__render.c38
-rw-r--r--x11/xf86-video-ati6/patches/patch-src_radeon__textured__video.c36
9 files changed, 278 insertions, 5 deletions
diff --git a/x11/xf86-video-ati6/Makefile b/x11/xf86-video-ati6/Makefile
index 9516676f851..79a8b6d3390 100644
--- a/x11/xf86-video-ati6/Makefile
+++ b/x11/xf86-video-ati6/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.5 2014/05/05 00:48:34 ryoon Exp $
+# $NetBSD: Makefile,v 1.6 2014/10/26 10:20:42 wiz Exp $
DISTNAME= xf86-video-ati-6.14.6
PKGNAME= ${DISTNAME:S/ati/ati6/}
-PKGREVISION= 2
+PKGREVISION= 3
CATEGORIES= x11
MASTER_SITES= ${MASTER_SITE_XORG:=driver/}
EXTRACT_SUFX= .tar.bz2
diff --git a/x11/xf86-video-ati6/distinfo b/x11/xf86-video-ati6/distinfo
index 62a90dee134..44ec5507383 100644
--- a/x11/xf86-video-ati6/distinfo
+++ b/x11/xf86-video-ati6/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.4 2013/10/31 00:42:51 wiz Exp $
+$NetBSD: distinfo,v 1.5 2014/10/26 10:20:42 wiz Exp $
SHA1 (xf86-video-ati-6.14.6.tar.bz2) = b30383c7e5487c1df403a3af19fce8626d617a8d
RMD160 (xf86-video-ati-6.14.6.tar.bz2) = e285bff97a23f6e6f8553f1c010c840e6df882a8
@@ -6,9 +6,15 @@ Size (xf86-video-ati-6.14.6.tar.bz2) = 1139495 bytes
SHA1 (patch-src_atombios__crtc.c) = e6ec24fdc63e3744db9442ab5e12ffe6949eef19
SHA1 (patch-src_atombios__output.c) = ce3720c1d1cfd1f65023cea2745259af30a59add
SHA1 (patch-src_legacy__crtc.c) = 6be802fa29797265efeceaadec9607de334dbfc8
+SHA1 (patch-src_r600__exa.c) = 009ff3a42b95c1b1c825c54825316ab31e4fe43c
+SHA1 (patch-src_r600__textured__videofuncs.c) = ec8eca51e27d4f3899d9a5e040f313b92c87d1d0
+SHA1 (patch-src_r6xx__accel.c) = d998da9a9a02770005b708213eabe8808c8c3581
SHA1 (patch-src_radeon__accelfuncs.c) = f9d0ba2a0b7f62a56eecea117c4339f0e18b1e52
SHA1 (patch-src_radeon__crtc.c) = c22e5a9c4119a4c6aa3f64f83b326effe270c96c
SHA1 (patch-src_radeon__dri.c) = 479f58f8493543220b931182ab105309f8c035ab
SHA1 (patch-src_radeon__driver.c) = 16bf5852e3ad684fca9c64768822868d4a224500
-SHA1 (patch-src_radeon__exa__render.c) = 5c60719e9aa1c04b996613f79fdf7bb7cf2c013b
+SHA1 (patch-src_radeon__exa.c) = d031dac6fcbcccff6534a04ebdf492dd6a5450e6
+SHA1 (patch-src_radeon__exa__funcs.c) = 9a508251f04a26e857e4290de5a6b48f868df7d9
+SHA1 (patch-src_radeon__exa__render.c) = e3f7d2d0bb15d28224366e11d96c984bf0fdaa93
SHA1 (patch-src_radeon__render.c) = 919c108ba8bafdcdb4e0fba80da621674a62de8c
+SHA1 (patch-src_radeon__textured__video.c) = 409a187b286a228f632e391d68ee71a14289c574
diff --git a/x11/xf86-video-ati6/patches/patch-src_r600__exa.c b/x11/xf86-video-ati6/patches/patch-src_r600__exa.c
new file mode 100644
index 00000000000..28339c4f5fc
--- /dev/null
+++ b/x11/xf86-video-ati6/patches/patch-src_r600__exa.c
@@ -0,0 +1,123 @@
+$NetBSD: patch-src_r600__exa.c,v 1.1 2014/10/26 10:20:42 wiz Exp $
+
+--- src/r600_exa.c.orig 2012-06-25 08:19:41.000000000 +0000
++++ src/r600_exa.c
+@@ -246,7 +246,8 @@ R600PrepareSolid(PixmapPtr pPix, int alu
+ cb_conf.base = accel_state->dst_obj.offset;
+ cb_conf.bo = accel_state->dst_obj.bo;
+ #ifdef XF86DRM_MODE
+- cb_conf.surface = accel_state->dst_obj.surface;
++ if (info->cs)
++ cb_conf.surface = accel_state->dst_obj.surface;
+ #endif
+
+ if (accel_state->dst_obj.bpp == 8) {
+@@ -428,7 +429,8 @@ R600DoPrepareCopy(ScrnInfoPtr pScrn)
+ tex_res.bo = accel_state->src_obj[0].bo;
+ tex_res.mip_bo = accel_state->src_obj[0].bo;
+ #ifdef XF86DRM_MODE
+- tex_res.surface = accel_state->src_obj[0].surface;
++ if (info->cs)
++ tex_res.surface = accel_state->src_obj[0].surface;
+ #endif
+ if (accel_state->src_obj[0].bpp == 8) {
+ tex_res.format = FMT_8;
+@@ -475,7 +477,8 @@ R600DoPrepareCopy(ScrnInfoPtr pScrn)
+ cb_conf.base = accel_state->dst_obj.offset;
+ cb_conf.bo = accel_state->dst_obj.bo;
+ #ifdef XF86DRM_MODE
+- cb_conf.surface = accel_state->dst_obj.surface;
++ if (info->cs)
++ cb_conf.surface = accel_state->dst_obj.surface;
+ #endif
+ if (accel_state->dst_obj.bpp == 8) {
+ cb_conf.format = COLOR_8;
+@@ -626,15 +629,10 @@ R600PrepareCopy(PixmapPtr pSrc, Pixmap
+
+ if (accel_state->same_surface == TRUE) {
+ #if defined(XF86DRM_MODE)
+- unsigned long size = accel_state->dst_obj.surface->bo_size;
+- unsigned long align = accel_state->dst_obj.surface->bo_alignment;
+-#else
+- unsigned height = pDst->drawable.height;
+- unsigned long size = height * accel_state->dst_obj.pitch * pDst->drawable.bitsPerPixel/8;
+-#endif
+-
+-#if defined(XF86DRM_MODE)
+ if (info->cs) {
++ unsigned long size = accel_state->dst_obj.surface->bo_size;
++ unsigned long align = accel_state->dst_obj.surface->bo_alignment;
++
+ if (accel_state->copy_area_bo) {
+ radeon_bo_unref(accel_state->copy_area_bo);
+ accel_state->copy_area_bo = NULL;
+@@ -656,6 +654,9 @@ R600PrepareCopy(PixmapPtr pSrc, Pixmap
+ } else
+ #endif
+ {
++ unsigned height = pDst->drawable.height;
++ unsigned long size = height * accel_state->dst_obj.pitch * pDst->drawable.bitsPerPixel/8;
++
+ if (accel_state->copy_area) {
+ exaOffscreenFree(pDst->drawable.pScreen, accel_state->copy_area);
+ accel_state->copy_area = NULL;
+@@ -978,7 +979,8 @@ static Bool R600TextureSetup(PicturePtr
+ tex_res.bo = accel_state->src_obj[unit].bo;
+ tex_res.mip_bo = accel_state->src_obj[unit].bo;
+ #ifdef XF86DRM_MODE
+- tex_res.surface = accel_state->src_obj[unit].surface;
++ if (info->cs)
++ tex_res.surface = accel_state->src_obj[unit].surface;
+ #endif
+ tex_res.request_size = 1;
+
+@@ -1447,7 +1449,8 @@ static Bool R600PrepareComposite(int op,
+ cb_conf.format = dst_format;
+ cb_conf.bo = accel_state->dst_obj.bo;
+ #ifdef XF86DRM_MODE
+- cb_conf.surface = accel_state->dst_obj.surface;
++ if (info->cs)
++ cb_conf.surface = accel_state->dst_obj.surface;
+ #endif
+
+ switch (pDstPicture->format) {
+@@ -1899,9 +1902,7 @@ R600UploadToScreenCS(PixmapPtr pDst, int
+ src_obj.domain = RADEON_GEM_DOMAIN_GTT;
+ src_obj.bo = scratch;
+ src_obj.tiling_flags = 0;
+-#ifdef XF86DRM_MODE
+ src_obj.surface = NULL;
+-#endif
+
+ dst_obj.pitch = dst_pitch_hw;
+ dst_obj.width = pDst->drawable.width;
+@@ -1911,9 +1912,7 @@ R600UploadToScreenCS(PixmapPtr pDst, int
+ dst_obj.domain = RADEON_GEM_DOMAIN_VRAM;
+ dst_obj.bo = radeon_get_pixmap_bo(pDst);
+ dst_obj.tiling_flags = radeon_get_pixmap_tiling(pDst);
+-#ifdef XF86DRM_MODE
+ dst_obj.surface = radeon_get_pixmap_surface(pDst);
+-#endif
+
+ if (!R600SetAccelState(pScrn,
+ &src_obj,
+@@ -2040,9 +2039,7 @@ R600DownloadFromScreenCS(PixmapPtr pSrc,
+ src_obj.domain = RADEON_GEM_DOMAIN_VRAM | RADEON_GEM_DOMAIN_GTT;
+ src_obj.bo = radeon_get_pixmap_bo(pSrc);
+ src_obj.tiling_flags = radeon_get_pixmap_tiling(pSrc);
+-#ifdef XF86DRM_MODE
+ src_obj.surface = radeon_get_pixmap_surface(pSrc);
+-#endif
+
+ dst_obj.pitch = scratch_pitch;
+ dst_obj.width = w;
+@@ -2052,9 +2049,7 @@ R600DownloadFromScreenCS(PixmapPtr pSrc,
+ dst_obj.bpp = bpp;
+ dst_obj.domain = RADEON_GEM_DOMAIN_GTT;
+ dst_obj.tiling_flags = 0;
+-#ifdef XF86DRM_MODE
+ dst_obj.surface = NULL;
+-#endif
+
+ if (!R600SetAccelState(pScrn,
+ &src_obj,
diff --git a/x11/xf86-video-ati6/patches/patch-src_r600__textured__videofuncs.c b/x11/xf86-video-ati6/patches/patch-src_r600__textured__videofuncs.c
new file mode 100644
index 00000000000..f5a921a2901
--- /dev/null
+++ b/x11/xf86-video-ati6/patches/patch-src_r600__textured__videofuncs.c
@@ -0,0 +1,24 @@
+$NetBSD: patch-src_r600__textured__videofuncs.c,v 1.1 2014/10/26 10:20:42 wiz Exp $
+
+--- src/r600_textured_videofuncs.c.orig 2012-06-25 08:19:41.000000000 +0000
++++ src/r600_textured_videofuncs.c
+@@ -275,7 +275,8 @@ R600DisplayTexturedVideo(ScrnInfoPtr pSc
+ tex_res.bo = accel_state->src_obj[0].bo;
+ tex_res.mip_bo = accel_state->src_obj[0].bo;
+ #ifdef XF86DRM_MODE
+- tex_res.surface = NULL;
++ if (info->cs)
++ tex_res.surface = NULL;
+ #endif
+
+ tex_res.format = FMT_8;
+@@ -412,7 +413,8 @@ R600DisplayTexturedVideo(ScrnInfoPtr pSc
+ cb_conf.base = accel_state->dst_obj.offset;
+ cb_conf.bo = accel_state->dst_obj.bo;
+ #ifdef XF86DRM_MODE
+- cb_conf.surface = accel_state->dst_obj.surface;
++ if (info->cs)
++ cb_conf.surface = accel_state->dst_obj.surface;
+ #endif
+
+ switch (accel_state->dst_obj.bpp) {
diff --git a/x11/xf86-video-ati6/patches/patch-src_r6xx__accel.c b/x11/xf86-video-ati6/patches/patch-src_r6xx__accel.c
new file mode 100644
index 00000000000..497fda28a16
--- /dev/null
+++ b/x11/xf86-video-ati6/patches/patch-src_r6xx__accel.c
@@ -0,0 +1,22 @@
+$NetBSD: patch-src_r6xx__accel.c,v 1.1 2014/10/26 10:20:42 wiz Exp $
+
+--- src/r6xx_accel.c.orig 2012-06-25 08:19:41.000000000 +0000
++++ src/r6xx_accel.c
+@@ -228,7 +228,7 @@ r600_set_render_target(ScrnInfoPtr pScrn
+
+
+ #if defined(XF86DRM_MODE)
+- if (cb_conf->surface) {
++ if (info->cs && cb_conf->surface) {
+ switch (cb_conf->surface->level[0].mode) {
+ case RADEON_SURF_MODE_1D:
+ array_mode = 2;
+@@ -626,7 +626,7 @@ r600_set_tex_resource(ScrnInfoPtr pScrn,
+ uint32_t array_mode, pitch;
+
+ #if defined(XF86DRM_MODE)
+- if (tex_res->surface) {
++ if (info->cs && tex_res->surface) {
+ switch (tex_res->surface->level[0].mode) {
+ case RADEON_SURF_MODE_1D:
+ array_mode = 2;
diff --git a/x11/xf86-video-ati6/patches/patch-src_radeon__exa.c b/x11/xf86-video-ati6/patches/patch-src_radeon__exa.c
new file mode 100644
index 00000000000..139c6717fe6
--- /dev/null
+++ b/x11/xf86-video-ati6/patches/patch-src_radeon__exa.c
@@ -0,0 +1,13 @@
+$NetBSD: patch-src_radeon__exa.c,v 1.1 2014/10/26 10:20:42 wiz Exp $
+
+--- src/radeon_exa.c.orig 2012-06-25 08:19:41.000000000 +0000
++++ src/radeon_exa.c
+@@ -498,7 +498,7 @@ void *RADEONEXACreatePixmap2(ScreenPtr p
+ memset(&surface, 0, sizeof(struct radeon_surface));
+
+ #ifdef XF86DRM_MODE
+- if (info->ChipFamily >= CHIP_FAMILY_R600 && info->surf_man) {
++ if (info->cs && info->ChipFamily >= CHIP_FAMILY_R600 && info->surf_man) {
+ if (width) {
+ surface.npix_x = width;
+ /* need to align height to 8 for old kernel */
diff --git a/x11/xf86-video-ati6/patches/patch-src_radeon__exa__funcs.c b/x11/xf86-video-ati6/patches/patch-src_radeon__exa__funcs.c
new file mode 100644
index 00000000000..2515b61cc15
--- /dev/null
+++ b/x11/xf86-video-ati6/patches/patch-src_radeon__exa__funcs.c
@@ -0,0 +1,13 @@
+$NetBSD: patch-src_radeon__exa__funcs.c,v 1.1 2014/10/26 10:20:42 wiz Exp $
+
+--- src/radeon_exa_funcs.c.orig 2012-06-25 08:19:41.000000000 +0000
++++ src/radeon_exa_funcs.c
+@@ -814,7 +814,7 @@ Bool FUNC_NAME(RADEONDrawInit)(ScreenPtr
+ info->accel_state->exa->DownloadFromScreen = RADEONDownloadFromScreenCP;
+ }
+ # if defined(XF86DRM_MODE)
+- else {
++ else if (info->cs) {
+ info->accel_state->exa->UploadToScreen = &RADEONUploadToScreenCS;
+ info->accel_state->exa->DownloadFromScreen = &RADEONDownloadFromScreenCS;
+ }
diff --git a/x11/xf86-video-ati6/patches/patch-src_radeon__exa__render.c b/x11/xf86-video-ati6/patches/patch-src_radeon__exa__render.c
index 973e3c4a85e..a186e2d60b1 100644
--- a/x11/xf86-video-ati6/patches/patch-src_radeon__exa__render.c
+++ b/x11/xf86-video-ati6/patches/patch-src_radeon__exa__render.c
@@ -1,4 +1,4 @@
-$NetBSD: patch-src_radeon__exa__render.c,v 1.2 2013/10/31 00:42:51 wiz Exp $
+$NetBSD: patch-src_radeon__exa__render.c,v 1.3 2014/10/26 10:20:42 wiz Exp $
macallan; Tue Oct 29 01:06:03 UTC 2013:
Don't endian-twiddle solid source colours in composite operations on R1xx
@@ -27,3 +27,39 @@ hardware.
if (!pMask) {
if (!pSrcPicture->pDrawable)
pScreen->DestroyPixmap(pSrc);
+@@ -1025,7 +1025,7 @@ static Bool FUNC_NAME(R200PrepareComposi
+ RADEON_FALLBACK(("Bad destination pitch 0x%x\n", (int)dst_pitch));
+
+ if (!pSrc) {
+- pSrc = RADEONSolidPixmap(pScreen, cpu_to_le32(pSrcPicture->pSourcePict->solidFill.color));
++ pSrc = RADEONSolidPixmap(pScreen, pSrcPicture->pSourcePict->solidFill.color);
+ if (!pSrc)
+ RADEON_FALLBACK("Failed to create solid scratch pixmap\n");
+ }
+@@ -1034,7 +1034,7 @@ static Bool FUNC_NAME(R200PrepareComposi
+ return FALSE;
+
+ if (pMaskPicture && !pMask) {
+- pMask = RADEONSolidPixmap(pScreen, cpu_to_le32(pMaskPicture->pSourcePict->solidFill.color));
++ pMask = RADEONSolidPixmap(pScreen, pMaskPicture->pSourcePict->solidFill.color);
+ if (!pMask) {
+ if (!pSrcPicture->pDrawable)
+ pScreen->DestroyPixmap(pSrc);
+@@ -1533,7 +1533,7 @@ static Bool FUNC_NAME(R300PrepareComposi
+ RADEON_FALLBACK(("Bad destination pitch 0x%x\n", (int)dst_pitch));
+
+ if (!pSrc) {
+- pSrc = RADEONSolidPixmap(pScreen, cpu_to_le32(pSrcPicture->pSourcePict->solidFill.color));
++ pSrc = RADEONSolidPixmap(pScreen, pSrcPicture->pSourcePict->solidFill.color);
+ if (!pSrc)
+ RADEON_FALLBACK("Failed to create solid scratch pixmap\n");
+ }
+@@ -1542,7 +1542,7 @@ static Bool FUNC_NAME(R300PrepareComposi
+ return FALSE;
+
+ if (pMaskPicture && !pMask) {
+- pMask = RADEONSolidPixmap(pScreen, cpu_to_le32(pMaskPicture->pSourcePict->solidFill.color));
++ pMask = RADEONSolidPixmap(pScreen, pMaskPicture->pSourcePict->solidFill.color);
+ if (!pMask) {
+ if (!pSrcPicture->pDrawable)
+ pScreen->DestroyPixmap(pSrc);
diff --git a/x11/xf86-video-ati6/patches/patch-src_radeon__textured__video.c b/x11/xf86-video-ati6/patches/patch-src_radeon__textured__video.c
new file mode 100644
index 00000000000..6d409aea94b
--- /dev/null
+++ b/x11/xf86-video-ati6/patches/patch-src_radeon__textured__video.c
@@ -0,0 +1,36 @@
+$NetBSD: patch-src_radeon__textured__video.c,v 1.1 2014/10/26 10:20:42 wiz Exp $
+
+--- src/radeon_textured_video.c.orig 2012-06-25 08:19:41.000000000 +0000
++++ src/radeon_textured_video.c
+@@ -251,14 +251,17 @@ RADEONPutImageTextured(ScrnInfoPtr pScrn
+ BoxRec dstBox;
+ int dst_width = width, dst_height = height;
+ int aligned_height;
+-#ifdef XF86DRM_MODE
+- int h_align = drmmode_get_height_align(pScrn, 0);
+-#else
+- int h_align = 1;
+-#endif
++ int h_align;
+ /* make the compiler happy */
+ s2offset = s3offset = srcPitch2 = 0;
+
++#ifdef XF86DRM_MODE
++ if (info->cs)
++ h_align = drmmode_get_height_align(pScrn, 0);
++ else
++#endif
++ h_align = 1;
++
+ /* Clip */
+ x1 = src_x;
+ x2 = src_x + src_w;
+@@ -496,7 +499,7 @@ RADEONPutImageTextured(ScrnInfoPtr pScrn
+ #ifdef XF86DRI
+ if (info->directRenderingEnabled) {
+ #ifdef XF86DRM_MODE
+- if (IS_EVERGREEN_3D)
++ if (info->cs && IS_EVERGREEN_3D)
+ EVERGREENDisplayTexturedVideo(pScrn, pPriv);
+ else
+ #endif