1. modify the judgment conditions on wait_for_completion_interruptible_timeout return;
2. modify code for build ko;
3. add gcdTILESTATUS_SINGLE_BANK but no use it;
4. update version to 2.2.4;
5. modify pack-kernel.sh to remove uu of gpu;
};
-#ifdef CONFIG_VIVANTE
+//#ifdef CONFIG_VIVANTE
#define GPU_HIGH_CLOCK 552
#define GPU_LOW_CLOCK (periph_pll_default / 1000000) /* same as general pll clock rate below */
static struct resource resources_gpu[] = {
.num_resources = ARRAY_SIZE(resources_gpu),
.resource = resources_gpu,
};
-#endif
+//#endif
#ifdef CONFIG_KEYS_RK29
extern struct rk29_keys_platform_data rk29_keys_pdata;
#ifdef CONFIG_RK29_VMAC
&rk29_device_vmac,
#endif
-#ifdef CONFIG_VIVANTE
+//#ifdef CONFIG_VIVANTE
&rk29_device_gpu,
-#endif
+//#endif
#ifdef CONFIG_VIDEO_RK29
&rk29_device_camera, /* ddl@rock-chips.com : camera support */
#if (CONFIG_SENSOR_IIC_ADDR_0 != 0x00)
};
-#ifdef CONFIG_VIVANTE
+//#ifdef CONFIG_VIVANTE
#define GPU_HIGH_CLOCK 552
#define GPU_LOW_CLOCK (periph_pll_default / 1000000) /* same as general pll clock rate below */
static struct resource resources_gpu[] = {
.num_resources = ARRAY_SIZE(resources_gpu),
.resource = resources_gpu,
};
-#endif
+//#endif
#ifdef CONFIG_KEYS_RK29
extern struct rk29_keys_platform_data rk29_keys_pdata;
#ifdef CONFIG_RK29_VMAC
&rk29_device_vmac,
#endif
-#ifdef CONFIG_VIVANTE
+//#ifdef CONFIG_VIVANTE
&rk29_device_gpu,
-#endif
+//#endif
#ifdef CONFIG_VIDEO_RK29
&rk29_device_camera, /* ddl@rock-chips.com : camera support */
#if (CONFIG_SENSOR_IIC_ADDR_0 != 0x00)
local_irq_restore(flags);
mdelay(10);
}
+EXPORT_SYMBOL(pmu_set_power_domain);
static int pd_vcodec_mode(struct clk *clk, int on)
{
config VIVANTE
tristate "ROCKCHIP Vivante GPU"
- default y
+ default m
help
Vivante GPU module.
endmenu
GPU¹Ì¼þ°æ±¾(×î´ó19¸ö×Ö·û´®)
*/
-#define GPU_FW_VERSION "2.2.2"
+#define GPU_FW_VERSION "2.2.4"
/*
*/
#define gcdENABLE_MMU_PROTECTING 1
+
+/*
+ dkm: gcdTILESTATUS_SINGLE_BANK
+
+ make TileStatus alloced in one single bank.
+ gcdTILESTATUS_SINGLE_BANK:
+ 0 - no use,original code
+ 1 - use
+*/
+#define gcdTILESTATUS_SINGLE_BANK 0
+
+
#endif /* __gc_hal_options_h_ */
/* The heap mutex. */
gctPOINTER mutex;
+
+#if gcdTILESTATUS_SINGLE_BANK
+ gctINT tilestatusBank;
+#endif
};
/* gckMMU object. */
banks ++;
}
+// dkm : gcdTILESTATUS_SINGLE_BANK
+#if gcdTILESTATUS_SINGLE_BANK
+ /* Assign all the bank mappings. */
+ memory->mapping[gcvSURF_RENDER_TARGET] = banks - 1;
+ memory->mapping[gcvSURF_BITMAP] = banks - 1;
+ if (banks > 1) --banks;
+ memory->mapping[gcvSURF_TILE_STATUS] = banks - 1;
+ memory->tilestatusBank = banks - 1;
+ if (banks > 1) --banks;
+ memory->mapping[gcvSURF_DEPTH] = banks - 1;
+ memory->mapping[gcvSURF_HIERARCHICAL_DEPTH] = banks - 1;
+ if (banks > 1) --banks;
+ memory->mapping[gcvSURF_TEXTURE] = banks - 1;
+ if (banks > 1) --banks;
+ memory->mapping[gcvSURF_VERTEX] = banks - 1;
+ if (banks > 1) --banks;
+ memory->mapping[gcvSURF_INDEX] = banks - 1;
+ if (banks > 1) --banks;
+ memory->mapping[gcvSURF_TYPE_UNKNOWN] = 0;
+#else
/* Assign all the bank mappings. */
memory->mapping[gcvSURF_RENDER_TARGET] = banks - 1;
memory->mapping[gcvSURF_BITMAP] = banks - 1;
memory->mapping[gcvSURF_TILE_STATUS] = banks - 1;
if (banks > 1) --banks;
memory->mapping[gcvSURF_TYPE_UNKNOWN] = 0;
+#endif
gcmkTRACE_ZONE(gcvLEVEL_INFO, gcvZONE_VIDMEM,
"[GALCORE] INDEX: bank %d",
acquired = gcvTRUE;
-#if 0
+#if gcdTILESTATUS_SINGLE_BANK
// dkm: ¶ÔÓÚ»¨ÆÁËÀ»úµÄÎÊÌ⣬¸Ð¾õVVÕâô×öÖ»Êǹæ±Ü£¬»¹ÊÇûÓÐÕÒµ½ÎÊÌâµÄÔÒò
if (Type == gcvSURF_TILE_STATUS
&& (Bytes + (1 << 20) > Memory->freeBytes))
node = _FindNode(Memory, bank, Bytes, &alignment);
/* Out of memory? */
+#if gcdTILESTATUS_SINGLE_BANK
+ if (node == gcvNULL && Type!=gcvSURF_TILE_STATUS)
+#else
if (node == gcvNULL)
+#endif
{
/* Walk all lower banks. */
for (i = bank - 1; i >= 0; --i)
{
+#if gcdTILESTATUS_SINGLE_BANK
+ if(i==Memory->tilestatusBank) continue;
+#endif
/* Find a free node inside the current bank. */
node = _FindNode(Memory, i, Bytes, &alignment);
if (node != gcvNULL)
}
}
+#if gcdTILESTATUS_SINGLE_BANK
+ if (node == gcvNULL && Type!=gcvSURF_TILE_STATUS)
+#else
if (node == gcvNULL)
+#endif
{
/* Walk all upper banks. */
for (i = bank + 1; i < gcmCOUNTOF(Memory->sentinel); ++i)
break;
}
+#if gcdTILESTATUS_SINGLE_BANK
+ if(i==Memory->tilestatusBank) continue;
+#endif
/* Find a free node inside the current bank. */
node = _FindNode(Memory, i, Bytes, &alignment);
if (node != gcvNULL)
#endif
#endif
-static int __init gpu_init(void)
-{
- int ret = 0;
-
-#if 0 //add by dkm
-#ifndef CONFIG_DOVE_GPU
- gpu_resources[0].start = gpu_resources[0].end = irqLine;
-
- gpu_resources[1].start = registerMemBase;
- gpu_resources[1].end = registerMemBase + registerMemSize - 1;
-
- gpu_resources[2].start = contiguousBase;
- gpu_resources[2].end = contiguousBase + contiguousSize - 1;
-
- /* Allocate device */
- gpu_device = platform_device_alloc(DEVICE_NAME, -1);
- if (!gpu_device)
- {
- printk(KERN_ERR "galcore: platform_device_alloc failed.\n");
- ret = -ENOMEM;
- goto out;
- }
-
- /* Insert resource */
- ret = platform_device_add_resources(gpu_device, gpu_resources, 3);
- if (ret)
- {
- printk(KERN_ERR "galcore: platform_device_add_resources failed.\n");
- goto put_dev;
- }
-
- /* Add device */
- ret = platform_device_add(gpu_device);
- if (ret)
- {
- printk(KERN_ERR "galcore: platform_device_add failed.\n");
- goto del_dev;
- }
-#endif
-#endif
- ret = platform_driver_register(&gpu_driver);
- if (!ret)
- {
-// add by vv
-#if gcdkREPORT_VIDMEM_USAGE
- gckDeviceProc_Register();
-#endif
-
- goto out;
- }
-
-#if 0 //add by dkm
-#ifndef CONFIG_DOVE_GPU
-del_dev:
- platform_device_del(gpu_device);
-put_dev:
- platform_device_put(gpu_device);
-#endif
-#endif
-
-out:
- return ret;
-
-}
-
-static void __exit gpu_exit(void)
-{
- platform_driver_unregister(&gpu_driver);
-#if 0 //add by dkm
-#ifndef CONFIG_DOVE_GPU
- platform_device_unregister(gpu_device);
-#endif
-#endif
-
-// add by vv
-#if gcdkREPORT_VIDMEM_USAGE
- gckDeviceProc_UnRegister();
-#endif
- printk("UnLoad galcore.ko success.\n");
-}
-
-module_init(gpu_init);
-module_exit(gpu_exit);
-
-
#ifdef CONFIG_PROC_FS
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
.llseek = seq_lseek,
.release = single_release,
};
+#endif /* CONFIG_PROC_FS */
+
+static int __init gpu_init(void)
+{
+ int ret = 0;
+
+#ifdef CONFIG_PROC_FS
+ proc_create("gpu", 0, NULL, &proc_gpu_fops);
+#endif
+
+#if 0 //add by dkm
+#ifndef CONFIG_DOVE_GPU
+ gpu_resources[0].start = gpu_resources[0].end = irqLine;
+
+ gpu_resources[1].start = registerMemBase;
+ gpu_resources[1].end = registerMemBase + registerMemSize - 1;
+
+ gpu_resources[2].start = contiguousBase;
+ gpu_resources[2].end = contiguousBase + contiguousSize - 1;
+
+ /* Allocate device */
+ gpu_device = platform_device_alloc(DEVICE_NAME, -1);
+ if (!gpu_device)
+ {
+ printk(KERN_ERR "galcore: platform_device_alloc failed.\n");
+ ret = -ENOMEM;
+ goto out;
+ }
+
+ /* Insert resource */
+ ret = platform_device_add_resources(gpu_device, gpu_resources, 3);
+ if (ret)
+ {
+ printk(KERN_ERR "galcore: platform_device_add_resources failed.\n");
+ goto put_dev;
+ }
-static int __init gpu_proc_init(void)
+ /* Add device */
+ ret = platform_device_add(gpu_device);
+ if (ret)
+ {
+ printk(KERN_ERR "galcore: platform_device_add failed.\n");
+ goto del_dev;
+ }
+#endif
+#endif
+ ret = platform_driver_register(&gpu_driver);
+ if (!ret)
+ {
+// add by vv
+#if gcdkREPORT_VIDMEM_USAGE
+ gckDeviceProc_Register();
+#endif
+
+ goto out;
+ }
+
+#if 0 //add by dkm
+#ifndef CONFIG_DOVE_GPU
+del_dev:
+ platform_device_del(gpu_device);
+put_dev:
+ platform_device_put(gpu_device);
+#endif
+#endif
+
+out:
+ return ret;
+
+}
+
+static void __exit gpu_exit(void)
{
- proc_create("gpu", 0, NULL, &proc_gpu_fops);
- return 0;
+ platform_driver_unregister(&gpu_driver);
+#if 0 //add by dkm
+#ifndef CONFIG_DOVE_GPU
+ platform_device_unregister(gpu_device);
+#endif
+#endif
+// add by vv
+#if gcdkREPORT_VIDMEM_USAGE
+ gckDeviceProc_UnRegister();
+#endif
+ printk("UnLoad galcore.ko success.\n");
}
-late_initcall(gpu_proc_init);
-#endif /* CONFIG_PROC_FS */
+
+module_init(gpu_init);
+module_exit(gpu_exit);
+
+
+
#endif
rc = wait_for_completion_interruptible_timeout(&signal->event, timeout);
#if 1 // dkm : avoid return OK when timeout in kernel3.0
- status = (rc == 0) ? gcvSTATUS_TIMEOUT : gcvSTATUS_OK;
+ status = (rc <= 0) ? gcvSTATUS_TIMEOUT : gcvSTATUS_OK;
#else
status = ((rc == 0) && !signal->event.done) ? gcvSTATUS_TIMEOUT
: gcvSTATUS_OK;
drivers/staging/rk29/ipp/rk29-ipp.c
)
-DIRS=(
-drivers/staging/rk29/vivante/
-)
-
EXCLUDES=(
arch/arm/mach-rk2818/*.c
arch/arm/mach-rk2818/*.h
arch/arm/mach-rk29/ddr_reconfig.c
-drivers/staging/rk29/vivante/*.c
-drivers/staging/rk29/vivante/*.h
+drivers/staging/rk29/vivante
arch/arm/mach-rk29/board-rk29sdk.c
arch/arm/configs/rk29_sdk_defconfig