From b0ec0202daaa469b713947a5dff8f2e1f9b3fbaf Mon Sep 17 00:00:00 2001 From: Chí-Thanh Christopher Nguyễn Date: Sun, 21 Mar 2010 16:52:15 +0000 Subject: xf86-video-openchrome: add patch for bug #298352 (Portage version: 2.2_rc67/cvs/Linux x86_64) --- x11-drivers/xf86-video-openchrome/ChangeLog | 11 +- ...86-video-openchrome-0.2.904-libdrm-2.4.17.patch | 200 +++++++++++++++++++++ .../xf86-video-openchrome-0.2.904-r1.ebuild | 57 ++++++ 3 files changed, 266 insertions(+), 2 deletions(-) create mode 100644 x11-drivers/xf86-video-openchrome/files/xf86-video-openchrome-0.2.904-libdrm-2.4.17.patch create mode 100644 x11-drivers/xf86-video-openchrome/xf86-video-openchrome-0.2.904-r1.ebuild (limited to 'x11-drivers/xf86-video-openchrome') diff --git a/x11-drivers/xf86-video-openchrome/ChangeLog b/x11-drivers/xf86-video-openchrome/ChangeLog index 10032f22a20f..fb4108f827ae 100644 --- a/x11-drivers/xf86-video-openchrome/ChangeLog +++ b/x11-drivers/xf86-video-openchrome/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for x11-drivers/xf86-video-openchrome -# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/x11-drivers/xf86-video-openchrome/ChangeLog,v 1.20 2009/11/14 16:11:05 maekke Exp $ +# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/x11-drivers/xf86-video-openchrome/ChangeLog,v 1.21 2010/03/21 16:52:14 chithanh Exp $ + +*xf86-video-openchrome-0.2.904-r1 (21 Mar 2010) + + 21 Mar 2010; Chí-Thanh Christopher Nguyễn + +xf86-video-openchrome-0.2.904-r1.ebuild, + +files/xf86-video-openchrome-0.2.904-libdrm-2.4.17.patch: + Patch for bug #298352 14 Nov 2009; Markus Meier xf86-video-openchrome-0.2.904.ebuild: diff --git a/x11-drivers/xf86-video-openchrome/files/xf86-video-openchrome-0.2.904-libdrm-2.4.17.patch b/x11-drivers/xf86-video-openchrome/files/xf86-video-openchrome-0.2.904-libdrm-2.4.17.patch new file mode 100644 index 000000000000..4057936439bb --- /dev/null +++ b/x11-drivers/xf86-video-openchrome/files/xf86-video-openchrome-0.2.904-libdrm-2.4.17.patch @@ -0,0 +1,200 @@ +Index: xf86-video-openchrome-0.2.904/src/via_drm.h +=================================================================== +--- xf86-video-openchrome-0.2.904/src/via_drm.h (revision 415) ++++ xf86-video-openchrome-0.2.904/src/via_drm.h (revision 839) +@@ -17,5 +17,5 @@ + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +- * THE AUTHOR(S) OR COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR ++ * VIA, S3 GRAPHICS, AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +@@ -25,4 +25,6 @@ + #define _VIA_DRM_H_ + ++#include "drm.h" ++ + /* WARNING: These defines must be the same as what the Xserver uses. + * if you change them, you must change the defines in the Xserver. +@@ -32,14 +34,12 @@ + #define _VIA_DEFINES_ + +-#if !defined(__KERNEL__) && !defined(_KERNEL) + #include "via_drmclient.h" +-#endif +- +-#define VIA_NR_SAREA_CLIPRECTS 8 ++ ++#define VIA_NR_SAREA_CLIPRECTS 8 + #define VIA_NR_XVMC_PORTS 10 + #define VIA_NR_XVMC_LOCKS 5 + #define VIA_MAX_CACHELINE_SIZE 64 + #define XVMCLOCKPTR(saPriv,lockNo) \ +- ((volatile drm_hw_lock_t *)(((((unsigned long) (saPriv)->XvMCLockArea) + \ ++ ((__volatile__ struct drm_hw_lock *)(((((unsigned long) (saPriv)->XvMCLockArea) + \ + (VIA_MAX_CACHELINE_SIZE - 1)) & \ + ~(VIA_MAX_CACHELINE_SIZE - 1)) + \ +@@ -108,25 +108,24 @@ + #define VIA_DEPTH 0x4 + #define VIA_STENCIL 0x8 +- + #define VIA_MEM_VIDEO 0 /* matches drm constant */ + #define VIA_MEM_AGP 1 /* matches drm constant */ +-#define VIA_MEM_SYSTEM 2 ++#define VIA_MEM_SYSTEM 2 + #define VIA_MEM_MIXED 3 + #define VIA_MEM_UNKNOWN 4 + + typedef struct { +- uint32_t offset; +- uint32_t size; ++ __u32 offset; ++ __u32 size; + } drm_via_agp_t; + + typedef struct { +- uint32_t offset; +- uint32_t size; ++ __u32 offset; ++ __u32 size; + } drm_via_fb_t; + + typedef struct { +- uint32_t context; +- uint32_t type; +- uint32_t size; ++ __u32 context; ++ __u32 type; ++ __u32 size; + unsigned long index; + unsigned long offset; +@@ -150,7 +149,7 @@ + VIA_FUTEX_WAKE = 0X01 + } func; +- uint32_t ms; +- uint32_t lock; +- uint32_t val; ++ __u32 ms; ++ __u32 lock; ++ __u32 val; + } drm_via_futex_t; + +@@ -159,5 +158,5 @@ + VIA_INIT_DMA = 0x01, + VIA_CLEANUP_DMA = 0x02, +- VIA_DMA_INITIALIZED = 0x03 ++ VIA_DMA_INITIALIZED = 0x03 + } func; + +@@ -168,5 +167,5 @@ + + typedef struct _drm_via_cmdbuffer { +- char __user *buf; ++ char *buf; + unsigned long size; + } drm_via_cmdbuffer_t; +@@ -184,5 +183,5 @@ + unsigned int dirty; + unsigned int nbox; +- drm_clip_rect_t boxes[VIA_NR_SAREA_CLIPRECTS]; ++ struct drm_clip_rect boxes[VIA_NR_SAREA_CLIPRECTS]; + drm_via_tex_region_t texList[VIA_NR_TEX_REGIONS + 1]; + int texAge; /* last time texture was uploaded */ +@@ -200,10 +199,9 @@ + unsigned int XvMCDisplaying[VIA_NR_XVMC_PORTS]; + unsigned int XvMCSubPicOn[VIA_NR_XVMC_PORTS]; +- unsigned int XvMCCtxNoGrabbed; /* Last context to hold decoder */ ++ unsigned int XvMCCtxNoGrabbed; /* Last context to hold decoder */ + + /* Used by the 3d driver only at this point, for pageflipping: + */ +- +- unsigned int pfCurrentOffset; ++ unsigned int pfCurrentOffset; + } drm_via_sarea_t; + +@@ -214,5 +212,5 @@ + } func; + int wait; +- uint32_t size; ++ __u32 size; + } drm_via_cmdbuf_size_t; + +@@ -226,17 +224,19 @@ + #define VIA_IRQ_FLAGS_MASK 0xF0000000 + +-enum drm_via_irqs{drm_via_irq_hqv0 = 0, +- drm_via_irq_hqv1, +- drm_via_irq_dma0_dd, +- drm_via_irq_dma0_td, +- drm_via_irq_dma1_dd, +- drm_via_irq_dma1_td, +- drm_via_irq_num}; +- +-struct drm_via_wait_irq_request{ ++enum drm_via_irqs { ++ drm_via_irq_hqv0 = 0, ++ drm_via_irq_hqv1, ++ drm_via_irq_dma0_dd, ++ drm_via_irq_dma0_td, ++ drm_via_irq_dma1_dd, ++ drm_via_irq_dma1_td, ++ drm_via_irq_num ++}; ++ ++struct drm_via_wait_irq_request { + unsigned irq; + via_irq_seq_type_t type; +- uint32_t sequence; +- uint32_t signal; ++ __u32 sequence; ++ __u32 signal; + }; + +@@ -246,25 +246,30 @@ + } drm_via_irqwait_t; + +-typedef struct drm_via_blitsync { +- uint32_t sync_handle; ++typedef struct drm_via_blitsync { ++ __u32 sync_handle; + unsigned engine; + } drm_via_blitsync_t; + ++/* - * Below,"flags" is currently unused but will be used for possible future ++ * extensions like kernel space bounce buffers for bad alignments and ++ * blit engine busy-wait polling for better latency in the absence of ++ * interrupts. ++ */ ++ + typedef struct drm_via_dmablit { +- uint32_t num_lines; +- uint32_t line_length; +- +- uint32_t fb_addr; +- uint32_t fb_stride; +- +- unsigned char *mem_addr; +- uint32_t mem_stride; +- +- int bounce_buffer; +- int to_fb; +- +- drm_via_blitsync_t sync; ++ __u32 num_lines; ++ __u32 line_length; ++ ++ __u32 fb_addr; ++ __u32 fb_stride; ++ ++ unsigned char *mem_addr; ++ __u32 mem_stride; ++ ++ __u32 flags; ++ int to_fb; ++ ++ drm_via_blitsync_t sync; + } drm_via_dmablit_t; + +- + #endif /* _VIA_DRM_H_ */ diff --git a/x11-drivers/xf86-video-openchrome/xf86-video-openchrome-0.2.904-r1.ebuild b/x11-drivers/xf86-video-openchrome/xf86-video-openchrome-0.2.904-r1.ebuild new file mode 100644 index 000000000000..ee86d0f81b57 --- /dev/null +++ b/x11-drivers/xf86-video-openchrome/xf86-video-openchrome-0.2.904-r1.ebuild @@ -0,0 +1,57 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/x11-drivers/xf86-video-openchrome/xf86-video-openchrome-0.2.904-r1.ebuild,v 1.1 2010/03/21 16:52:14 chithanh Exp $ + +XDPVER="-1" +IUSE="debug dri" + +inherit x-modular + +DESCRIPTION="X.Org driver for VIA/S3G cards" +HOMEPAGE="http://www.openchrome.org" +SRC_URI="${HOMEPAGE}/releases/${P}.tar.bz2" +LICENSE="MIT" +KEYWORDS="~amd64 ~x86" +RDEPEND=">=x11-base/xorg-server-1.2 + dri? ( >=x11-libs/libdrm-2.4.17 )" +DEPEND="${RDEPEND} + x11-libs/libX11 + x11-libs/libXv + x11-libs/libXvMC + x11-proto/randrproto + x11-proto/videoproto + x11-proto/xextproto + x11-proto/xproto + dri? ( + x11-proto/xf86driproto + x11-proto/glproto + )" + +DOCS="ChangeLog NEWS README" + +pkg_setup() { + CONFIGURE_OPTIONS=" + $(use_enable debug) + $(use_enable debug xv-debug) + " + PATCHES=( "${FILESDIR}/${P}-libdrm-2.4.17.patch" ) +} + +pkg_postinst() { + elog "Supported chipsets:" + elog "" + elog "CLE266 (VT3122)" + elog "KM400/P4M800 (VT3205)" + elog "K8M800 (VT3204)" + elog "PM800/PM880/CN400 (VT3259)" + elog "VM800/CN700/P4M800Pro (VT3314)" + elog "CX700 (VT3324)" + elog "P4M890 (VT3327)" + elog "K8M890 (VT3336)" + elog "P4M900/VN896 (VT3364)" + elog "" + elog "The driver name is 'openchrome', and this is what you need" + elog "to use in your xorg.conf now (instead of 'via')." + elog "" + elog "See the ChangeLog and release notes for more information." +} -- cgit v1.2.3-65-gdbad