diff options
| author | Koen Kooi <koen@openembedded.org> | 2009-01-06 19:43:42 +0100 |
|---|---|---|
| committer | Koen Kooi <koen@openembedded.org> | 2009-01-06 19:43:42 +0100 |
| commit | 665c67013b9d1a70467742fb35ac16be1fe7180f (patch) | |
| tree | 7b00eab4603ab826f3ae15f5f97b0b7f0c734c04 | |
| parent | 785b8609e69082befd9a3a4a6f369d2101b1b884 (diff) | |
linux-omap 2.6.27: remove outdated PVR patch since we have external modules now
| -rw-r--r-- | packages/linux/linux-omap-2.6.27/pvr/dispc.patch | 46 | ||||
| -rw-r--r-- | packages/linux/linux-omap-2.6.27/pvr/nokia-TI.diff | 8798 | ||||
| -rw-r--r-- | packages/linux/linux-omap-2.6.27/pvr/pvr-add.patch | 155099 | ||||
| -rw-r--r-- | packages/linux/linux-omap_2.6.27.bb | 5 |
4 files changed, 1 insertions, 163947 deletions
diff --git a/packages/linux/linux-omap-2.6.27/pvr/dispc.patch b/packages/linux/linux-omap-2.6.27/pvr/dispc.patch deleted file mode 100644 index 1697448e0a..0000000000 --- a/packages/linux/linux-omap-2.6.27/pvr/dispc.patch +++ /dev/null @@ -1,46 +0,0 @@ ---- kernel-2.6.27.orig/drivers/video/omap/dispc.c -+++ kernel-2.6.27/drivers/video/omap/dispc.c -@@ -314,6 +319,32 @@ - } - EXPORT_SYMBOL(omap_dispc_enable_digit_out); - -+extern void omap_dispc_set_plane_base(int plane, u32 paddr) -+{ -+ u32 reg; -+ u32 val; -+ -+ switch (plane) { -+ case 0: -+ reg = DISPC_GFX_BA0; -+ break; -+ case 1: -+ reg = DISPC_VID1_BASE + DISPC_VID_BA0; -+ break; -+ case 2: -+ reg = DISPC_VID2_BASE + DISPC_VID_BA0; -+ break; -+ default: -+ BUG(); -+ return; -+ } -+ -+ dispc_write_reg(reg, paddr); -+ val = dispc_read_reg(DISPC_CONTROL) | (1 << 5); /* GOLCD */ -+ dispc_write_reg(DISPC_CONTROL, val); -+} -+EXPORT_SYMBOL(omap_dispc_set_plane_base); -+ - static inline int _setup_plane(int plane, int channel_out, - u32 paddr, int screen_width, - int pos_x, int pos_y, int width, int height, ---- /tmp/dispc.h 2008-12-09 15:13:12.000000000 +0100 -+++ git/drivers/video/omap/dispc.h 2008-12-09 15:13:36.000000000 +0100 -@@ -32,6 +32,8 @@ - #define DISPC_TFT_DATA_LINES_18 2 - #define DISPC_TFT_DATA_LINES_24 3 - -+extern void omap_dispc_set_plane_base(int plane, u32 paddr); -+ - extern void omap_dispc_set_lcd_size(int width, int height); - - extern void omap_dispc_enable_lcd_out(int enable); diff --git a/packages/linux/linux-omap-2.6.27/pvr/nokia-TI.diff b/packages/linux/linux-omap-2.6.27/pvr/nokia-TI.diff deleted file mode 100644 index a4aca1e524..0000000000 --- a/packages/linux/linux-omap-2.6.27/pvr/nokia-TI.diff +++ /dev/null @@ -1,8798 +0,0 @@ - include4/img_types.h | 5 - include4/pdumpdefs.h | 1 - include4/pvrmodule.h | 31 - include4/pvrversion.h | 8 - include4/services.h | 46 - include4/servicesext.h | 6 - include4/sgxapi_km.h | 65 - services4/3rdparty/bufferclass_example/bufferclass_example.c | 32 - services4/3rdparty/bufferclass_example/bufferclass_example.h | 25 - services4/3rdparty/bufferclass_example/bufferclass_example_linux.c | 20 - services4/3rdparty/bufferclass_example/bufferclass_example_private.c | 76 - - services4/3rdparty/bufferclass_example/kbuild/Makefile | 40 - services4/3rdparty/dc_omap3430_linux/kbuild/Makefile | 39 - services4/3rdparty/dc_omap3430_linux/omaplfb.h | 7 - services4/3rdparty/dc_omap3430_linux/omaplfb_displayclass.c | 60 - services4/3rdparty/dc_omap3430_linux/omaplfb_linux.c | 52 - services4/include/pvr_bridge.h | 26 - services4/include/servicesint.h | 17 - services4/include/sgx_bridge.h | 95 + - services4/include/sgx_bridge_km.h | 139 - - services4/include/sgxinfo.h | 347 ++-- - services4/srvkm/Makefile | 68 - services4/srvkm/bridged/bridged_pvr_bridge.c | 732 ++++++++- - services4/srvkm/common/deviceclass.c | 6 - services4/srvkm/common/devicemem.c | 3 - services4/srvkm/common/handle.c | 58 - services4/srvkm/common/power.c | 15 - services4/srvkm/common/pvrsrv.c | 151 +- - services4/srvkm/common/queue.c | 4 - services4/srvkm/common/resman.c | 13 - services4/srvkm/devices/sgx/mmu.c | 2 - services4/srvkm/devices/sgx/mmu.h | 2 - services4/srvkm/devices/sgx/pb.c | 37 - services4/srvkm/devices/sgx/sgx2dcore.c | 21 - services4/srvkm/devices/sgx/sgx_bridge_km.h | 158 ++ - services4/srvkm/devices/sgx/sgxinfokm.h | 146 + - services4/srvkm/devices/sgx/sgxinit.c | 734 ++-------- - services4/srvkm/devices/sgx/sgxkick.c | 327 +++- - services4/srvkm/devices/sgx/sgxreset.c | 330 ++++ - services4/srvkm/devices/sgx/sgxtransfer.c | 312 ++++ - services4/srvkm/devices/sgx/sgxutils.c | 459 +++--- - services4/srvkm/devices/sgx/sgxutils.h | 28 - services4/srvkm/env/linux/env_data.h | 8 - services4/srvkm/env/linux/event.c | 221 +++ - services4/srvkm/env/linux/event.h | 32 - services4/srvkm/env/linux/kbuild/Makefile | 81 + - services4/srvkm/env/linux/mm.c | 8 - services4/srvkm/env/linux/module.c | 342 +++- - services4/srvkm/env/linux/osfunc.c | 347 +++- - services4/srvkm/env/linux/pdump.c | 13 - services4/srvkm/env/linux/proc.c | 17 - services4/srvkm/env/linux/pvr_debug.c | 2 - services4/srvkm/hwdefs/sgxdefs.h | 4 - services4/srvkm/hwdefs/sgxerrata.h | 9 - services4/srvkm/hwdefs/sgxfeaturedefs.h | 11 - services4/srvkm/include/device.h | 35 - services4/srvkm/include/handle.h | 10 - services4/srvkm/include/osfunc.h | 32 - services4/srvkm/include/pdump_km.h | 2 - services4/srvkm/include/resman.h | 5 - services4/srvkm/include/srvkm.h | 4 - services4/system/include/syscommon.h | 2 - services4/system/omap3430/sysconfig.c | 24 - services4/system/omap3430/sysconfig.h | 7 - services4/system/omap3430/sysutils.c | 2 - 65 files changed, 4286 insertions(+), 1675 deletions(-) - - -diff -Nurd git/drivers/gpu/pvr/include4/img_types.h git/drivers/gpu/pvr/include4/img_types.h ---- git/drivers/gpu/pvr/include4/img_types.h 2009-01-05 20:00:44.000000000 +0100 -+++ git/drivers/gpu/pvr/include4/img_types.h 2008-12-18 15:47:29.000000000 +0100 -@@ -43,7 +43,10 @@ - typedef signed long IMG_INT32, *IMG_PINT32; - - #if defined(LINUX) -- -+#if !defined(USE_CODE) -+ typedef unsigned long long IMG_UINT64, *IMG_PUINT64; -+ typedef long long IMG_INT64, *IMG_PINT64; -+#endif - #else - - #error("define an OS") -diff -Nurd git/drivers/gpu/pvr/include4/pdumpdefs.h git/drivers/gpu/pvr/include4/pdumpdefs.h ---- git/drivers/gpu/pvr/include4/pdumpdefs.h 2009-01-05 20:00:44.000000000 +0100 -+++ git/drivers/gpu/pvr/include4/pdumpdefs.h 2008-12-18 15:47:29.000000000 +0100 -@@ -73,6 +73,7 @@ - PVRSRV_PDUMP_MEM_FORMAT_RESERVED = 1, - PVRSRV_PDUMP_MEM_FORMAT_TILED = 8, - PVRSRV_PDUMP_MEM_FORMAT_TWIDDLED = 9, -+ PVRSRV_PDUMP_MEM_FORMAT_HYBRID = 10, - - PVRSRV_PDUMP_MEM_FORMAT_FORCE_I32 = 0x7fffffff - } PDUMP_MEM_FORMAT; -diff -Nurd git/drivers/gpu/pvr/include4/pvrmodule.h git/drivers/gpu/pvr/include4/pvrmodule.h ---- git/drivers/gpu/pvr/include4/pvrmodule.h 1970-01-01 01:00:00.000000000 +0100 -+++ git/drivers/gpu/pvr/include4/pvrmodule.h 2008-12-18 15:47:29.000000000 +0100 -@@ -0,0 +1,31 @@ -+/********************************************************************** -+ * -+ * Copyright(c) 2008 Imagination Technologies Ltd. All rights reserved. -+ * -+ * This program is free software; you can redistribute it and/or modify it -+ * under the terms and conditions of the GNU General Public License, -+ * version 2, as published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope it will be useful but, except -+ * as otherwise stated in writing, 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. -+ * -+ * You should have received a copy of the GNU General Public License along with -+ * this program; if not, write to the Free Software Foundation, Inc., -+ * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. -+ * -+ * The full GNU General Public License is included in this distribution in -+ * the file called "COPYING". -+ * -+ * Contact Information: -+ * Imagination Technologies Ltd. <gpl-support@imgtec.com> -+ * Home Park Estate, Kings Langley, Herts, WD4 8LZ, UK -+ * -+ ******************************************************************************/ -+ -+#ifndef _PVRMODULE_H_ -+#define _PVRMODULE_H_ -+MODULE_AUTHOR("Imagination Technologies Ltd. <gpl-support@imgtec.com>"); -+MODULE_LICENSE("GPL"); -+#endif -diff -Nurd git/drivers/gpu/pvr/include4/pvrversion.h git/drivers/gpu/pvr/include4/pvrversion.h ---- git/drivers/gpu/pvr/include4/pvrversion.h 2009-01-05 20:00:44.000000000 +0100 -+++ git/drivers/gpu/pvr/include4/pvrversion.h 2008-12-18 15:47:29.000000000 +0100 -@@ -28,10 +28,10 @@ - #define _PVRVERSION_H_ - - #define PVRVERSION_MAJ 1 --#define PVRVERSION_MIN 1 --#define PVRVERSION_BRANCH 11 --#define PVRVERSION_BUILD 970 --#define PVRVERSION_STRING "1.1.11.970" -+#define PVRVERSION_MIN 2 -+#define PVRVERSION_BRANCH 12 -+#define PVRVERSION_BUILD 838 -+#define PVRVERSION_STRING "1.2.12.838" - - #endif - -diff -Nurd git/drivers/gpu/pvr/include4/servicesext.h git/drivers/gpu/pvr/include4/servicesext.h ---- git/drivers/gpu/pvr/include4/servicesext.h 2009-01-05 20:00:44.000000000 +0100 -+++ git/drivers/gpu/pvr/include4/servicesext.h 2008-12-18 15:47:29.000000000 +0100 -@@ -150,6 +150,8 @@ - PVRSRV_PIXEL_FORMAT_V8U8, - PVRSRV_PIXEL_FORMAT_V16U16, - PVRSRV_PIXEL_FORMAT_QWVU8888, -+ PVRSRV_PIXEL_FORMAT_XLVU8888, -+ PVRSRV_PIXEL_FORMAT_QWVU16, - PVRSRV_PIXEL_FORMAT_D16, - PVRSRV_PIXEL_FORMAT_D24S8, - PVRSRV_PIXEL_FORMAT_D24X8, -@@ -159,7 +161,9 @@ - PVRSRV_PIXEL_FORMAT_YUY2, - PVRSRV_PIXEL_FORMAT_DXT23, - PVRSRV_PIXEL_FORMAT_DXT45, -- PVRSRV_PIXEL_FORMAT_G32R32F, -+ PVRSRV_PIXEL_FORMAT_G32R32F, -+ PVRSRV_PIXEL_FORMAT_NV11, -+ PVRSRV_PIXEL_FORMAT_NV12, - - PVRSRV_PIXEL_FORMAT_FORCE_I32 = 0x7fffffff, - } PVRSRV_PIXEL_FORMAT; -diff -Nurd git/drivers/gpu/pvr/include4/services.h git/drivers/gpu/pvr/include4/services.h ---- git/drivers/gpu/pvr/include4/services.h 2009-01-05 20:00:44.000000000 +0100 -+++ git/drivers/gpu/pvr/include4/services.h 2008-12-18 15:47:29.000000000 +0100 -@@ -36,16 +36,14 @@ - #include "pdumpdefs.h" - - --#if defined(SERVICES4) - #define IMG_CONST const --#else --#define IMG_CONST --#endif - - #define PVRSRV_MAX_CMD_SIZE 1024 - - #define PVRSRV_MAX_DEVICES 16 - -+#define EVENTOBJNAME_MAXLENGTH (50) -+ - #define PVRSRV_MEM_READ (1<<0) - #define PVRSRV_MEM_WRITE (1<<1) - #define PVRSRV_MEM_CACHE_CONSISTENT (1<<2) -@@ -90,6 +88,7 @@ - #define PVRSRV_MISC_INFO_TIMER_PRESENT (1<<0) - #define PVRSRV_MISC_INFO_CLOCKGATE_PRESENT (1<<1) - #define PVRSRV_MISC_INFO_MEMSTATS_PRESENT (1<<2) -+#define PVRSRV_MISC_INFO_GLOBALEVENTOBJECT_PRESENT (1<<3) - - #define PVRSRV_PDUMP_MAX_FILENAME_SIZE 20 - #define PVRSRV_PDUMP_MAX_COMMENT_SIZE 200 -@@ -133,7 +132,8 @@ - IMG_OPENGLES2 = 0x00000003, - IMG_D3DM = 0x00000004, - IMG_SRV_UM = 0x00000005, -- IMG_OPENVG = 0x00000006 -+ IMG_OPENVG = 0x00000006, -+ IMG_SRVCLIENT = 0x00000007, - - } IMG_MODULE_ID; - -@@ -202,10 +202,8 @@ - - IMG_PVOID pvLinAddr; - --#if defined(SERVICES4) - - IMG_PVOID pvLinAddrKM; --#endif - - - IMG_DEV_VIRTADDR sDevVAddr; -@@ -294,6 +292,14 @@ - - } PVRSRV_DEVICE_IDENTIFIER; - -+typedef struct _PVRSRV_EVENTOBJECT_ -+{ -+ -+ IMG_CHAR szName[EVENTOBJNAME_MAXLENGTH]; -+ -+ IMG_HANDLE hOSEventKM; -+ -+} PVRSRV_EVENTOBJECT; - - typedef struct _PVRSRV_MISC_INFO_ - { -@@ -313,9 +319,14 @@ - IMG_UINT32 ui32MemoryStrLen; - - -+ PVRSRV_EVENTOBJECT sGlobalEventObject; -+ IMG_HANDLE hOSGlobalEvent; -+ -+ - - } PVRSRV_MISC_INFO; - -+ - IMG_IMPORT - PVRSRV_ERROR IMG_CALLCONV PVRSRVConnect(PVRSRV_CONNECTION *psConnection); - -@@ -335,7 +346,7 @@ - PVRSRV_ERROR IMG_CALLCONV PVRSRVGetMiscInfo (IMG_CONST PVRSRV_CONNECTION *psConnection, PVRSRV_MISC_INFO *psMiscInfo); - - IMG_IMPORT --PVRSRV_ERROR IMG_CALLCONV PVRSRVReleaseMiscInfo (PVRSRV_MISC_INFO *psMiscInfo); -+PVRSRV_ERROR IMG_CALLCONV PVRSRVReleaseMiscInfo (IMG_CONST PVRSRV_CONNECTION *psConnection, PVRSRV_MISC_INFO *psMiscInfo); - - #if 1 - IMG_IMPORT -@@ -348,7 +359,9 @@ - #endif - - IMG_IMPORT --PVRSRV_ERROR PollForValue (volatile IMG_UINT32 *pui32LinMemAddr, -+PVRSRV_ERROR PollForValue ( PVRSRV_CONNECTION *psConnection, -+ IMG_HANDLE hOSEvent, -+ volatile IMG_UINT32 *pui32LinMemAddr, - IMG_UINT32 ui32Value, - IMG_UINT32 ui32Mask, - IMG_UINT32 ui32Waitus, -@@ -631,21 +644,18 @@ - IMG_UINT32 ui32RegValue, - IMG_UINT32 ui32Flags); - --#ifdef SERVICES4 - IMG_IMPORT - PVRSRV_ERROR IMG_CALLCONV PVRSRVPDumpRegPolWithFlags(IMG_CONST PVRSRV_CONNECTION *psConnection, - IMG_UINT32 ui32RegAddr, - IMG_UINT32 ui32RegValue, - IMG_UINT32 ui32Mask, - IMG_UINT32 ui32Flags); --#endif - IMG_IMPORT - PVRSRV_ERROR IMG_CALLCONV PVRSRVPDumpRegPol(IMG_CONST PVRSRV_CONNECTION *psConnection, - IMG_UINT32 ui32RegAddr, - IMG_UINT32 ui32RegValue, - IMG_UINT32 ui32Mask); - --#ifdef SERVICES4 - IMG_IMPORT - PVRSRV_ERROR IMG_CALLCONV PVRSRVPDumpPDReg(IMG_CONST PVRSRV_CONNECTION *psConnection, - IMG_UINT32 ui32RegAddr, -@@ -655,7 +665,6 @@ - PVRSRV_CLIENT_MEM_INFO *psMemInfo, - IMG_UINT32 ui32Offset, - IMG_DEV_PHYADDR sPDDevPAddr); --#endif - - IMG_IMPORT - PVRSRV_ERROR IMG_CALLCONV PVRSRVPDumpMemPages(IMG_CONST PVRSRV_CONNECTION *psConnection, -@@ -676,7 +685,6 @@ - IMG_CONST IMG_CHAR *pszComment, - IMG_BOOL bContinuous); - --#if defined(SERVICES4) - IMG_IMPORT - PVRSRV_ERROR IMG_CALLCONV PVRSRVPDumpCommentf(IMG_CONST PVRSRV_CONNECTION *psConnection, - IMG_BOOL bContinuous, -@@ -686,7 +694,6 @@ - PVRSRV_ERROR IMG_CALLCONV PVRSRVPDumpCommentWithFlagsf(IMG_CONST PVRSRV_CONNECTION *psConnection, - IMG_UINT32 ui32Flags, - IMG_CONST IMG_CHAR *pszFormat, ...); --#endif - - IMG_IMPORT - PVRSRV_ERROR IMG_CALLCONV PVRSRVPDumpDriverInfo(IMG_CONST PVRSRV_CONNECTION *psConnection, -@@ -718,7 +725,7 @@ - IMG_UINT32 ui32Size, - IMG_UINT32 ui32PDumpFlags); - --#ifdef SERVICES4 -+ - IMG_IMPORT - IMG_BOOL IMG_CALLCONV PVRSRVPDumpIsCapturingTest(IMG_CONST PVRSRV_CONNECTION *psConnection); - -@@ -726,7 +733,6 @@ - PVRSRV_ERROR IMG_CALLCONV PVRSRVPDumpCycleCountRegRead(IMG_CONST PVRSRV_CONNECTION *psConnection, - IMG_UINT32 ui32RegOffset, - IMG_BOOL bLastFrame); --#endif - - IMG_IMPORT IMG_HANDLE PVRSRVLoadLibrary(IMG_CHAR *pszLibraryName); - IMG_IMPORT PVRSRV_ERROR PVRSRVUnloadLibrary(IMG_HANDLE hExtDrv); -@@ -777,9 +783,9 @@ - IMG_PVOID PVRSRVReallocUserModeMemTracking(IMG_VOID *pvMem, IMG_UINT32 ui32NewSize, IMG_CHAR *pszFileName, IMG_UINT32 ui32LineNumber); - #endif - --PVRSRV_ERROR PVRSRVEventObjectWait(PVRSRV_CONNECTION *psConnection, -- IMG_HANDLE hOSEvent, -- IMG_UINT32 ui32MSTimeout); -+IMG_IMPORT -+PVRSRV_ERROR PVRSRVEventObjectWait(PVRSRV_CONNECTION * psConnection, -+ IMG_HANDLE hOSEvent); - - #define TIME_NOT_PASSED_UINT32(a,b,c) ((a - b) < c) - -diff -Nurd git/drivers/gpu/pvr/include4/sgxapi_km.h git/drivers/gpu/pvr/include4/sgxapi_km.h ---- git/drivers/gpu/pvr/include4/sgxapi_km.h 2009-01-05 20:00:44.000000000 +0100 -+++ git/drivers/gpu/pvr/include4/sgxapi_km.h 2008-12-18 15:47:29.000000000 +0100 -@@ -32,6 +32,7 @@ - #endif - - #include "sgxdefs.h" -+ - #if defined(__linux__) && !defined(USE_CODE) - #if defined(__KERNEL__) - #include <asm/unistd.h> -@@ -64,6 +65,8 @@ - #define SGX_MAX_TA_STATUS_VALS 32 - #define SGX_MAX_3D_STATUS_VALS 2 - -+#define SGX_MAX_SRC_SYNCS 4 -+ - #define PFLAGS_POWERDOWN 0x00000001 - #define PFLAGS_POWERUP 0x00000002 - -@@ -75,11 +78,60 @@ - IMG_SYS_PHYADDR sPhysBase; - }SGX_SLAVE_PORT; - -+#ifdef SUPPORT_SGX_HWPERF -+ -+#define PVRSRV_SGX_HWPERF_CBSIZE 0x100 -+ -+#define PVRSRV_SGX_HWPERF_INVALID 1 -+#define PVRSRV_SGX_HWPERF_TRANSFER 2 -+#define PVRSRV_SGX_HWPERF_TA 3 -+#define PVRSRV_SGX_HWPERF_3D 4 -+ -+#define PVRSRV_SGX_HWPERF_ON 0x40 -+ -+ -+typedef struct _PVRSRV_SGX_HWPERF_CBDATA_ -+{ -+ IMG_UINT32 ui32FrameNo; -+ IMG_UINT32 ui32Type; -+ IMG_UINT32 ui32StartTimeWraps; -+ IMG_UINT32 ui32StartTime; -+ IMG_UINT32 ui32EndTimeWraps; -+ IMG_UINT32 ui32EndTime; -+ IMG_UINT32 ui32ClockSpeed; -+ IMG_UINT32 ui32TimeMax; -+} PVRSRV_SGX_HWPERF_CBDATA; -+ -+typedef struct _PVRSRV_SGX_HWPERF_CB_ -+{ -+ IMG_UINT32 ui32Woff; -+ IMG_UINT32 ui32Roff; -+ PVRSRV_SGX_HWPERF_CBDATA psHWPerfCBData[PVRSRV_SGX_HWPERF_CBSIZE]; -+} PVRSRV_SGX_HWPERF_CB; -+ -+ -+typedef struct _SGX_MISC_INFO_HWPERF_RETRIEVE_CB -+{ -+ PVRSRV_SGX_HWPERF_CBDATA* psHWPerfData; -+ IMG_UINT32 ui32ArraySize; -+ IMG_UINT32 ui32DataCount; -+ IMG_UINT32 ui32Time; -+} SGX_MISC_INFO_HWPERF_RETRIEVE_CB; -+#endif -+ -+ - typedef enum _SGX_MISC_INFO_REQUEST_ - { -+ SGX_MISC_INFO_REQUEST_CLOCKSPEED = 0, -+#ifdef SUPPORT_SGX_HWPERF -+ SGX_MISC_INFO_REQUEST_HWPERF_CB_ON, -+ SGX_MISC_INFO_REQUEST_HWPERF_CB_OFF, -+ SGX_MISC_INFO_REQUEST_HWPERF_RETRIEVE_CB, -+#endif - SGX_MISC_INFO_REQUEST_FORCE_I16 = 0x7fff - } SGX_MISC_INFO_REQUEST; - -+ - typedef struct _SGX_MISC_INFO_ - { - SGX_MISC_INFO_REQUEST eRequest; -@@ -87,6 +139,10 @@ - union - { - IMG_UINT32 reserved; -+ IMG_UINT32 ui32SGXClockSpeed; -+#ifdef SUPPORT_SGX_HWPERF -+ SGX_MISC_INFO_HWPERF_RETRIEVE_CB sRetrieveCB; -+#endif - } uData; - } SGX_MISC_INFO; - -@@ -162,6 +218,15 @@ - } PVR3DIF4_KICKTA_PDUMP, *PPVR3DIF4_KICKTA_PDUMP; - #endif - -+#if defined(TRANSFER_QUEUE) -+#if defined(SGX_FEATURE_2D_HARDWARE) -+#define SGX_MAX_2D_BLIT_CMD_SIZE 26 -+#define SGX_MAX_2D_SRC_SYNC_OPS 3 -+#endif -+#define SGX_MAX_TRANSFER_STATUS_VALS 64 -+#define SGX_MAX_TRANSFER_SYNC_OPS 5 -+#endif -+ - #if defined (__cplusplus) - } - #endif -diff -Nurd git/drivers/gpu/pvr/services4/3rdparty/bufferclass_example/bufferclass_example.c git/drivers/gpu/pvr/services4/3rdparty/bufferclass_example/bufferclass_example.c ---- git/drivers/gpu/pvr/services4/3rdparty/bufferclass_example/bufferclass_example.c 2009-01-05 20:00:44.000000000 +0100 -+++ git/drivers/gpu/pvr/services4/3rdparty/bufferclass_example/bufferclass_example.c 2008-12-18 15:47:29.000000000 +0100 -@@ -197,11 +197,27 @@ - return PVRSRV_ERROR_OUT_OF_MEMORY; - } - -+ -+ -+ psDevInfo->sBufferInfo.pixelformat = BC_EXAMPLE_PIXELFORMAT; -+ psDevInfo->sBufferInfo.ui32Width = BC_EXAMPLE_WIDTH; -+ psDevInfo->sBufferInfo.ui32Height = BC_EXAMPLE_HEIGHT; -+ psDevInfo->sBufferInfo.ui32ByteStride = BC_EXAMPLE_STRIDE; -+ psDevInfo->sBufferInfo.ui32BufferDeviceID = BC_EXAMPLE_DEVICEID; -+ psDevInfo->sBufferInfo.ui32Flags = PVRSRV_BC_FLAGS_YUVCSC_FULL_RANGE | PVRSRV_BC_FLAGS_YUVCSC_BT601; -+ - for(i=0; i < BC_EXAMPLE_NUM_BUFFERS; i++) - { -+ IMG_UINT32 ui32Size = BC_EXAMPLE_HEIGHT * BC_EXAMPLE_STRIDE; -+ -+ if(psDevInfo->sBufferInfo.pixelformat == PVRSRV_PIXEL_FORMAT_YUV420) -+ { -+ -+ ui32Size += ((BC_EXAMPLE_STRIDE >> 1) * (BC_EXAMPLE_HEIGHT >> 1) << 1); -+ } - - -- if (AllocContigMemory(BC_EXAMPLE_HEIGHT * BC_EXAMPLE_STRIDE, -+ if (AllocContigMemory(ui32Size, - &psDevInfo->psSystemBuffer[i].hMemHandle, - &psDevInfo->psSystemBuffer[i].sCPUVAddr, - &sSystemBufferCPUPAddr) != PVRSRV_OK) -@@ -211,12 +227,14 @@ - - psDevInfo->ui32NumBuffers++; - -- psDevInfo->psSystemBuffer[i].ui32Size = BC_EXAMPLE_HEIGHT * BC_EXAMPLE_STRIDE; -+ psDevInfo->psSystemBuffer[i].ui32Size = ui32Size; - psDevInfo->psSystemBuffer[i].sSysAddr = CpuPAddrToSysPAddr(sSystemBufferCPUPAddr); - psDevInfo->psSystemBuffer[i].sPageAlignSysAddr.uiAddr = (psDevInfo->psSystemBuffer[i].sSysAddr.uiAddr & 0xFFFFF000); - psDevInfo->psSystemBuffer[i].psSyncData = IMG_NULL; - } - -+ psDevInfo->sBufferInfo.ui32BufferCount = psDevInfo->ui32NumBuffers; -+ - - - psDevInfo->sBCJTable.ui32TableSize = sizeof(PVRSRV_BC_SRV2BUFFER_KMJTABLE); -@@ -234,16 +252,6 @@ - { - return PVRSRV_ERROR_DEVICE_REGISTER_FAILED; - } -- -- -- -- psDevInfo->sBufferInfo.pixelformat = BC_EXAMPLE_PIXELFORMAT; -- psDevInfo->sBufferInfo.ui32Width = BC_EXAMPLE_WIDTH; -- psDevInfo->sBufferInfo.ui32Height = BC_EXAMPLE_HEIGHT; -- psDevInfo->sBufferInfo.ui32ByteStride = BC_EXAMPLE_STRIDE; -- psDevInfo->sBufferInfo.ui32BufferDeviceID = BC_EXAMPLE_DEVICEID; -- psDevInfo->sBufferInfo.ui32Flags = PVRSRV_BC_FLAGS_YUVCSC_FULL_RANGE | PVRSRV_BC_FLAGS_YUVCSC_BT601; -- psDevInfo->sBufferInfo.ui32BufferCount = psDevInfo->ui32NumBuffers; - } - - -diff -Nurd git/drivers/gpu/pvr/services4/3rdparty/bufferclass_example/bufferclass_example.h git/drivers/gpu/pvr/services4/3rdparty/bufferclass_example/bufferclass_example.h ---- git/drivers/gpu/pvr/services4/3rdparty/bufferclass_example/bufferclass_example.h 2009-01-05 20:00:44.000000000 +0100 -+++ git/drivers/gpu/pvr/services4/3rdparty/bufferclass_example/bufferclass_example.h 2008-12-18 15:47:29.000000000 +0100 -@@ -39,11 +39,32 @@ - - #define BC_EXAMPLE_NUM_BUFFERS 3 - --#define BC_EXAMPLE_WIDTH (160) -+#define YUV420 1 -+#ifdef YUV420 -+ -+#define BC_EXAMPLE_WIDTH (320) - #define BC_EXAMPLE_HEIGHT (160) --#define BC_EXAMPLE_STRIDE (160*2) -+#define BC_EXAMPLE_STRIDE (320) -+#define BC_EXAMPLE_PIXELFORMAT (PVRSRV_PIXEL_FORMAT_YUV420) -+ -+#else -+#ifdef YUV422 -+ -+#define BC_EXAMPLE_WIDTH (320) -+#define BC_EXAMPLE_HEIGHT (160) -+#define BC_EXAMPLE_STRIDE (320*2) - #define BC_EXAMPLE_PIXELFORMAT (PVRSRV_PIXEL_FORMAT_YVYU) - -+#else -+ -+#define BC_EXAMPLE_WIDTH (320) -+#define BC_EXAMPLE_HEIGHT (160) -+#define BC_EXAMPLE_STRIDE (320*2) -+#define BC_EXAMPLE_PIXELFORMAT (PVRSRV_PIXEL_FORMAT_RGB565) -+ -+#endif -+#endif -+ - #define BC_EXAMPLE_DEVICEID 0 - - -diff -Nurd git/drivers/gpu/pvr/services4/3rdparty/bufferclass_example/bufferclass_example_linux.c git/drivers/gpu/pvr/services4/3rdparty/bufferclass_example/bufferclass_example_linux.c ---- git/drivers/gpu/pvr/services4/3rdparty/bufferclass_example/bufferclass_example_linux.c 2009-01-05 20:00:44.000000000 +0100 -+++ git/drivers/gpu/pvr/services4/3rdparty/bufferclass_example/bufferclass_example_linux.c 2008-12-18 15:47:29.000000000 +0100 -@@ -38,11 +38,10 @@ - - #include "bufferclass_example.h" - #include "bufferclass_example_linux.h" -+#include "pvrmodule.h" - - #define DEVNAME "bc_example" - --MODULE_AUTHOR("Imagination Technologies Ltd. <gpl-support@imgtec.com>"); --MODULE_LICENSE("GPL"); - MODULE_SUPPORTED_DEVICE(DEVNAME); - - int BC_Example_Bridge(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg); -@@ -259,22 +258,11 @@ - { - return PVRSRV_ERROR_OUT_OF_MEMORY; - } -- else -- { -- IMG_VOID *pvPage; -- IMG_VOID *pvEnd = pvLinAddr + ui32Size; -- -- for(pvPage = pvLinAddr; pvPage < pvEnd; pvPage += PAGE_SIZE) -- { -- SetPageReserved(virt_to_page(pvPage)); -- } - -- pPhysAddr->uiAddr = dma; -- *pLinAddr = pvLinAddr; -+ pPhysAddr->uiAddr = dma; -+ *pLinAddr = pvLinAddr; - -- return PVRSRV_OK; -- } -- return PVRSRV_ERROR_OUT_OF_MEMORY; -+ return PVRSRV_OK; - #endif - } - -diff -Nurd git/drivers/gpu/pvr/services4/3rdparty/bufferclass_example/bufferclass_example_private.c git/drivers/gpu/pvr/services4/3rdparty/bufferclass_example/bufferclass_example_private.c ---- git/drivers/gpu/pvr/services4/3rdparty/bufferclass_example/bufferclass_example_private.c 2009-01-05 20:00:44.000000000 +0100 -+++ git/drivers/gpu/pvr/services4/3rdparty/bufferclass_example/bufferclass_example_private.c 2008-12-18 15:47:29.000000000 +0100 -@@ -26,6 +26,43 @@ - - #include "bufferclass_example.h" - -+void FillYUV420Image(void *pvDest, int width, int height, int bytestride) -+{ -+ static int iPhase = 0; -+ int i, j; -+ unsigned char u,v,y; -+ unsigned char *pui8y = (unsigned char *)pvDest; -+ unsigned short *pui16uv; -+ unsigned int count = 0; -+ -+ for(j=0;j<height;j++) -+ { -+ for(i=0;i<width;i++) -+ { -+ y = (((i+iPhase)>>6)%(2)==0)? 0x7f:0x00; -+ -+ pui8y[count++] = y; -+ } -+ } -+ -+ pui16uv = (unsigned short *)((unsigned char *)pvDest + (width * height)); -+ count = 0; -+ -+ for(j=0;j<height;j+=2) -+ { -+ for(i=0;i<width;i+=2) -+ { -+ u = (j<(height/2))? ((i<(width/2))? 0xFF:0x33) : ((i<(width/2))? 0x33:0xAA); -+ v = (j<(height/2))? ((i<(width/2))? 0xAC:0x0) : ((i<(width/2))? 0x03:0xEE); -+ -+ -+ pui16uv[count++] = (v << 8) | u; -+ -+ } -+ } -+ -+ iPhase++; -+} - - void FillYUV422Image(void *pvDest, int width, int height, int bytestride) - { -@@ -37,12 +74,12 @@ - - for(y=0;y<height;y++) - { -- for(x=0;x<width >> 1;x++) -+ for(x=0;x<width;x+=2) - { -- u = (y<(height/2))? ((x<(width/4))? 0xFF:0x33) : ((x<(width/4))? 0x33:0xAA); -- v = (y<(height/2))? ((x<(width/4))? 0xAA:0x0) : ((x<(width/4))? 0x03:0xEE); -+ u = (y<(height/2))? ((x<(width/2))? 0xFF:0x33) : ((x<(width/2))? 0x33:0xAA); -+ v = (y<(height/2))? ((x<(width/2))? 0xAA:0x0) : ((x<(width/2))? 0x03:0xEE); - -- y0 = y1 = (((x+iPhase)>>4)%(2)==0)? 0x7f:0x00; -+ y0 = y1 = (((x+iPhase)>>6)%(2)==0)? 0x7f:0x00; - - - pui32yuv[count++] = (y1 << 24) | (v << 16) | (y0 << 8) | u; -@@ -115,19 +152,36 @@ - - psSyncData = psBuffer->psSyncData; - -- - if(psSyncData) - { -+ -+ if(psSyncData->ui32ReadOpsPending != psSyncData->ui32ReadOpsComplete) -+ { -+ return -1; -+ } -+ -+ - psSyncData->ui32WriteOpsPending++; - } - -- if(psBufferInfo->pixelformat == PVRSRV_PIXEL_FORMAT_RGB565) -- { -- FillRGB565Image(psBuffer->sCPUVAddr, BC_EXAMPLE_WIDTH, BC_EXAMPLE_HEIGHT, BC_EXAMPLE_STRIDE); -- } -- else -+ switch(psBufferInfo->pixelformat) - { -- FillYUV422Image(psBuffer->sCPUVAddr, BC_EXAMPLE_WIDTH, BC_EXAMPLE_HEIGHT, BC_EXAMPLE_STRIDE); -+ case PVRSRV_PIXEL_FORMAT_RGB565: -+ default: -+ { -+ FillRGB565Image(psBuffer->sCPUVAddr, BC_EXAMPLE_WIDTH, BC_EXAMPLE_HEIGHT, BC_EXAMPLE_STRIDE); -+ break; -+ } -+ case PVRSRV_PIXEL_FORMAT_YVYU: -+ { -+ FillYUV422Image(psBuffer->sCPUVAddr, BC_EXAMPLE_WIDTH, BC_EXAMPLE_HEIGHT, BC_EXAMPLE_STRIDE); -+ break; -+ } -+ case PVRSRV_PIXEL_FORMAT_YUV420: -+ { -+ FillYUV420Image(psBuffer->sCPUVAddr, BC_EXAMPLE_WIDTH, BC_EXAMPLE_HEIGHT, BC_EXAMPLE_STRIDE); -+ break; -+ } - } - - -diff -Nurd git/drivers/gpu/pvr/services4/3rdparty/bufferclass_example/kbuild/Makefile git/drivers/gpu/pvr/services4/3rdparty/bufferclass_example/kbuild/Makefile ---- git/drivers/gpu/pvr/services4/3rdparty/bufferclass_example/kbuild/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ git/drivers/gpu/pvr/services4/3rdparty/bufferclass_example/kbuild/Makefile 2008-12-18 15:47:29.000000000 +0100 -@@ -0,0 +1,40 @@ -+# -+# Copyright(c) 2008 Imagination Technologies Ltd. All rights reserved. -+# -+# This program is free software; you can redistribute it and/or modify it -+# under the terms and conditions of the GNU General Public License, -+# version 2, as published by the Free Software Foundation. -+# -+# This program is distributed in the hope it will be useful but, except -+# as otherwise stated in writing, 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. -+# -+# You should have received a copy of the GNU General Public License along with -+# this program; if not, write to the Free Software Foundation, Inc., -+# 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. -+# -+# The full GNU General Public License is included in this distribution in -+# the file called "COPYING". -+# -+# Contact Information: -+# Imagination Technologies Ltd. <gpl-support@imgtec.com> -+# Home Park Estate, Kings Langley, Herts, WD4 8LZ, UK -+# -+# -+# -+ -+MODULE = bc_example -+ -+INCLUDES = -I$(EURASIAROOT)/include4 \ -+ -I$(EURASIAROOT)/services4/include \ -+ -I$(EURASIAROOT)/services4/system/$(PVR_SYSTEM) \ -+ -I$(EURASIAROOT)/services4/system/include \ -+ -+SOURCES = ../bufferclass_example.c \ -+ ../bufferclass_example_linux.c \ -+ ../bufferclass_example_private.c -+ -+ -+ -+ -diff -Nurd git/drivers/gpu/pvr/services4/3rdparty/dc_omap3430_linux/kbuild/Makefile git/drivers/gpu/pvr/services4/3rdparty/dc_omap3430_linux/kbuild/Makefile ---- git/drivers/gpu/pvr/services4/3rdparty/dc_omap3430_linux/kbuild/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ git/drivers/gpu/pvr/services4/3rdparty/dc_omap3430_linux/kbuild/Makefile 2008-12-18 15:47:29.000000000 +0100 -@@ -0,0 +1,39 @@ -+# -+# Copyright(c) 2008 Imagination Technologies Ltd. All rights reserved. -+# -+# This program is free software; you can redistribute it and/or modify it -+# under the terms and conditions of the GNU General Public License, -+# version 2, as published by the Free Software Foundation. -+# -+# This program is distributed in the hope it will be useful but, except -+# as otherwise stated in writing, 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. -+# -+# You should have received a copy of the GNU General Public License along with -+# this program; if not, write to the Free Software Foundation, Inc., -+# 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. -+# -+# The full GNU General Public License is included in this distribution in -+# the file called "COPYING". -+# -+# Contact Information: -+# Imagination Technologies Ltd. <gpl-support@imgtec.com> -+# Home Park Estate, Kings Langley, Herts, WD4 8LZ, UK -+# -+# -+# -+ -+MODULE = omaplfb -+ -+INCLUDES = -I$(EURASIAROOT)/include4 \ -+ -I$(EURASIAROOT)/services4/include \ -+ -I$(EURASIAROOT)/services4/system/$(PVR_SYSTEM) \ -+ -I$(EURASIAROOT)/services4/system/include \ -+ -+SOURCES = ../omaplfb_displayclass.c \ -+ ../omaplfb_linux.c -+ -+ -+ -+ -diff -Nurd git/drivers/gpu/pvr/services4/3rdparty/dc_omap3430_linux/omaplfb_displayclass.c git/drivers/gpu/pvr/services4/3rdparty/dc_omap3430_linux/omaplfb_displayclass.c ---- git/drivers/gpu/pvr/services4/3rdparty/dc_omap3430_linux/omaplfb_displayclass.c 2009-01-05 20:00:44.000000000 +0100 -+++ git/drivers/gpu/pvr/services4/3rdparty/dc_omap3430_linux/omaplfb_displayclass.c 2008-12-18 15:47:29.000000000 +0100 -@@ -41,6 +41,7 @@ - #define DISPLAY_DEVICE_NAME "PowerVR OMAP Linux Display Driver" - - #define DRIVER_PREFIX "omaplfb" -+//extern int omap2_disp_get_output_dev(int); - - static IMG_VOID *gpvAnchor; - -@@ -57,8 +58,6 @@ - PVR_POWER_STATE eCurrentPowerState); - #endif - --extern void omap_dispc_set_plane_base(int plane, IMG_UINT32 phys_addr); -- - static PFN_DC_GET_PVRJTABLE pfnGetPVRJTable = IMG_NULL; - - static OMAPLFB_DEVINFO * GetAnchorPtr(IMG_VOID) -@@ -124,28 +123,53 @@ - static PVRSRV_ERROR Flip(OMAPLFB_SWAPCHAIN *psSwapChain, - IMG_UINT32 aPhyAddr) - { -- if (1 /* omap2_disp_get_output_dev(OMAP2_GRAPHICS) == OMAP2_OUTPUT_LCD */) -+ IMG_UINT32 control; -+ OMAPLFB_DEVINFO *psDevInfo; -+ -+ psDevInfo = GetAnchorPtr(); -+ -+ if (1) //omap2_disp_get_output_dev(OMAP2_GRAPHICS) == OMAP2_OUTPUT_LCD) - { -- omap_dispc_set_plane_base(0, aPhyAddr); -+ OMAPLFBVSyncWriteReg(psSwapChain, OMAPLCD_GFX_BA0, aPhyAddr); -+ -+ OMAPLFBVSyncWriteReg(psSwapChain, OMAPLCD_GFX_BA1, aPhyAddr); -+ -+ control = OMAPLFBVSyncReadReg(psSwapChain, OMAPLCD_CONTROL); -+ control |= OMAP_CONTROL_GOLCD; -+ OMAPLFBVSyncWriteReg(psSwapChain, OMAPLCD_CONTROL, control); -+ - return PVRSRV_OK; - } - else -- if (0 /*omap2_disp_get_output_dev(OMAP2_GRAPHICS) == OMAP2_OUTPUT_TV*/) -+ if (0) //omap2_disp_get_output_dev(OMAP2_GRAPHICS) == OMAP2_OUTPUT_TV) - { -- omap_dispc_set_plane_base(0, aPhyAddr); -+ OMAPLFBVSyncWriteReg(psSwapChain, OMAPLCD_GFX_BA0, aPhyAddr); -+ OMAPLFBVSyncWriteReg(psSwapChain, OMAPLCD_GFX_BA1, aPhyAddr + psDevInfo->sFBInfo.ui32ByteStride); -+ -+ control = OMAPLFBVSyncReadReg(psSwapChain, OMAPLCD_CONTROL); -+ control |= OMAP_CONTROL_GODIGITAL; -+ OMAPLFBVSyncWriteReg(psSwapChain, OMAPLCD_CONTROL, control); -+ - return PVRSRV_OK; - } -- -+ - return PVRSRV_ERROR_INVALID_PARAMS; - } - - static IMG_VOID EnableVSyncInterrupt(OMAPLFB_SWAPCHAIN *psSwapChain) - { -- -+ -+ IMG_UINT32 ui32InterruptEnable = OMAPLFBVSyncReadReg(psSwapChain, OMAPLCD_IRQENABLE); -+ ui32InterruptEnable |= OMAPLCD_INTMASK_VSYNC; -+ OMAPLFBVSyncWriteReg(psSwapChain, OMAPLCD_IRQENABLE, ui32InterruptEnable ); - } - - static IMG_VOID DisableVSyncInterrupt(OMAPLFB_SWAPCHAIN *psSwapChain) - { -+ -+ IMG_UINT32 ui32InterruptEnable = OMAPLFBVSyncReadReg(psSwapChain, OMAPLCD_IRQENABLE); -+ ui32InterruptEnable &= ~(OMAPLCD_INTMASK_VSYNC); -+ OMAPLFBVSyncWriteReg(psSwapChain, OMAPLCD_IRQENABLE, ui32InterruptEnable); - } - - static PVRSRV_ERROR OpenDCDevice(IMG_UINT32 ui32DeviceID, -@@ -169,6 +193,7 @@ - #endif - ); - -+ - memset(&psDevInfo->sLINNotifBlock, 0, sizeof(psDevInfo->sLINNotifBlock)); - - psDevInfo->sLINNotifBlock.notifier_call = FrameBufferEvents; -@@ -363,6 +388,7 @@ - PVR_UNREFERENCED_PARAMETER(ui32OEMFlags); - PVR_UNREFERENCED_PARAMETER(pui32SwapChainID); - -+ - if(!hDevice - || !psDstSurfAttrib - || !psSrcSurfAttrib -@@ -399,6 +425,7 @@ - || psDstSurfAttrib->sDims.ui32Width != psDevInfo->sDisplayDim.ui32Width - || psDstSurfAttrib->sDims.ui32Height != psDevInfo->sDisplayDim.ui32Height) - { -+ - return PVRSRV_ERROR_INVALID_PARAMS; - } - -@@ -407,6 +434,7 @@ - || psDstSurfAttrib->sDims.ui32Width != psSrcSurfAttrib->sDims.ui32Width - || psDstSurfAttrib->sDims.ui32Height != psSrcSurfAttrib->sDims.ui32Height) - { -+ - return PVRSRV_ERROR_INVALID_PARAMS; - } - -@@ -467,12 +495,21 @@ - } - - -+ psSwapChain->pvRegs = ioremap(psDevInfo->psLINFBInfo->fix.mmio_start, psDevInfo->psLINFBInfo->fix.mmio_len); -+ -+ if (psSwapChain->pvRegs == IMG_NULL) -+ { -+ printk(KERN_WARNING DRIVER_PREFIX ": Couldn't map registers needed for flipping\n"); -+ goto ErrorFreeVSyncItems; -+ } -+ -+ - unblank_display(psDevInfo); - - if (OMAPLFBInstallVSyncISR(psSwapChain) != PVRSRV_OK) - { - printk(KERN_WARNING DRIVER_PREFIX ": ISR handler failed to register\n"); -- goto ErrorFreeVSyncItems; -+ goto ErrorUnmapRegisters; - } - - EnableVSyncInterrupt(psSwapChain); -@@ -485,6 +522,8 @@< |
