diff options
7 files changed, 184 insertions, 0 deletions
diff --git a/x11-drivers/psb-kmod/Manifest b/x11-drivers/psb-kmod/Manifest new file mode 100644 index 0000000..9e3bfed --- /dev/null +++ b/x11-drivers/psb-kmod/Manifest @@ -0,0 +1,3 @@ +AUX psb-kmod-fix-backlight-device-register-2.6.34.patch 929 RMD160 34d61853cdc0e2b4836262deba61f1ec901b8d52 SHA1 3a1cd929e55cff0880a3bfcce139230a275e8bf6 SHA256 88c1f0f8d44f386e66908b1c8d522fa4ee839a9067a2fcd8ee351cdfaa14d5e4 +DIST psb-kmod-4.41.1-10.fc11.src.rpm 402140 RMD160 36e4ea047c238b91597de3802d31bc1e0d774e8d SHA1 de7e43764a81aca5ee1b911b39414802412bb05c SHA256 9703b232a25e2c1de76746c4ebeb2228b6329669d4e3cf5dab220012c0766c71 +EBUILD psb-kmod-4.41.1_p10-r2.ebuild 3230 RMD160 e0456252127636b8021926461f6154b5ca4c93cb SHA1 c4496bc6b62078ef7de464f9954cd112c22cf580 SHA256 39eee22e9e164722ff5d85e3ad24fcb63c122f0f10965bb88c96827d115272f3 diff --git a/x11-drivers/psb-kmod/files/psb-kmod-fix-backlight-device-register-2.6.34.patch b/x11-drivers/psb-kmod/files/psb-kmod-fix-backlight-device-register-2.6.34.patch new file mode 100644 index 0000000..b5b8432 --- /dev/null +++ b/x11-drivers/psb-kmod/files/psb-kmod-fix-backlight-device-register-2.6.34.patch @@ -0,0 +1,22 @@ +Fix call to backlight_device_register() changed in kernel 2.6.34 by commit +a19a6ee6cad2b20292a774c2f56ba8039b0fac9c . + +Signed-off-by: Éric Piel <eric.piel@tremplin-utc.net> + +--- intel_lvds.c.bak 2010-04-02 00:26:45.489008304 +0200 ++++ intel_lvds.c 2010-04-02 00:40:51.530267983 +0200 +@@ -801,7 +801,14 @@ + + if ((blc_type == BLC_I2C_TYPE) || (blc_type == BLC_PWM_TYPE)){ + /* add /sys/class/backlight interface as standard */ ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34) ++ struct backlight_properties props; ++ memset(&props, 0, sizeof(struct backlight_properties)); ++ props.max_brightness = BRIGHTNESS_MAX_LEVEL; ++ psbbl_device = backlight_device_register("psblvds", &dev->pdev->dev, dev, &psbbl_ops, &props); ++#else + psbbl_device = backlight_device_register("psblvds", &dev->pdev->dev, dev, &psbbl_ops); ++#endif + if (psbbl_device){ + #if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,20) + down(&psbbl_device->sem);
\ No newline at end of file diff --git a/x11-drivers/psb-kmod/psb-kmod-4.41.1_p10-r2.ebuild b/x11-drivers/psb-kmod/psb-kmod-4.41.1_p10-r2.ebuild new file mode 100644 index 0000000..509f67f --- /dev/null +++ b/x11-drivers/psb-kmod/psb-kmod-4.41.1_p10-r2.ebuild @@ -0,0 +1,78 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/x11-drivers/psb-kmod/psb-kmod-4.41.1_p10-r1.ebuild,v 1.2 2009/12/17 22:40:45 zmedico Exp $ + +EAPI="2" + +inherit rpm linux-info linux-mod + +DESCRIPTION="kernel module for the intel gma500 (poulsbo)" +HOMEPAGE="http://www.happyassassin.net/2009/09/26/gma-500-poulsbo-driver-for-fedora-11-soon-to-be-in-rpm-fusion/" +SRC_URI="http://download1.rpmfusion.org/nonfree/fedora/updates/11/SRPMS/psb-kmod-4.41.1-10.fc11.src.rpm" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~x86" +IUSE="" + +DEPEND="x11-drivers/psb-firmware" +RDEPEND="" + +S=${WORKDIR}/psb-kernel-source-4.41.1 + +pkg_setup() { + linux-mod_pkg_setup + + local CONFIG_CHECK="FB_CFB_FILLRECT FB_CFB_COPYAREA FB_CFB_IMAGEBLIT ~FRAMEBUFFER_CONSOLE" + local ERROR_FB_CFB_FILLRECT="You don't have CONFIG_FB_CFB_FILLRECT enabled in you kernel config. To do this either hack drivers/video/Kconfig or enable an FB driver that pulls it in (for example VESAFB)" + local ERROR_FB_CFB_COPYAREA="You don't have CONFIG_FB_CFB_FILLRECT enabled in you kernel config. To do this either hack drivers/video/Kconfig or enable an FB driver that pulls it in (for example VESAFB)" + local ERROR_FB_CFB_IMAGEBLIT="You don't have CONFIG_FB_CFB_IMAGEBLIT enabled in you kernel config. To do this either hack drivers/video/Kconfig or enable an FB driver that pulls it in (for example VESAFB)" + local WARNING_FBCON="You should really have CONFIG_FRAMEBUFFER_CONSOLE set in your kernel config. Otherwise you will get a seriously messed up console. You can work around this by loading the psb module with no_fb=1" + + check_extra_config + + linux_chkconfig_builtin "FRAMEBUFFER_CONSOLE" || ewarn "You really should not have CONFIG_FRAMEBUFFER_CONSOLE as a module. Otherwise you will get a seriously messed up console. You can work around this by loading the psb module with no_fb=1" +} + +src_prepare() +{ + if kernel_is ge 2 6 29 ; then + epatch "${WORKDIR}/psb-kmd-4.34-current_euid.patch" + epatch "${WORKDIR}/psb-kernel-source-4.41.1-i2c-intelfb.patch" + fi + if kernel_is ge 2 6 30 ; then + epatch "${WORKDIR}/${PN}-4.41.1_irqreturn.patch" + epatch "${WORKDIR}/${PN}-4.41.1_busid.patch" + fi + if kernel_is ge 2 6 31 ; then + epatch "${WORKDIR}/psb-kernel-source-4.41.1-agp_memory.patch" + fi + if kernel_is ge 2 6 32 ; then + # In commit 6a12235c7d2d75c7d94b9afcaaecd422ff845ce0 phys_to_gart + # was removed since it is a 1:1 mapping on all platforms. + sed -e 's:phys_to_gart(page_to_phys(\*cur_page)):page_to_phys(*cur_page):' \ + -i drm_agpsupport.c || die "sed failed" + # The PREFIX constant seems to be missing in 2.6.32. + sed -e 's/KERN_ERR PREFIX/KERN_ERR "ACPI: "/' -i drm_edid.c \ + || die "sed failed" + fi + epatch "${WORKDIR}/psb-kernel-source-4.41.1-drmpsb.patch" + epatch "${FILESDIR}/${PN}-fix-backlight-device-register-2.6.34.patch" +} + +src_compile() +{ + # dirty hack :( + LINUXDIR=/usr/src/linux emake DRM_MODULES=psb || die +} + +src_install() +{ + MODULE_NAMES="drm-psb(kernel/drivers/gpu/drm:${S}:${S}) psb(kernel/drivers/gpu/drm:${S}:${S})" + MODULESD_PSB_ALIASES=( + "pci:v00008086d00008108sv*sd*bc*sc*i* psb" + "pci:v00008086d00008109sv*sd*bc*sc*i* psb" + ) + + linux-mod_src_install +} diff --git a/x11-drivers/xf86-video-psb/Manifest b/x11-drivers/xf86-video-psb/Manifest new file mode 100644 index 0000000..4bfa579 --- /dev/null +++ b/x11-drivers/xf86-video-psb/Manifest @@ -0,0 +1,4 @@ +AUX xf86-video-psb-min-backlight.patch 411 RMD160 d78fe4a2aad399ea22fe3ac800171f367f27d7e8 SHA1 ed3a5dd3c421bd339d7c85850b5af6706b48b568 SHA256 d80d0646a15b733661ee38cfe3eee693e9526906aa7bae4d4a089e8247ec8bbc +DIST xorg-x11-drv-psb-0.32.0-1.fc11.src.rpm 538889 RMD160 eff1053395165b16ba57d82c6067e82248a9928d SHA1 a308b43df050937e1925e9b93b1dd2121f90c8bc SHA256 62219cacc062ba978b8a93c9606ce2fdce67eb3471d57ef5f9e77f59b8ec791f +EBUILD xf86-video-psb-0.32.0_p1-r1.ebuild 1555 RMD160 f7becabd253bc163bba8b5275930af929926aae7 SHA1 1d968aebb7a5ab15764e88b78a5a0c30c1429321 SHA256 69682072020837edcb7d47a2cd6d1b080385e2b88ba7ab06cfe091398be0b9b0 +MISC metadata.xml 255 RMD160 dbe77cd804a4411e8445c05f6e632fdc2f72d082 SHA1 94e7a8d2d43907279488b984c3dcd9fd1888ce25 SHA256 28c7b0445a5f2eb0d524ff3afcef712ecbf345592d26142f71a3ef9bca653d4b diff --git a/x11-drivers/xf86-video-psb/files/xf86-video-psb-min-backlight.patch b/x11-drivers/xf86-video-psb/files/xf86-video-psb-min-backlight.patch new file mode 100644 index 0000000..da41378 --- /dev/null +++ b/x11-drivers/xf86-video-psb/files/xf86-video-psb-min-backlight.patch @@ -0,0 +1,13 @@ +--- src/psb_lvds.c 2009-05-12 07:07:53.000000000 +0530 ++++ src/psb_lvds.c.new 2010-07-23 03:51:22.863349949 +0530 +@@ -249,8 +249,8 @@ + psbLVDSI2CSetBacklight(pLVDS, newbacklight); + } else if (pDevice->blc_data.type == BLC_PWM_TYPE) { + /* Provent LVDS going to total black */ +- if (level < 20) { +- level = 20; ++ if (level < 1) { ++ level = 1; + } + + max_pwm_blc = psbLVDSGetPWMMaxBacklight(pLVDS); diff --git a/x11-drivers/xf86-video-psb/metadata.xml b/x11-drivers/xf86-video-psb/metadata.xml new file mode 100644 index 0000000..e433c08 --- /dev/null +++ b/x11-drivers/xf86-video-psb/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>no-herd</herd> + <maintainer> + <email>patrick@gentoo.org</email> + <name>Patrick Lauer</name> + </maintainer> +</pkgmetadata> diff --git a/x11-drivers/xf86-video-psb/xf86-video-psb-0.32.0_p1-r1.ebuild b/x11-drivers/xf86-video-psb/xf86-video-psb-0.32.0_p1-r1.ebuild new file mode 100644 index 0000000..ff6a928 --- /dev/null +++ b/x11-drivers/xf86-video-psb/xf86-video-psb-0.32.0_p1-r1.ebuild @@ -0,0 +1,55 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/x11-drivers/xf86-video-psb/xf86-video-psb-0.32.0_p1.ebuild,v 1.1 2009/12/14 07:08:43 zmedico Exp $ + +EAPI="2" + +inherit rpm autotools + +DESCRIPTION="xorg driver for the intel gma500 (poulsbo)" +HOMEPAGE="http://www.happyassassin.net/2009/09/26/gma-500-poulsbo-driver-for-fedora-11-soon-to-be-in-rpm-fusion/" +SRC_URI="http://download1.rpmfusion.org/nonfree/fedora/updates/testing/11/SRPMS/xorg-x11-drv-psb-0.32.0-1.fc11.src.rpm" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~x86" +IUSE="" + +DEPEND="x11-base/xorg-server + x11-proto/xf86dgaproto + x11-proto/randrproto + x11-proto/xf86driproto + x11-proto/xineramaproto + x11-libs/libdrm-poulsbo" +RDEPEND="$DEPEND + x11-drivers/psb-kmod + x11-libs/xpsb-glx" + +S=${WORKDIR}/xserver-xorg-video-psb-0.32.0 + +src_prepare() { + epatch "${WORKDIR}/xorg-x11-drv-psb-0.31.0-libdrm.patch" + epatch "${WORKDIR}/xorg-x11-drv-psb-0.31.0-ignoreacpi.patch" + epatch "${WORKDIR}/xorg-x11-drv-psb-0.31.0-xserver17.patch" + epatch "${WORKDIR}/01_disable_lid_timer.patch" + epatch "${FILESDIR}/${PN}-min-backlight.patch" + eautoreconf +} + +src_configure() { + econf +} + +src_compile() { + emake +} + +src_install() { + emake install DESTDIR="${D}" || die "Make failed" + + elog "If your X refuses to start, saying something like" + elog "could not mmap framebuffer..." + elog "try to pretend to have less ram than you have" + elog "by appending a kernel parameter mem=xxxxMB" + elog "(especially on a Vaio P11 try mem=2039MB)" +} |