debian/0000775000000000000000000000000012274402313007166 5ustar debian/README.source0000664000000000000000000000124611606053011011343 0ustar xf86-video-msm for Debian ------------------------- = kernel header: linux/msm_mdp.h = xserver-xorg-video-msm needs linux/msm_mdp.h. It is already in linux-kernel but not yet pulled into linux-libc-dev. We copy msm_mdp.h from linux-headers-2.6.39-2-common. Normally this header file won't have significant changes. If it changes a lot, xserver-xorg-video-msm should also extends itself. So we ship the header in Debian package currently. This header file should be deleted if linux-libc-dev includes it. Also maintainer of this package should regularily refresh the header from latest kernel. -- Ying-Chun Liu (PaulLiu) , Sat, 9 Jul 2011 21:22:17 +0800 debian/patches/0000775000000000000000000000000012220347510010613 5ustar debian/patches/01_fix_obsolete_x_functioncall.patch0000664000000000000000000002361712220347110017713 0ustar Description: Remove obsolete xfree, xmalloc, xcalloc calls xfree() -> free() xmalloc() -> malloc() xcalloc() -> calloc() Author: Ying-Chun Liu (PaulLiu) Last-Update: 2011-08-03 Index: xf86-video-msm-1.0.1+git20100122.5f7df591/src/msm-dri.c =================================================================== --- xf86-video-msm-1.0.1+git20100122.5f7df591.orig/src/msm-dri.c 2013-09-25 01:39:17.000000000 +0800 +++ xf86-video-msm-1.0.1+git20100122.5f7df591/src/msm-dri.c 2013-09-25 01:39:17.000000000 +0800 @@ -97,7 +97,7 @@ pMsm->dri->pDRIInfo->devPrivate; if (pMSMDRI) - xfree(pMSMDRI); + free(pMSMDRI); DRICloseScreen(pScreen); DRIDestroyInfoRec(pMsm->dri->pDRIInfo); @@ -144,7 +144,7 @@ pDRIInfo->drmDriverName = "msm_kgsl"; pDRIInfo->clientDriverName = "yamato"; - pDRIInfo->busIdString = xalloc(16); + pDRIInfo->busIdString = malloc(16); strcpy(pDRIInfo->busIdString, "platform:kgsl"); pDRIInfo->ddxDriverMajorVersion = 1; @@ -166,7 +166,7 @@ pDRIInfo->SAREASize = SAREA_MAX; - pMSMDRI = (MSMDRIPrivPtr) xcalloc(1, sizeof(*pMSMDRI)); + pMSMDRI = (MSMDRIPrivPtr) calloc(1, sizeof(*pMSMDRI)); if (pMSMDRI == NULL) { DRIDestroyInfoRec(pMsm->dri->pDRIInfo); @@ -195,7 +195,7 @@ if (!DRIScreenInit(pScreen, pDRIInfo, &pMsm->dri->drmFD)) { xf86DrvMsg(pScreen->myNum, X_ERROR, "MSM-DRI DRIScreenInit failed. Disabling DRI.\n"); - xfree(pDRIInfo->devPrivate); + free(pDRIInfo->devPrivate); pDRIInfo->devPrivate = NULL; DRIDestroyInfoRec(pDRIInfo); pDRIInfo = NULL; Index: xf86-video-msm-1.0.1+git20100122.5f7df591/src/msm-driver.c =================================================================== --- xf86-video-msm-1.0.1+git20100122.5f7df591.orig/src/msm-driver.c 2013-09-25 01:39:17.000000000 +0800 +++ xf86-video-msm-1.0.1+git20100122.5f7df591/src/msm-driver.c 2013-09-25 01:39:17.000000000 +0800 @@ -387,7 +387,7 @@ if (pMsm->fd < 0) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Opening '%s' failed: %s\n", dev, strerror(errno)); - xfree(pMsm); + free(pMsm); return FALSE; } @@ -403,7 +403,7 @@ xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Unable to read hardware info from %s: %s\n", dev, strerror(errno)); - xfree(pMsm); + free(pMsm); return FALSE; } @@ -414,7 +414,7 @@ xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Unable to determine the MDP and panel type\n"); - xfree(pMsm); + free(pMsm); return FALSE; } @@ -443,7 +443,7 @@ "Unable to read the current mode from %s: %s\n", dev, strerror(errno)); - xfree(pMsm); + free(pMsm); return FALSE; } @@ -454,7 +454,7 @@ && pMsm->mode_info.bits_per_pixel != 24) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "The driver can only support 16bpp and 24bpp output\n"); - xfree(pMsm); + free(pMsm); return FALSE; } @@ -476,7 +476,7 @@ default: xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "The driver can only support 16bpp and 24bpp output\n"); - xfree(pMsm); + free(pMsm); return FALSE; } @@ -484,7 +484,7 @@ Support24bppFb | Support32bppFb | SupportConvert32to24 | SupportConvert24to32)) { ErrorF("Unable to set bitdepth\n"); - xfree(pMsm); + free(pMsm); return FALSE; } @@ -492,13 +492,13 @@ pScrn->rgbBits = 8; if (!xf86SetWeight(pScrn, defaultWeight, defaultWeight)) { - xfree(pMsm); + free(pMsm); return FALSE; } /* Initialize default visual */ if (!xf86SetDefaultVisual(pScrn, -1)) { - xfree(pMsm); + free(pMsm); return FALSE; } @@ -506,7 +506,7 @@ Gamma zeros = { 0.0, 0.0, 0.0 }; if (!xf86SetGamma(pScrn, zeros)) { - xfree(pMsm); + free(pMsm); return FALSE; } } @@ -526,10 +526,10 @@ /* We need to allocate this memory here because we have multiple * screens, and we can't go writing on the MSMOptions structure */ - options = xalloc(sizeof(MSMOptions)); + options = malloc(sizeof(MSMOptions)); if (options == NULL) { - xfree(pMsm); + free(pMsm); return FALSE; } @@ -640,7 +640,7 @@ * I don't see any reason to do that unless we have other functions * that need it */ - xfree(options); + free(options); #if USEDRI2 if (pMsm->useDRI2 && !MSMInitDRM(pScrn)) { @@ -722,7 +722,7 @@ MSMOutputSetup(pScrn); if (!xf86InitialConfiguration(pScrn, FALSE)) { - xfree(pMsm); + free(pMsm); return FALSE; } @@ -800,7 +800,7 @@ /* Close EXA */ if (pMsm->accel && pMsm->pExa) { exaDriverFini(pScreen); - xfree(pMsm->pExa); + free(pMsm->pExa); pMsm->pExa = NULL; } @@ -902,7 +902,7 @@ #if USEDRI pMsm->DRIEnabled = FALSE; if (!pMsm->useDRI2 && pMsm->useDRI) { - pMsm->dri = xcalloc(1, sizeof(struct msm_dri)); + pMsm->dri = calloc(1, sizeof(struct msm_dri)); pMsm->dri->depthBits = pScrn->depth; pMsm->DRIEnabled = MSMDRIScreenInit(pScreen); } @@ -1139,7 +1139,7 @@ } } - xfree(sections); + free(sections); return foundScreen; } Index: xf86-video-msm-1.0.1+git20100122.5f7df591/src/msm-video.c =================================================================== --- xf86-video-msm-1.0.1+git20100122.5f7df591.orig/src/msm-video.c 2013-09-25 01:39:17.000000000 +0800 +++ xf86-video-msm-1.0.1+git20100122.5f7df591/src/msm-video.c 2013-09-25 01:39:17.000000000 +0800 @@ -704,7 +704,7 @@ int i; - adapt = xcalloc(1, sizeof(XF86VideoAdaptorRec) + + adapt = calloc(1, sizeof(XF86VideoAdaptorRec) + (sizeof(DevUnion) * pMsm->xvports) + (sizeof(MSMPortPrivRec) * pMsm->xvports)); @@ -771,7 +771,7 @@ count = xf86XVListGenericAdaptors(pScrn, &list); - newlist = xalloc((count + 1) * sizeof(XF86VideoAdaptorPtr *)); + newlist = malloc((count + 1) * sizeof(XF86VideoAdaptorPtr *)); if (newlist == NULL) return; @@ -782,5 +782,5 @@ xf86XVScreenInit(pScreen, newlist, count); - xfree(newlist); + free(newlist); } Index: xf86-video-msm-1.0.1+git20100122.5f7df591/src/msm-dri2.c =================================================================== --- xf86-video-msm-1.0.1+git20100122.5f7df591.orig/src/msm-dri2.c 2013-09-25 01:39:17.000000000 +0800 +++ xf86-video-msm-1.0.1+git20100122.5f7df591/src/msm-dri2.c 2013-09-25 01:39:17.000000000 +0800 @@ -64,14 +64,14 @@ PixmapPtr pixmap; int i; - buffers = xcalloc(count, sizeof(*buffers)); + buffers = calloc(count, sizeof(*buffers)); if (buffers == NULL) return NULL; - privates = xcalloc(count, sizeof(struct msm_dri2_priv)); + privates = calloc(count, sizeof(struct msm_dri2_priv)); if (privates == NULL) { - xfree(buffers); + free(buffers); return NULL; } @@ -129,14 +129,14 @@ struct msm_pixmap_priv *pixpriv; PixmapPtr pixmap; - buffer = xcalloc(1, sizeof(*buffer)); + buffer = calloc(1, sizeof(*buffer)); if (buffer == NULL) return NULL; - private = xcalloc(1, sizeof(struct msm_dri2_priv)); + private = calloc(1, sizeof(struct msm_dri2_priv)); if (private == NULL) { - xfree(buffer); + free(buffer); return NULL; } @@ -205,8 +205,8 @@ (*pScreen->DestroyPixmap)(priv->pixmap); } - xfree(buffers[0].driverPrivate); - xfree(buffers); + free(buffers[0].driverPrivate); + free(buffers); } #else static void @@ -221,8 +221,8 @@ priv = buffers->driverPrivate; (*pScreen->DestroyPixmap)(priv->pixmap); - xfree(buffers->driverPrivate); - xfree(buffers); + free(buffers->driverPrivate); + free(buffers); } #endif Index: xf86-video-msm-1.0.1+git20100122.5f7df591/src/msm-drm.c =================================================================== --- xf86-video-msm-1.0.1+git20100122.5f7df591.orig/src/msm-drm.c 2013-09-25 01:39:17.000000000 +0800 +++ xf86-video-msm-1.0.1+git20100122.5f7df591/src/msm-drm.c 2013-09-25 01:39:17.000000000 +0800 @@ -156,7 +156,7 @@ if (ret) return NULL; - bo = xcalloc(1, sizeof(struct msm_drm_bo)); + bo = calloc(1, sizeof(struct msm_drm_bo)); if (bo == NULL) return NULL; @@ -322,6 +322,6 @@ close.handle = bo->handle; ret = ioctl(bo->fd, DRM_IOCTL_GEM_CLOSE, &close); - xfree(bo); + free(bo); } Index: xf86-video-msm-1.0.1+git20100122.5f7df591/src/msm-exa.c =================================================================== --- xf86-video-msm-1.0.1+git20100122.5f7df591.orig/src/msm-exa.c 2013-09-25 01:39:17.000000000 +0800 +++ xf86-video-msm-1.0.1+git20100122.5f7df591/src/msm-exa.c 2013-09-25 01:39:17.000000000 +0800 @@ -679,7 +679,7 @@ ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; MSMPtr pMsm = MSMPTR(pScrn); - priv = xcalloc(1, sizeof(struct msm_pixmap_priv)); + priv = calloc(1, sizeof(struct msm_pixmap_priv)); if (priv == NULL) return NULL; @@ -692,7 +692,7 @@ if (priv->bo) return priv; - xfree(priv); + free(priv); return NULL; } @@ -707,7 +707,7 @@ if (priv->bo) msm_drm_bo_free(priv->bo); - xfree(dpriv); + free(dpriv); } Bool Index: xf86-video-msm-1.0.1+git20100122.5f7df591/src/msm-pixmap.c =================================================================== --- xf86-video-msm-1.0.1+git20100122.5f7df591.orig/src/msm-pixmap.c 2013-09-25 01:39:17.000000000 +0800 +++ xf86-video-msm-1.0.1+git20100122.5f7df591/src/msm-pixmap.c 2013-09-25 01:39:17.000000000 +0800 @@ -107,7 +107,7 @@ ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; MSMPtr pMsm = MSMPTR(pScrn); struct msm_offscreen_area *ret = - xcalloc(1, sizeof(struct msm_offscreen_area)); + calloc(1, sizeof(struct msm_offscreen_area)); if (ret == NULL) return NULL; @@ -148,7 +148,7 @@ } err: - xfree(ret); + free(ret); return NULL; } @@ -163,7 +163,7 @@ else if (area->type == MSM_OFFSCREEN_EXA) exaOffscreenFree(pScreen, (ExaOffscreenArea *) area->priv); - xfree(area); + free(area); } debian/patches/05_port_to_xorg_server_1.14.patch0000664000000000000000000000160512220347504016723 0ustar Description: Port to xorg-server 1.14 kill mibstore to fix building against 1.14 This patch is from Ubuntu xf86-video-msm (1.0.1+git20100122.5f7df591-3ubuntu3) Author: Maarten Lankhorst Index: xf86-video-msm-1.0.1+git20100122.5f7df591/src/msm-driver.c =================================================================== --- xf86-video-msm-1.0.1+git20100122.5f7df591.orig/src/msm-driver.c 2013-09-25 01:39:36.000000000 +0800 +++ xf86-video-msm-1.0.1+git20100122.5f7df591/src/msm-driver.c 2013-09-25 01:39:36.000000000 +0800 @@ -41,7 +41,6 @@ #include "xf86Crtc.h" #include "mipointer.h" -#include "mibstore.h" #include "micmap.h" #include "fb.h" #include "dixstruct.h" @@ -949,7 +948,6 @@ xf86SetBlackWhitePixels(pScreen); /* Set up the backing store */ - miInitializeBackingStore(pScreen); xf86SetBackingStore(pScreen); if (pMsm->accel) { debian/patches/series0000664000000000000000000000025212220347061012030 0ustar 01_fix_obsolete_x_functioncall.patch 02_fix_FTBFS_for_thumb.patch 03_port_to_xorg_server_1.12.1.patch 04_port_to_xorg_server_1.13.patch 05_port_to_xorg_server_1.14.patch debian/patches/03_port_to_xorg_server_1.12.1.patch0000664000000000000000000000164012220347122017051 0ustar Description: Port to xorg-server 1.12.1 There are some API changes in xorg-server 1.12.1. This patch fix the FTBFS after xorg-server updates to 1.12.1 Bug-Debian: http://bugs.debian.org/671806 Author: Ying-Chun Liu (PaulLiu) Last-Update: 2012-05-09 Index: xf86-video-msm-1.0.1+git20100122.5f7df591/src/msm-driver.c =================================================================== --- xf86-video-msm-1.0.1+git20100122.5f7df591.orig/src/msm-driver.c 2013-09-25 01:39:28.000000000 +0800 +++ xf86-video-msm-1.0.1+git20100122.5f7df591/src/msm-driver.c 2013-09-25 01:39:28.000000000 +0800 @@ -340,7 +340,8 @@ { MSMPtr pMsm; EntityInfoPtr pEnt; - char *dev, *gid, *str; + const char *dev; + char *gid, *str; int mdpver, panelid; int depth, fbbpp; OptionInfoPtr options; @@ -1054,7 +1055,7 @@ int nsects; - char *dev; + const char *dev; Bool foundScreen = FALSE; debian/patches/02_fix_FTBFS_for_thumb.patch0000664000000000000000000000156412220347116015724 0ustar Subject: Fix FTBFS for assembly files Author: Ying-Chun Liu (PaulLiu) Last-Update: 2012-03-18 Index: xf86-video-msm-1.0.1+git20100122.5f7df591/src/Makefile.am =================================================================== --- xf86-video-msm-1.0.1+git20100122.5f7df591.orig/src/Makefile.am 2013-09-25 01:39:23.000000000 +0800 +++ xf86-video-msm-1.0.1+git20100122.5f7df591/src/Makefile.am 2013-09-25 01:39:23.000000000 +0800 @@ -12,8 +12,8 @@ msm_drv_la_LIBADD += $(DRI2_LIBS) endif -NEON_CFLAGS=-march=armv7-a -mfpu=neon -mfloat-abi=softfp -NEON_CCASFLAGS=$(NEON_CFLAGS) -mthumb-interwork +NEON_CFLAGS=-march=armv7-a -mfpu=neon -Wa,-mimplicit-it=thumb +NEON_CCASFLAGS=$(NEON_CFLAGS) -mthumb-interwork -Wa,--noexecstack NEON_ASFLAGS=-k -mcpu=cortex-a8 $(NEON_CCASFLAGS) AM_CFLAGS = @XORG_CFLAGS@ @DRI_CFLAGS@ @DRI2_CFLAGS@ $(NEON_CFLAGS) -Wall -Werror debian/patches/04_port_to_xorg_server_1.13.patch0000664000000000000000000003675012220347353016734 0ustar Description: Port to xorg-server 1.13 Patch to work against new abi. This patch is from Ubuntu xf86-video-msm (1.0.1+git20100122.5f7df591-3ubuntu2) Author: Matthias Klose Index: xf86-video-msm-1.0.1+git20100122.5f7df591/src/Makefile.am =================================================================== --- xf86-video-msm-1.0.1+git20100122.5f7df591.orig/src/Makefile.am 2013-09-25 01:39:33.000000000 +0800 +++ xf86-video-msm-1.0.1+git20100122.5f7df591/src/Makefile.am 2013-09-25 01:39:33.000000000 +0800 @@ -40,6 +40,7 @@ neon_memsets.c \ neon_memcpy.S \ neon_memmove.S \ + compat-api.h \ $(MSM_DRI_SRCS) Index: xf86-video-msm-1.0.1+git20100122.5f7df591/src/msm-cursor.c =================================================================== --- xf86-video-msm-1.0.1+git20100122.5f7df591.orig/src/msm-cursor.c 2013-09-25 01:39:33.000000000 +0800 +++ xf86-video-msm-1.0.1+git20100122.5f7df591/src/msm-cursor.c 2013-09-25 01:39:33.000000000 +0800 @@ -115,7 +115,7 @@ Bool MSMCursorInit(ScreenPtr pScreen) { - ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); MSMPtr pMsm = MSMPTR(pScrn); Index: xf86-video-msm-1.0.1+git20100122.5f7df591/src/msm-dri2.c =================================================================== --- xf86-video-msm-1.0.1+git20100122.5f7df591.orig/src/msm-dri2.c 2013-09-25 01:39:33.000000000 +0800 +++ xf86-video-msm-1.0.1+git20100122.5f7df591/src/msm-dri2.c 2013-09-25 01:39:33.000000000 +0800 @@ -273,7 +273,7 @@ MSMDRI2ScreenInit(ScreenPtr pScreen) { DRI2InfoRec info; - ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); MSMPtr pMsm = MSMPTR(pScrn); if (pMsm->drmFD <= 0) { Index: xf86-video-msm-1.0.1+git20100122.5f7df591/src/msm-dri.c =================================================================== --- xf86-video-msm-1.0.1+git20100122.5f7df591.orig/src/msm-dri.c 2013-09-25 01:39:33.000000000 +0800 +++ xf86-video-msm-1.0.1+git20100122.5f7df591/src/msm-dri.c 2013-09-25 01:39:33.000000000 +0800 @@ -89,7 +89,7 @@ void MSMDRICloseScreen(ScreenPtr pScreen) { - ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); MSMPtr pMsm = MSMPTR(pScrn); @@ -106,16 +106,16 @@ } static Bool -MSMDRIDoCloseScreen(int scrnIndex, ScreenPtr pScreen) +MSMDRIDoCloseScreen(CLOSE_SCREEN_ARGS_DECL) { - ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); MSMPtr pMsm = MSMPTR(pScrn); MSMDRICloseScreen(pScreen); pScreen->CloseScreen = pMsm->dri->DRICloseScreen; - return (*pScreen->CloseScreen) (scrnIndex, pScreen); + return (*pScreen->CloseScreen) (CLOSE_SCREEN_ARGS); } static void @@ -126,7 +126,7 @@ Bool MSMDRIScreenInit(ScreenPtr pScreen) { - ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); MSMPtr pMsm = MSMPTR(pScrn); @@ -210,7 +210,7 @@ Bool MSMDRIFinishScreenInit(ScreenPtr pScreen) { - ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); MSMPtr pMsm = MSMPTR(pScrn); Index: xf86-video-msm-1.0.1+git20100122.5f7df591/src/msm-driver.c =================================================================== --- xf86-video-msm-1.0.1+git20100122.5f7df591.orig/src/msm-driver.c 2013-09-25 01:39:33.000000000 +0800 +++ xf86-video-msm-1.0.1+git20100122.5f7df591/src/msm-driver.c 2013-09-25 01:39:33.000000000 +0800 @@ -792,9 +792,9 @@ } static Bool -MSMCloseScreen(int scrnIndex, ScreenPtr pScreen) +MSMCloseScreen(CLOSE_SCREEN_ARGS_DECL) { - ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); MSMPtr pMsm = MSMPTR(pScrn); @@ -816,13 +816,13 @@ pScreen->CloseScreen = pMsm->CloseScreen; - return (*pScreen->CloseScreen) (scrnIndex, pScreen); + return (*pScreen->CloseScreen) (CLOSE_SCREEN_ARGS); } static Bool -MSMScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) +MSMScreenInit(SCREEN_INIT_ARGS_DECL) { - ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); MSMPtr pMsm = MSMPTR(pScrn); @@ -840,14 +840,14 @@ // then set the frame buffer cache settings. // Otherwise, issue a warning and continue. if (ioctl(pMsm->fd, MSMFB_GET_PAGE_PROTECTION, &fb_page_protection)) { - xf86DrvMsg(scrnIndex, X_WARNING, + xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "MSMFB_GET_PAGE_PROTECTION IOCTL: Unable to get current FB cache settings.\n"); } else { if (fb_page_protection.page_protection != desired_fb_page_protection) { fb_page_protection.page_protection = desired_fb_page_protection; if (ioctl(pMsm->fd, MSMFB_SET_PAGE_PROTECTION, &fb_page_protection)) { - xf86DrvMsg(scrnIndex, X_ERROR, + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "MSMFB_SET_PAGE_PROTECTION IOCTL: Unable to set requested FB cache settings: %s.\n", fbCacheStrings[desired_fb_page_protection]); return FALSE; @@ -864,7 +864,7 @@ /* If we can't map the memory, then this is a short trip */ if (pMsm->fbmem == MAP_FAILED) { - xf86DrvMsg(scrnIndex, X_ERROR, "Unable to map the " + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Unable to map the " "framebuffer memory: %s\n", strerror(errno)); return FALSE; } @@ -873,7 +873,7 @@ * but it makes RandR all happy */ if (!xf86SetDesiredModes(pScrn)) { - xf86DrvMsg(scrnIndex, X_ERROR, "Unable to set the mode"); + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Unable to set the mode"); return FALSE; } @@ -885,13 +885,13 @@ if (!miSetVisualTypes(pScrn->depth, TrueColorMask, pScrn->rgbBits, TrueColor)) { - xf86DrvMsg(scrnIndex, X_ERROR, "Unable to set up the visual" + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Unable to set up the visual" " for %d BPP\n", pScrn->bitsPerPixel); return FALSE; } if (!miSetPixmapDepths()) { - xf86DrvMsg(scrnIndex, X_ERROR, "Unable to set the pixmap depth\n"); + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Unable to set the pixmap depth\n"); return FALSE; } @@ -918,7 +918,7 @@ pScrn->xDpi, pScrn->yDpi, pScrn->displayWidth, pScrn->bitsPerPixel)) { - xf86DrvMsg(scrnIndex, X_ERROR, "fbScreenInit failed\n"); + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "fbScreenInit failed\n"); return FALSE; } @@ -941,7 +941,7 @@ /* Set up the Render fallbacks */ if (!fbPictureInit(pScreen, NULL, 0)) { - xf86DrvMsg(scrnIndex, X_ERROR, "fbPictureInit failed\n"); + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "fbPictureInit failed\n"); return FALSE; } @@ -971,7 +971,7 @@ /* Set up the default colormap */ if (!miCreateDefColormap(pScreen)) { - xf86DrvMsg(scrnIndex, X_ERROR, "miCreateDefColormap failed\n"); + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "miCreateDefColormap failed\n"); return FALSE; } @@ -993,7 +993,7 @@ pScreen->CloseScreen = MSMCloseScreen; if (!xf86CrtcScreenInit(pScreen)) { - xf86DrvMsg(scrnIndex, X_ERROR, "CRTCScreenInit failed\n"); + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "CRTCScreenInit failed\n"); return FALSE; } @@ -1001,7 +1001,7 @@ } static Bool -MSMSwitchMode(int scrnIndex, DisplayModePtr mode, int flags) +MSMSwitchMode(SWITCH_MODE_ARGS_DECL) { /* FIXME: We should only have the one mode, so we shouldn't ever call * this function - regardless, it needs to be stubbed - so what @@ -1011,7 +1011,7 @@ } static Bool -MSMEnterVT(int ScrnIndex, int flags) +MSMEnterVT(VT_FUNC_ARGS_DECL) { /* Nothing to do here yet - there might be some triggers that we need * to throw at the framebuffer */ @@ -1020,7 +1020,7 @@ } static void -MSMLeaveVT(int ScrnIndex, int flags) +MSMLeaveVT(VT_FUNC_ARGS_DECL) { /* Restore any framebufferish things here */ } Index: xf86-video-msm-1.0.1+git20100122.5f7df591/src/msm-exa.c =================================================================== --- xf86-video-msm-1.0.1+git20100122.5f7df591.orig/src/msm-exa.c 2013-09-25 01:39:33.000000000 +0800 +++ xf86-video-msm-1.0.1+git20100122.5f7df591/src/msm-exa.c 2013-09-25 01:39:33.000000000 +0800 @@ -64,7 +64,7 @@ #define INT(_x) xFixedToInt(_x) #define MSMPTR_FROM_PIXMAP(_x) \ - MSMPTR(xf86Screens[(_x)->drawable.pScreen->myNum]) + MSMPTR(xf86ScreenToScrn((_x)->drawable.pScreen)) /* This is a local scratch structure used to store information */ static struct @@ -676,7 +676,7 @@ MSMCreatePixmap(ScreenPtr pScreen, int size, int align) { struct msm_pixmap_priv *priv; - ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); MSMPtr pMsm = MSMPTR(pScrn); priv = calloc(1, sizeof(struct msm_pixmap_priv)); @@ -713,7 +713,7 @@ Bool MSMSetupExa(ScreenPtr pScreen) { - ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); MSMPtr pMsm = MSMPTR(pScrn); Index: xf86-video-msm-1.0.1+git20100122.5f7df591/src/msm.h =================================================================== --- xf86-video-msm-1.0.1+git20100122.5f7df591.orig/src/msm.h 2013-09-25 01:39:33.000000000 +0800 +++ xf86-video-msm-1.0.1+git20100122.5f7df591/src/msm.h 2013-09-25 01:39:33.000000000 +0800 @@ -33,6 +33,7 @@ #include "xf86.h" #include "damage.h" #include "exa.h" +#include "compat-api.h" #if USEDRI #define _XF86DRI_SERVER_ @@ -44,7 +45,9 @@ #include #include +#ifndef ARRAY_SIZE #define ARRAY_SIZE(a) (sizeof((a)) / (sizeof(*(a)))) +#endif typedef enum { @@ -64,7 +67,7 @@ int numVisualConfigs; __GLXvisualConfig *pVisualConfigs; - Bool(*DRICloseScreen) (int, ScreenPtr); + Bool(*DRICloseScreen) (CLOSE_SCREEN_ARGS_DECL); } MSMDRIRec, *MSMDRIPtr; typedef struct Index: xf86-video-msm-1.0.1+git20100122.5f7df591/src/msm-pixmap.c =================================================================== --- xf86-video-msm-1.0.1+git20100122.5f7df591.orig/src/msm-pixmap.c 2013-09-25 01:39:33.000000000 +0800 +++ xf86-video-msm-1.0.1+git20100122.5f7df591/src/msm-pixmap.c 2013-09-25 01:39:33.000000000 +0800 @@ -35,7 +35,7 @@ #include "msm-drm.h" #define MSMPTR_FROM_PIXMAP(_x) \ - MSMPTR(xf86Screens[(_x)->drawable.pScreen->myNum]) + MSMPTR(xf86ScreenToScrn((_x)->drawable.pScreen)) int msm_pixmap_offset(PixmapPtr pixmap) @@ -104,7 +104,7 @@ struct msm_offscreen_area * msm_alloc_offscreen_memory(ScreenPtr pScreen, int size) { - ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); MSMPtr pMsm = MSMPTR(pScrn); struct msm_offscreen_area *ret = calloc(1, sizeof(struct msm_offscreen_area)); Index: xf86-video-msm-1.0.1+git20100122.5f7df591/src/msm-video.c =================================================================== --- xf86-video-msm-1.0.1+git20100122.5f7df591.orig/src/msm-video.c 2013-09-25 01:39:33.000000000 +0800 +++ xf86-video-msm-1.0.1+git20100122.5f7df591/src/msm-video.c 2013-09-25 01:39:33.000000000 +0800 @@ -694,7 +694,7 @@ static XF86VideoAdaptorPtr MSMInitAdaptor(ScreenPtr pScreen) { - ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); MSMPtr pMsm = MSMPTR(pScrn); @@ -758,7 +758,7 @@ void MSMInitVideo(ScreenPtr pScreen) { - ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); XF86VideoAdaptorPtr adapt = MSMInitAdaptor(pScreen); Index: xf86-video-msm-1.0.1+git20100122.5f7df591/src/compat-api.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ xf86-video-msm-1.0.1+git20100122.5f7df591/src/compat-api.h 2013-09-25 01:39:33.000000000 +0800 @@ -0,0 +1,99 @@ + /* + * Copyright 2012 Red Hat, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS 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 + * DEALINGS IN THE SOFTWARE. + * + * Author: Dave Airlie + */ + +/* this file provides API compat between server post 1.13 and pre it, + it should be reused inside as many drivers as possible */ +#ifndef COMPAT_API_H +#define COMPAT_API_H + +#ifndef GLYPH_HAS_GLYPH_PICTURE_ACCESSOR +#define GetGlyphPicture(g, s) GlyphPicture((g))[(s)->myNum] +#define SetGlyphPicture(g, s, p) GlyphPicture((g))[(s)->myNum] = p +#endif + +#ifndef XF86_HAS_SCRN_CONV +#define xf86ScreenToScrn(s) xf86Screens[(s)->myNum] +#define xf86ScrnToScreen(s) screenInfo.screens[(s)->scrnIndex] +#endif + +#ifndef XF86_SCRN_INTERFACE + +#define SCRN_ARG_TYPE int +#define SCRN_INFO_PTR(arg1) ScrnInfoPtr pScrn = xf86Screens[(arg1)] + +#define SCREEN_ARG_TYPE int +#define SCREEN_PTR(arg1) ScreenPtr pScreen = screenInfo.screens[(arg1)] + +#define SCREEN_INIT_ARGS_DECL int scrnIndex, ScreenPtr pScreen, int argc, char **argv + +#define BLOCKHANDLER_ARGS_DECL int arg, pointer blockData, pointer pTimeout, pointer pReadmask +#define BLOCKHANDLER_ARGS arg, blockData, pTimeout, pReadmask + +#define CLOSE_SCREEN_ARGS_DECL int scrnIndex, ScreenPtr pScreen +#define CLOSE_SCREEN_ARGS scrnIndex, pScreen + +#define ADJUST_FRAME_ARGS_DECL int arg, int x, int y, int flags +#define ADJUST_FRAME_ARGS(arg, x, y) (arg)->scrnIndex, x, y, 0 + +#define SWITCH_MODE_ARGS_DECL int arg, DisplayModePtr mode, int flags +#define SWITCH_MODE_ARGS(arg, m) (arg)->scrnIndex, m, 0 + +#define FREE_SCREEN_ARGS_DECL int arg, int flags + +#define VT_FUNC_ARGS_DECL int arg, int flags +#define VT_FUNC_ARGS pScrn->scrnIndex, 0 + +#define XF86_SCRN_ARG(x) ((x)->scrnIndex) +#else +#define SCRN_ARG_TYPE ScrnInfoPtr +#define SCRN_INFO_PTR(arg1) ScrnInfoPtr pScrn = (arg1) + +#define SCREEN_ARG_TYPE ScreenPtr +#define SCREEN_PTR(arg1) ScreenPtr pScreen = (arg1) + +#define SCREEN_INIT_ARGS_DECL ScreenPtr pScreen, int argc, char **argv + +#define BLOCKHANDLER_ARGS_DECL ScreenPtr arg, pointer pTimeout, pointer pReadmask +#define BLOCKHANDLER_ARGS arg, pTimeout, pReadmask + +#define CLOSE_SCREEN_ARGS_DECL ScreenPtr pScreen +#define CLOSE_SCREEN_ARGS pScreen + +#define ADJUST_FRAME_ARGS_DECL ScrnInfoPtr arg, int x, int y +#define ADJUST_FRAME_ARGS(arg, x, y) arg, x, y + +#define SWITCH_MODE_ARGS_DECL ScrnInfoPtr arg, DisplayModePtr mode +#define SWITCH_MODE_ARGS(arg, m) arg, m + +#define FREE_SCREEN_ARGS_DECL ScrnInfoPtr arg + +#define VT_FUNC_ARGS_DECL ScrnInfoPtr arg +#define VT_FUNC_ARGS pScrn + +#define XF86_SCRN_ARG(x) (x) + +#endif + +#endif debian/rules0000775000000000000000000000232511616261653010261 0ustar #!/usr/bin/make -f DEB_SOURCE := $(shell dpkg-parsechangelog | grep Source: | sed -e 's/Source: //') DEB_VERSION := $(shell dpkg-parsechangelog | grep Version: | sed -e 's/Version: //') DEB_UPSTREAM_VERSION := $(shell echo $(DEB_VERSION) | sed -e 's/-[^-]*$$//') GIT_URL = git://codeaurora.org/quic/xwin/xf86-video-msm.git %: dh $@ --with autoreconf,xsf override_dh_autoreconf: dh_autoreconf ./autogen.sh override_dh_auto_configure: dh_auto_configure -- --with-kernel-headers=$(CURDIR)/debian/include \ CFLAGS="$(CFLAGS) -Wno-error=unused-but-set-variable" override_dh_strip: dh_strip --dbg-package=xserver-xorg-video-msm-dbg get-orig-source: set -e; if echo $(DEB_VERSION) | grep -c "git"; \ then \ git_version=`echo $(DEB_VERSION) | sed -e 's/^.*git\([0-9]*\)*\.\(.*\)-.*$$/\2/g'`; \ else \ git_version=$(DEB_UPSTREAM_VERSION); \ fi; \ tmpdir=`mktemp -d -t`; \ cd $$tmpdir; \ echo "checkout upstream repository ..."; \ git clone $(GIT_URL); echo "getting specific upstream revision/tag: $$git_version"; \ cd `ls | head -n 1`; git checkout -b orig $$git_version; cd ..; \ tar --exclude=.git -czvf $(CURDIR)/$(DEB_SOURCE)_$(DEB_UPSTREAM_VERSION).orig.tar.gz `ls | head -n 1`; \ cd $(CURDIR); \ rm -rf $$tmpdir debian/copyright0000664000000000000000000001274611752475605011151 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: xf86-video-msm Source: https://www.codeaurora.org/index.php?xwinp Files: * Copyright: 2009 Code Aurora Forum. License: 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. Files: debian/* Copyright: 2011 Ying-Chun Liu (PaulLiu) License: 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. Files: debian/include/linux/msm_mdp.h Copyright: 2007 Google Incorporated 2009-2010 Code Aurora Forum. License: GPL-2 This software is licensed under the terms of the GNU General Public License version 2, as published by the Free Software Foundation, and may be copied, distributed, and modified under those terms. . This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. . On Debian systems, the full text of the GNU General Public License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'. Files: debian/include/drm/kgsl_drm.h Copyright: 2009-2010 Code Aurora Forum. License: 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. debian/source/0000775000000000000000000000000011606046507010475 5ustar debian/source/format0000664000000000000000000000001411606046507011703 0ustar 3.0 (quilt) debian/control0000664000000000000000000000247712220353415010602 0ustar Source: xf86-video-msm Section: x11 Priority: optional Maintainer: Ying-Chun Liu (PaulLiu) Build-Depends: debhelper (>= 8), dh-autoreconf, pkg-config, xserver-xorg-dev (>= 2:1.14), x11proto-core-dev, libx11-dev, libdrm-dev, libgl1-mesa-dev | libgl-dev, libxext-dev, x11proto-xf86dri-dev, x11proto-gl-dev, x11proto-randr-dev, x11proto-render-dev, x11proto-xext-dev, x11proto-video-dev, xutils-dev Standards-Version: 3.9.4 Homepage: https://www.codeaurora.org/ Package: xserver-xorg-video-msm Architecture: armhf Depends: ${shlibs:Depends}, ${misc:Depends}, ${xviddriver:Depends} Provides: ${xviddriver:Provides} Description: MSM/QSD X Window Enablement Project X driver for MSM/QSD arm chipsets found in portables/cell phones, such as the HTC Dream and the Nexus One. Package: xserver-xorg-video-msm-dbg Architecture: armhf Depends: xserver-xorg-video-msm (= ${binary:Version}), ${misc:Depends} Section: debug Priority: extra Description: MSM/QSD X Window Enablement Project (debug symbols) X driver for MSM/QSD arm chipsets found in portables/cell phones, such as the HTC Dream and the Nexus One. . This package provides debugging symbols for this Xorg X driver. debian/docs0000664000000000000000000000000711606046507010045 0ustar README debian/compat0000664000000000000000000000000212220353404010361 0ustar 8 debian/include/0000775000000000000000000000000011616016312010610 5ustar debian/include/linux/0000775000000000000000000000000011613367273011763 5ustar debian/include/linux/msm_mdp.h0000664000000000000000000001521011613367266013571 0ustar /* include/linux/msm_mdp.h * * Copyright (C) 2007 Google Incorporated * Copyright (c) 2009-2010, Code Aurora Forum. All rights reserved. * * This software is licensed under the terms of the GNU General Public * License version 2, as published by the Free Software Foundation, and * may be copied, distributed, and modified under those terms. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. */ #ifndef _MSM_MDP_H_ #define _MSM_MDP_H_ #include #include #define MSMFB_IOCTL_MAGIC 'm' #define MSMFB_GRP_DISP _IOW(MSMFB_IOCTL_MAGIC, 1, unsigned int) #define MSMFB_BLIT _IOW(MSMFB_IOCTL_MAGIC, 2, unsigned int) #define MSMFB_SUSPEND_SW_REFRESHER _IOW(MSMFB_IOCTL_MAGIC, 128, unsigned int) #define MSMFB_RESUME_SW_REFRESHER _IOW(MSMFB_IOCTL_MAGIC, 129, unsigned int) #define MSMFB_CURSOR _IOW(MSMFB_IOCTL_MAGIC, 130, struct fb_cursor) #define MSMFB_SET_LUT _IOW(MSMFB_IOCTL_MAGIC, 131, struct fb_cmap) #define MSMFB_HISTOGRAM _IOWR(MSMFB_IOCTL_MAGIC, 132, struct mdp_histogram) /* new ioctls's for set/get ccs matrix */ #define MSMFB_GET_CCS_MATRIX _IOWR(MSMFB_IOCTL_MAGIC, 133, struct mdp_ccs) #define MSMFB_SET_CCS_MATRIX _IOW(MSMFB_IOCTL_MAGIC, 134, struct mdp_ccs) #define MSMFB_OVERLAY_SET _IOWR(MSMFB_IOCTL_MAGIC, 135, \ struct mdp_overlay) #define MSMFB_OVERLAY_UNSET _IOW(MSMFB_IOCTL_MAGIC, 136, unsigned int) #define MSMFB_OVERLAY_PLAY _IOW(MSMFB_IOCTL_MAGIC, 137, \ struct msmfb_overlay_data) #define MSMFB_GET_PAGE_PROTECTION _IOR(MSMFB_IOCTL_MAGIC, 138, \ struct mdp_page_protection) #define MSMFB_SET_PAGE_PROTECTION _IOW(MSMFB_IOCTL_MAGIC, 139, \ struct mdp_page_protection) #define MSMFB_OVERLAY_GET _IOR(MSMFB_IOCTL_MAGIC, 140, \ struct mdp_overlay) /* new ioctls for async MDP ops */ #define MSMFB_ASYNC_BLIT _IOW(MSMFB_IOCTL_MAGIC, 141, unsigned int) #define MSMFB_BLIT_FLUSH _IOR(MSMFB_IOCTL_MAGIC, 142, unsigned int) #define MDP_IMGTYPE2_START 0x10000 enum { MDP_RGB_565, /* RGB 565 planer */ MDP_XRGB_8888, /* RGB 888 padded */ MDP_Y_CBCR_H2V2, /* Y and CbCr, pseudo planer w/ Cb is in MSB */ MDP_ARGB_8888, /* ARGB 888 */ MDP_RGB_888, /* RGB 888 planer */ MDP_Y_CRCB_H2V2, /* Y and CrCb, pseudo planer w/ Cr is in MSB */ MDP_YCRYCB_H2V1, /* YCrYCb interleave */ MDP_Y_CRCB_H2V1, /* Y and CrCb, pseduo planer w/ Cr is in MSB */ MDP_Y_CBCR_H2V1, /* Y and CrCb, pseduo planer w/ Cr is in MSB */ MDP_RGBA_8888, /* ARGB 888 */ MDP_BGRA_8888, /* ABGR 888 */ MDP_Y_CRCB_H2V2_TILE, /* Y and CrCb, pseudo planer tile */ MDP_Y_CBCR_H2V2_TILE, /* Y and CbCr, pseudo planer tile */ MDP_IMGTYPE_LIMIT, MDP_BGR_565 = MDP_IMGTYPE2_START, /* BGR 565 planer */ MDP_FB_FORMAT, /* framebuffer format */ MDP_IMGTYPE_LIMIT2 /* Non valid image type after this enum */ }; enum { PMEM_IMG, FB_IMG, }; /* mdp_blit_req flag values */ #define MDP_ROT_NOP 0 #define MDP_FLIP_LR 0x1 #define MDP_FLIP_UD 0x2 #define MDP_ROT_90 0x4 #define MDP_ROT_180 (MDP_FLIP_UD|MDP_FLIP_LR) #define MDP_ROT_270 (MDP_ROT_90|MDP_FLIP_UD|MDP_FLIP_LR) #define MDP_DITHER 0x8 #define MDP_BLUR 0x10 #define MDP_BLEND_FG_PREMULT 0x20000 #define MDP_DEINTERLACE 0x80000000 #define MDP_SHARPENING 0x40000000 #define MDP_NO_DMA_BARRIER_START 0x20000000 #define MDP_NO_DMA_BARRIER_END 0x10000000 #define MDP_NO_BLIT 0x08000000 #define MDP_BLIT_WITH_DMA_BARRIERS 0x000 #define MDP_BLIT_WITH_NO_DMA_BARRIERS \ (MDP_NO_DMA_BARRIER_START | MDP_NO_DMA_BARRIER_END) #define MDP_TRANSP_NOP 0xffffffff #define MDP_ALPHA_NOP 0xff #define MDP_BLIT_SRC_GEM 0x02000000 /* set for GEM, clear for PMEM */ #define MDP_BLIT_DST_GEM 0x01000000 /* set for GEM, clear for PMEM */ #define MDP_FB_PAGE_PROTECTION_NONCACHED (0) #define MDP_FB_PAGE_PROTECTION_WRITECOMBINE (1) #define MDP_FB_PAGE_PROTECTION_WRITETHROUGHCACHE (2) #define MDP_FB_PAGE_PROTECTION_WRITEBACKCACHE (3) #define MDP_FB_PAGE_PROTECTION_WRITEBACKWACACHE (4) /* Sentinel: Don't use! */ #define MDP_FB_PAGE_PROTECTION_INVALID (5) /* Count of the number of MDP_FB_PAGE_PROTECTION_... values. */ #define MDP_NUM_FB_PAGE_PROTECTION_VALUES (5) struct mdp_rect { uint32_t x; uint32_t y; uint32_t w; uint32_t h; }; struct mdp_img { uint32_t width; uint32_t height; uint32_t format; uint32_t offset; int memory_id; /* the file descriptor */ uint32_t priv; }; /* * {3x3} + {3} ccs matrix */ #define MDP_CCS_RGB2YUV 0 #define MDP_CCS_YUV2RGB 1 #define MDP_CCS_SIZE 9 #define MDP_BV_SIZE 3 struct mdp_ccs { int direction; /* MDP_CCS_RGB2YUV or YUV2RGB */ uint16_t ccs[MDP_CCS_SIZE]; /* 3x3 color coefficients */ uint16_t bv[MDP_BV_SIZE]; /* 1x3 bias vector */ }; /* The version of the mdp_blit_req structure so that * user applications can selectively decide which functionality * to include */ #define MDP_BLIT_REQ_VERSION 2 struct mdp_blit_req { struct mdp_img src; struct mdp_img dst; struct mdp_rect src_rect; struct mdp_rect dst_rect; uint32_t alpha; uint32_t transp_mask; uint32_t flags; int sharpening_strength; /* -127 <--> 127, default 64 */ }; struct mdp_blit_req_list { uint32_t count; struct mdp_blit_req req[]; }; struct msmfb_data { uint32_t offset; int memory_id; int id; }; #define MSMFB_NEW_REQUEST -1 struct msmfb_overlay_data { uint32_t id; struct msmfb_data data; }; struct msmfb_img { uint32_t width; uint32_t height; uint32_t format; }; struct mdp_overlay { struct msmfb_img src; struct mdp_rect src_rect; struct mdp_rect dst_rect; uint32_t z_order; /* stage number */ uint32_t is_fg; /* control alpha & transp */ uint32_t alpha; uint32_t transp_mask; uint32_t flags; uint32_t id; uint32_t user_data[8]; }; struct mdp_histogram { uint32_t frame_cnt; uint32_t bin_cnt; uint32_t *r; uint32_t *g; uint32_t *b; }; struct mdp_page_protection { uint32_t page_protection; }; struct msm_panel_common_pdata { int gpio; int (*backlight_level)(int level, int max, int min); int (*pmic_backlight)(int level); int (*panel_num)(void); void (*panel_config_gpio)(int); int *gpio_num; }; struct lcdc_platform_data { int (*lcdc_gpio_config)(int on); void (*lcdc_power_save)(int); }; struct tvenc_platform_data { int (*pm_vid_en)(int on); }; struct mddi_platform_data { void (*mddi_power_save)(int on); int (*mddi_sel_clk)(uint32_t *clk_rate); }; struct msm_fb_platform_data { int (*detect_client)(const char *name); int mddi_prescan; int (*allow_set_offset)(void); }; struct msm_hdmi_platform_data { int irq; int (*cable_detect)(int insert); }; #endif /*_MSM_MDP_H_*/ debian/include/drm/0000775000000000000000000000000011616016316011376 5ustar debian/include/drm/kgsl_drm.h0000664000000000000000000001205711616016316013356 0ustar /* Copyright (c) 2009-2010, 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 Forum, Inc. 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 "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_KGSL_GEM_GET_BUFINFO 0x08 #define DRM_KGSL_GEM_SET_BUFCOUNT 0x09 #define DRM_KGSL_GEM_SET_ACTIVE 0x0A #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_IOCTL_KGSL_GEM_GET_BUFINFO \ DRM_IOWR(DRM_COMMAND_BASE + DRM_KGSL_GEM_GET_BUFINFO, \ struct drm_kgsl_gem_bufinfo) #define DRM_IOCTL_KGSL_GEM_SET_BUFCOUNT \ DRM_IOWR(DRM_COMMAND_BASE + DRM_KGSL_GEM_SET_BUFCOUNT, \ struct drm_kgsl_gem_bufcount) #define DRM_IOCTL_KGSL_GEM_SET_ACTIVE \ DRM_IOWR(DRM_COMMAND_BASE + DRM_KGSL_GEM_SET_ACTIVE, \ struct drm_kgsl_gem_active) /* Maximum number of sub buffers per GEM object */ #define DRM_KGSL_GEM_MAX_BUFFERS 2 /* Memory types - these define the source and caching policies of the GEM memory chunk */ /* Legacy definitions left for compatability */ #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 #define DRM_KGSL_GEM_TYPE_MEM_MASK 0xF /* Contiguous memory (PMEM) */ #define DRM_KGSL_GEM_TYPE_PMEM 0x000100 /* PMEM memory types */ #define DRM_KGSL_GEM_PMEM_EBI 0x001000 #define DRM_KGSL_GEM_PMEM_SMI 0x002000 /* Standard paged memory */ #define DRM_KGSL_GEM_TYPE_MEM 0x010000 /* Caching controls */ #define DRM_KGSL_GEM_CACHE_NONE 0x000000 #define DRM_KGSL_GEM_CACHE_WCOMBINE 0x100000 #define DRM_KGSL_GEM_CACHE_WTHROUGH 0x200000 #define DRM_KGSL_GEM_CACHE_WBACK 0x400000 #define DRM_KGSL_GEM_CACHE_WBACKWA 0x800000 #define DRM_KGSL_GEM_CACHE_MASK 0xF00000 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; }; struct drm_kgsl_gem_bufinfo { uint32_t handle; uint32_t count; uint32_t active; uint32_t offset[DRM_KGSL_GEM_MAX_BUFFERS]; uint32_t gpuaddr[DRM_KGSL_GEM_MAX_BUFFERS]; }; struct drm_kgsl_gem_bufcount { uint32_t handle; uint32_t bufcount; }; struct drm_kgsl_gem_active { uint32_t handle; uint32_t active; }; #endif debian/xserver-xorg-video-msm.install0000664000000000000000000000005011616023157015126 0ustar usr/lib/xorg/modules/drivers/msm_drv.so debian/changelog0000664000000000000000000000266612274402312011051 0ustar xf86-video-msm (1.0.1+git20100122.5f7df591-4build1) trusty; urgency=medium * Rebuild for xorg 1.15 abi. -- Maarten Lankhorst Wed, 05 Feb 2014 09:30:41 +0000 xf86-video-msm (1.0.1+git20100122.5f7df591-4) unstable; urgency=low * Add debian/patches/04_port_to_xorg_server_1.13.patch: port to xorg 1.13 * Add debian/patches/05_port_to_xorg_server_1.14.patch: port to xorg 1.14 (Closes: #724322) * Bump Standards-Version to 3.9.4: nothing needs to be changed -- Ying-Chun Liu (PaulLiu) Wed, 25 Sep 2013 02:20:59 +0800 xf86-video-msm (1.0.1+git20100122.5f7df591-3) unstable; urgency=low * 03_port_to_xorg_server_1.12.1.patch: Fix FTBFS on X server 1.12.1 (Closes: #671806) -- Ying-Chun Liu (PaulLiu) Wed, 09 May 2012 22:20:03 +0800 xf86-video-msm (1.0.1+git20100122.5f7df591-2) unstable; urgency=low * Change to armhf architecture (Closes: #645798) - This package only runs on armv7+neon, so we remove armel support. * Bump Standards-Version to 3.9.3: nothing needs to be changed * Bump debhelper compat 8 -- Ying-Chun Liu (PaulLiu) Sun, 18 Mar 2012 18:23:11 +0800 xf86-video-msm (1.0.1+git20100122.5f7df591-1) unstable; urgency=low [ Ying-Chun Liu (PaulLiu) ] * Initial release (Closes: #568826) [ Emmet Hikory ] * Migrate to XSFBS -- Ying-Chun Liu (PaulLiu) Tue, 02 Aug 2011 21:37:32 +0800