summaryrefslogtreecommitdiff
path: root/recipes/xorg-driver
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/xorg-driver')
-rw-r--r--recipes/xorg-driver/xf86-video-msm/compile_cfbbd17f0d4ab0f30915594d74e1b2b12c4ff8a1.patch51
-rw-r--r--recipes/xorg-driver/xf86-video-msm/kgsl_drm.h109
-rw-r--r--recipes/xorg-driver/xf86-video-msm/no_neon_cfbbd17f0d4ab0f30915594d74e1b2b12c4ff8a1.patch98
-rw-r--r--recipes/xorg-driver/xf86-video-msm_git.bb23
4 files changed, 274 insertions, 7 deletions
diff --git a/recipes/xorg-driver/xf86-video-msm/compile_cfbbd17f0d4ab0f30915594d74e1b2b12c4ff8a1.patch b/recipes/xorg-driver/xf86-video-msm/compile_cfbbd17f0d4ab0f30915594d74e1b2b12c4ff8a1.patch
new file mode 100644
index 0000000000..ece53568b0
--- /dev/null
+++ b/recipes/xorg-driver/xf86-video-msm/compile_cfbbd17f0d4ab0f30915594d74e1b2b12c4ff8a1.patch
@@ -0,0 +1,51 @@
+Index: git/src/mdp/mdp.c
+===================================================================
+--- git.orig/src/mdp/mdp.c
++++ git/src/mdp/mdp.c
+@@ -172,6 +172,8 @@ static void DisplayMSMBlitError(MSMPtr p
+
+ void mdpBlitFlush(MSMPtr pMsm)
+ {
++#ifdef MSMFB_ASYNC_BLIT
++
+ int ret;
+
+ if (pMsm->AsyncOp) {
+@@ -184,6 +186,7 @@ void mdpBlitFlush(MSMPtr pMsm)
+ DisplayMSMBlitError(pMsm, mdp_blit_list.count, &(mdp_blit_list.req[0]));
+
+ mdp_blit_list.count = 0;
++#endif
+ }
+
+ void mdpBlitReset(void)
+Index: git/src/msm-dri2.c
+===================================================================
+--- git.orig/src/msm-dri2.c
++++ git/src/msm-dri2.c
+@@ -87,11 +87,12 @@ MSMDRI2DoFlip(ScreenPtr pScreen, PixmapP
+ vinfo.reserved[2] = handle;
+
+ /* the swap interval goes into the third reserved field */
+- vinfo.reserved[3] = pPixmap ? pScreen->swapInterval : 1;
++ //vinfo.reserved[3] = pPixmap ? pScreen->swapInterval : 1;
+
+ /* reserved[4] is the allocation type */
++#ifdef MDP_BLIT_SRC_GEM
+ vinfo.reserved[4] = MDP_BLIT_SRC_GEM;
+-
++#endif
+ ret = ioctl(pMsm->fd, FBIOPAN_DISPLAY, &vinfo);
+
+ if (ret)
+@@ -456,8 +457,8 @@ MSMDRI2ScreenInit(ScreenPtr pScreen)
+ #endif
+
+ #if DRI2INFOREC_VERSION >= 4
+- info.ScheduleSwap = MSMDRI2ScheduleSwap;
+- pScreen->swapInterval = 1;
++// info.ScheduleSwap = MSMDRI2ScheduleSwap;
++// pScreen->swapInterval = 1;
+ #endif
+ info.CopyRegion = MSMDRI2CopyRegion;
+
diff --git a/recipes/xorg-driver/xf86-video-msm/kgsl_drm.h b/recipes/xorg-driver/xf86-video-msm/kgsl_drm.h
new file mode 100644
index 0000000000..87465916c5
--- /dev/null
+++ b/recipes/xorg-driver/xf86-video-msm/kgsl_drm.h
@@ -0,0 +1,109 @@
+
+/* Copyright (c) 2009, Code Aurora Forum. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Code Aurora nor
+ * the names of its contributors may be used to endorse or promote
+ * products derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+#ifndef _KGSL_DRM_H_
+#define _KGSL_DRM_H_
+
+#include "drm.h"
+
+#define DRM_KGSL_GEM_CREATE 0x00
+#define DRM_KGSL_GEM_PREP 0x01
+#define DRM_KGSL_GEM_SETMEMTYPE 0x02
+#define DRM_KGSL_GEM_GETMEMTYPE 0x03
+#define DRM_KGSL_GEM_MMAP 0x04
+#define DRM_KGSL_GEM_ALLOC 0x05
+#define DRM_KGSL_GEM_BIND_GPU 0x06
+#define DRM_KGSL_GEM_UNBIND_GPU 0x07
+
+#define DRM_IOCTL_KGSL_GEM_CREATE \
+DRM_IOWR(DRM_COMMAND_BASE + DRM_KGSL_GEM_CREATE, struct drm_kgsl_gem_create)
+
+#define DRM_IOCTL_KGSL_GEM_PREP \
+DRM_IOWR(DRM_COMMAND_BASE + DRM_KGSL_GEM_PREP, struct drm_kgsl_gem_prep)
+
+#define DRM_IOCTL_KGSL_GEM_SETMEMTYPE \
+DRM_IOWR(DRM_COMMAND_BASE + DRM_KGSL_GEM_SETMEMTYPE, \
+struct drm_kgsl_gem_memtype)
+
+#define DRM_IOCTL_KGSL_GEM_GETMEMTYPE \
+DRM_IOWR(DRM_COMMAND_BASE + DRM_KGSL_GEM_GETMEMTYPE, \
+struct drm_kgsl_gem_memtype)
+
+#define DRM_IOCTL_KGSL_GEM_MMAP \
+DRM_IOWR(DRM_COMMAND_BASE + DRM_KGSL_GEM_MMAP, struct drm_kgsl_gem_mmap)
+
+#define DRM_IOCTL_KGSL_GEM_ALLOC \
+DRM_IOWR(DRM_COMMAND_BASE + DRM_KGSL_GEM_ALLOC, struct drm_kgsl_gem_alloc)
+
+#define DRM_IOCTL_KGSL_GEM_BIND_GPU \
+DRM_IOWR(DRM_COMMAND_BASE + DRM_KGSL_GEM_BIND_GPU, struct drm_kgsl_gem_bind_gpu)
+
+#define DRM_IOCTL_KGSL_GEM_UNBIND_GPU \
+DRM_IOWR(DRM_COMMAND_BASE + DRM_KGSL_GEM_UNBIND_GPU, \
+struct drm_kgsl_gem_bind_gpu)
+
+#define DRM_KGSL_GEM_TYPE_EBI 0
+#define DRM_KGSL_GEM_TYPE_SMI 1
+#define DRM_KGSL_GEM_TYPE_KMEM 2
+#define DRM_KGSL_GEM_TYPE_KMEM_NOCACHE 3
+
+struct drm_kgsl_gem_create {
+ uint32_t size;
+ uint32_t handle;
+};
+
+struct drm_kgsl_gem_prep {
+ uint32_t handle;
+ uint32_t phys;
+ uint64_t offset;
+};
+
+struct drm_kgsl_gem_memtype {
+ uint32_t handle;
+ uint32_t type;
+};
+
+struct drm_kgsl_gem_mmap {
+ uint32_t handle;
+ uint32_t size;
+ uint32_t hostptr;
+ uint64_t offset;
+};
+
+struct drm_kgsl_gem_alloc {
+ uint32_t handle;
+ uint64_t offset;
+};
+
+struct drm_kgsl_gem_bind_gpu {
+ uint32_t handle;
+ uint32_t gpuptr;
+};
+
+#endif
diff --git a/recipes/xorg-driver/xf86-video-msm/no_neon_cfbbd17f0d4ab0f30915594d74e1b2b12c4ff8a1.patch b/recipes/xorg-driver/xf86-video-msm/no_neon_cfbbd17f0d4ab0f30915594d74e1b2b12c4ff8a1.patch
new file mode 100644
index 0000000000..aa94f5d0ea
--- /dev/null
+++ b/recipes/xorg-driver/xf86-video-msm/no_neon_cfbbd17f0d4ab0f30915594d74e1b2b12c4ff8a1.patch
@@ -0,0 +1,98 @@
+Index: git/src/Makefile.am
+===================================================================
+--- git.orig/src/Makefile.am
++++ git/src/Makefile.am
+@@ -12,13 +12,7 @@ MSM_DRI_SRCS += msm-drm.c msm-dri2.c
+ msm_drv_la_LIBADD += $(DRI2_LIBS)
+ endif
+
+-NEON_CFLAGS=-march=armv7-a -mfpu=neon -mfloat-abi=softfp -Wa,-mfpu=neon
+-NEON_CCASFLAGS=$(NEON_CFLAGS) -mthumb-interwork
+-NEON_ASFLAGS=-k -mcpu=cortex-a8 $(NEON_CCASFLAGS)
+-
+-AM_CFLAGS = @XORG_CFLAGS@ @DRI_CFLAGS@ @DRI2_CFLAGS@ $(NEON_CFLAGS) -Wall -Werror
+-AM_ASFLAGS = $(NEON_ASFLAGS)
+-AM_CCASFLAGS = $(NEON_CCASFLAGS)
++AM_CFLAGS = @XORG_CFLAGS@ @DRI_CFLAGS@ @DRI2_CFLAGS@ -Wall -Werror
+
+ msm_drv_la_LTLIBRARIES = msm_drv.la
+ msm_drv_la_LDFLAGS = -module -avoid-version
+@@ -27,7 +21,6 @@ msm_drv_ladir = @moduledir@/drivers
+ msm_drv_la_SOURCES = \
+ msm-driver.c \
+ msm-exa.c \
+- msm-exa-neon.c \
+ msm-exa-mixed.c \
+ msm-video.c \
+ msm-output.c \
+@@ -37,13 +30,6 @@ msm_drv_la_SOURCES = \
+ msm-pixmap.c \
+ msm-utils.c \
+ mdp/mdp.c \
+- neon/neon.c \
+- neon/neon-alignedcopy.c \
+- neon/neon-fill.c \
+- neon/neon-memsets.c \
+- neon/neon-render.c \
+- neon/neon-memcpy.S \
+- neon/neon-memmove.S \
+ $(MSM_DRI_SRCS)
+
+
+@@ -51,4 +37,3 @@ EXTRA_DIST = \
+ msm.h \
+ msm_mdp.h \
+ msm-drm.h
+- neon/neon.h
+Index: git/src/msm-exa.c
+===================================================================
+--- git.orig/src/msm-exa.c
++++ git/src/msm-exa.c
+@@ -268,29 +268,8 @@ MSMSetupExa(ScreenPtr pScreen)
+ /* The maximum acceleratable pitch is 2048 pixels */
+ pExa->maxPitchPixels = 2048;
+
+- switch(pMsm->accelMode) {
+- case ACCEL_MODE_NEON:
+- pExa->PrepareSolid = neon_prepare_solid;
+- pExa->Solid = neon_do_solid;
+- pExa->DoneSolid = neon_done_solid;
+- pExa->PrepareCopy = neon_prepare_copy;
+- pExa->Copy = neon_do_copy;
+- pExa->DoneCopy = neon_done_copy;
+- break;
+-
+- case ACCEL_MODE_MIXED:
+- /* Mixed mode doesn't have a solid function, so re-use the
+- Neon function */
+- pExa->PrepareSolid = neon_prepare_solid;
+- pExa->Solid = neon_do_solid;
+- pExa->DoneSolid = neon_done_solid;
+- pExa->PrepareCopy = mixed_prepare_copy;
+- pExa->Copy = mixed_do_copy;
+- pExa->DoneCopy = mixed_done_copy;
+- break;
+- default:
+- return FALSE;
+- }
++ return FALSE;
++
+
+ pExa->WaitMarker = MSMWaitMarker;
+ pExa->DownloadFromScreen = MSMDownloadFromScreen;
+Index: git/src/msm.h
+===================================================================
+--- git.orig/src/msm.h
++++ git/src/msm.h
+@@ -200,11 +200,4 @@ Bool mixed_prepare_copy(PixmapPtr, Pixma
+ void mixed_do_copy(PixmapPtr, int, int, int, int, int, int);
+ void mixed_done_copy(PixmapPtr);
+
+-Bool neon_prepare_solid(PixmapPtr, int, Pixel, Pixel);
+-void neon_do_solid(PixmapPtr, int, int, int, int);
+-void neon_done_solid(PixmapPtr);
+-Bool neon_prepare_copy(PixmapPtr, PixmapPtr, int, int, int, Pixel);
+-void neon_do_copy(PixmapPtr, int, int, int, int, int, int);
+-void neon_done_copy(PixmapPtr);
+-
+ #endif
diff --git a/recipes/xorg-driver/xf86-video-msm_git.bb b/recipes/xorg-driver/xf86-video-msm_git.bb
index 4723b867f0..a7d7d6f106 100644
--- a/recipes/xorg-driver/xf86-video-msm_git.bb
+++ b/recipes/xorg-driver/xf86-video-msm_git.bb
@@ -2,17 +2,17 @@ require xorg-driver-video.inc
DESCRIPTION = "X.Org X server -- MSM display driver"
-PR_append = "d"
+PR_append = "e"
-SRCREV = "5f7df59155ae301a3ebc40aec22ed16d203cb5fc"
+SRCREV = "cfbbd17f0d4ab0f30915594d74e1b2b12c4ff8a1"
PV = "1.1.0+${PR}+gitr${SRCREV}"
PE = "1"
-SRC_URI = "git://codeaurora.org/quic/xwin/xf86-video-msm.git;protocol=git"
-SRC_URI_htcdream = "git://codeaurora.org/quic/xwin/xf86-video-msm.git;protocol=git \
- file://no_neon.patch;patch=1 \
- file://no_neon_flags.patch;patch=1 \
- file://renaming_variables.patch;patch=1"
+SRC_URI = "git://codeaurora.org/quic/xwin/xf86-video-msm.git;protocol=git;branch=chromium \
+ file://compile_cfbbd17f0d4ab0f30915594d74e1b2b12c4ff8a1.patch;patch=1 \
+ file://kgsl_drm.h "
+
+SRC_URI_append_htcdream = "file://no_neon_cfbbd17f0d4ab0f30915594d74e1b2b12c4ff8a1.patch;patch=1"
S = "${WORKDIR}/git"
@@ -20,3 +20,12 @@ CFLAGS += " -I${STAGING_INCDIR}/xorg "
CFLAGS += " -Wno-error "
ARM_INSTRUCTION_SET="arm"
+
+PACKAGE_ARCH="${MACHINE_ARCH}"
+
+do_compile_prepend() {
+ install -d ${S}/src/linux
+ install -d ${S}/src/drm
+ install -m 0644 ${STAGING_KERNEL_DIR}/include/linux/msm_mdp.h ${S}/src/linux/
+ install -m 0644 ${WORKDIR}/kgsl_drm.h ${S}/src/drm/
+}