Xorg: Add OMAP 1/2/3 framebuffer driver.
authorMichael Büsch <mb@bu3sch.de>
Tue, 10 Aug 2010 19:03:26 +0000 (19:03 +0000)
committerMichael Büsch <mb@bu3sch.de>
Tue, 10 Aug 2010 19:03:26 +0000 (19:03 +0000)
SVN-Revision: 22584

Xorg/xorg/driver/xf86-video-omap/Makefile [new file with mode: 0644]
Xorg/xorg/driver/xf86-video-omap/patches/001-misc-fixes.patch [new file with mode: 0644]

diff --git a/Xorg/xorg/driver/xf86-video-omap/Makefile b/Xorg/xorg/driver/xf86-video-omap/Makefile
new file mode 100644 (file)
index 0000000..9b80225
--- /dev/null
@@ -0,0 +1,49 @@
+#
+# Copyright (C) 2010 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=xf86-video-omapfb
+PKG_VERSION:=20100810
+PKG_REV:=db636c8436265c3d86c5b8e00785e45d55825c80
+PKG_RELEASE:=1
+
+PKG_SOURCE_URL:=http://git.pingu.fi/xf86-video-omapfb
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_VERSION:=$(PKG_REV)
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/$(PKG_NAME)-$(PKG_VERSION)/
+
+PKG_FIXUP:=libtool
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+$(call include_mk, xorg-driver.mk)
+
+define Package/xf86-video-omapfb
+  SECTION:=xorg-driver
+  CATEGORY:=Xorg
+  SUBMENU:=driver
+  DEPENDS:=+xserver-xorg
+  TITLE:=xf86-video-omapfb
+  URL:=http://xorg.freedesktop.org/
+endef
+
+define Build/Configure
+       (cd $(PKG_BUILD_DIR); ./autogen.sh)
+       $(call Build/Configure/Default)
+endef
+
+define Package/xf86-video-omapfb/install
+       $(INSTALL_DIR) $(1)/usr/lib/xorg/modules/drivers
+       $(INSTALL_DATA) \
+               $(PKG_INSTALL_DIR)/usr/lib/xorg/modules/drivers/*.so \
+               $(1)/usr/lib/xorg/modules/drivers
+endef
+
+$(eval $(call BuildPackage,xf86-video-omapfb))
diff --git a/Xorg/xorg/driver/xf86-video-omap/patches/001-misc-fixes.patch b/Xorg/xorg/driver/xf86-video-omap/patches/001-misc-fixes.patch
new file mode 100644 (file)
index 0000000..79702c6
--- /dev/null
@@ -0,0 +1,43 @@
+---
+ src/omapfb-driver.c |    5 +++--
+ src/omapfb-xv.c     |    6 +++---
+ 2 files changed, 6 insertions(+), 5 deletions(-)
+
+--- xf86-video-omapfb-20100810.orig/src/omapfb-driver.c
++++ xf86-video-omapfb-20100810/src/omapfb-driver.c
+@@ -182,7 +182,7 @@ OMAPFBProbe(DriverPtr drv, int flags)
+               return FALSE;
+ /* FIXME: We don't really want to do it like this... */
+-#define DEFAULT_DEVICE "/dev/fb"
++#define DEFAULT_DEVICE "/dev/fb0"
+       for (i = 0; i < numDevSections; i++) {
+               int fd;
+@@ -831,7 +831,8 @@ static XF86ModuleVersionInfo OMAPFBVersR
+       MODINFOSTRING1,
+       MODINFOSTRING2,
+       XORG_VERSION_CURRENT,
+-      PACKAGE_VERSION_MAJOR, PACKAGE_VERSION_MINOR, PACKAGE_VERSION_PATCHLEVEL,
++//    PACKAGE_VERSION_MAJOR, PACKAGE_VERSION_MINOR, PACKAGE_VERSION_PATCHLEVEL,
++      0, 0, 1,
+       ABI_CLASS_VIDEODRV,
+       ABI_VIDEODRV_VERSION,
+       NULL,
+--- xf86-video-omapfb-20100810.orig/src/omapfb-xv.c
++++ xf86-video-omapfb-20100810/src/omapfb-xv.c
+@@ -225,11 +225,11 @@ int OMAPFBXVInit (ScrnInfoPtr pScrn,
+                */
+ //            ofb->port->mem_info.type = OMAPFB_MEMTYPE_SRAM;
+               if (ioctl(ofb->port->fd, OMAPFB_SETUP_MEM, &ofb->port->mem_info) != 0) {
+-                      xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
++                      xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
+                                  "Failed to unallocate video plane memory: %s\n",
+                                  strerror(errno));
+-                      OMAPFBPortFreeRec(pScrn);
+-                      return 0;
++//                    OMAPFBPortFreeRec(pScrn);
++//                    return 0;
+               }
+       }
+       if(ioctl(ofb->port->fd, OMAPFB_QUERY_PLANE, &ofb->port->plane_info) != 0) {