Permalink
Browse files

kgsl: update based on semc code

Kangd from jerpelea (FreeXperia)
  • Loading branch information...
1 parent 68b2945 commit c02c7dfddf7f05ff8e19c0012248507e51d1edee @TomGiordano TomGiordano committed Jan 17, 2012
Showing with 13,560 additions and 10,794 deletions.
  1. +14 −2 arch/arm/configs/cyanogen_blade_defconfig
  2. +2 −1 arch/arm/configs/cyanogen_skate_defconfig
  3. +2 −1 arch/arm/configs/cyanogen_v9_defconfig
  4. +47 −53 arch/arm/mach-msm/board-zte-blade.c
  5. +50 −52 arch/arm/mach-msm/board-zte-skate.c
  6. +50 −52 arch/arm/mach-msm/board-zte-turies.c
  7. +47 −53 arch/arm/mach-msm/board-zte-v9.c
  8. +37 −20 drivers/gpu/msm/Kconfig
  9. +26 −16 drivers/gpu/msm/Makefile
  10. +169 −189 drivers/gpu/msm/{yamato_reg.h → a2xx_reg.h}
  11. +1,304 −0 drivers/gpu/msm/adreno.c
  12. +129 −0 drivers/gpu/msm/adreno.h
  13. +1,607 −0 drivers/gpu/msm/adreno_a2xx.c
  14. +73 −128 drivers/gpu/msm/{kgsl_log.c → adreno_debugfs.c}
  15. +40 −0 drivers/gpu/msm/adreno_debugfs.h
  16. +266 −0 drivers/gpu/msm/adreno_drawctxt.c
  17. +151 −0 drivers/gpu/msm/adreno_drawctxt.h
  18. +193 −0 drivers/gpu/msm/adreno_pm4types.h
  19. +878 −0 drivers/gpu/msm/adreno_postmortem.c
  20. +21 −0 drivers/gpu/msm/adreno_postmortem.h
  21. +812 −0 drivers/gpu/msm/adreno_ringbuffer.c
  22. +154 −0 drivers/gpu/msm/adreno_ringbuffer.h
  23. +0 −97 drivers/gpu/msm/g12_reg.h
  24. +1,641 −1,249 drivers/gpu/msm/kgsl.c
  25. +96 −99 drivers/gpu/msm/kgsl.h
  26. +175 −75 drivers/gpu/msm/kgsl_cffdump.c
  27. +20 −24 drivers/gpu/msm/kgsl_cffdump.h
  28. +0 −119 drivers/gpu/msm/kgsl_cmdstream.c
  29. +0 −87 drivers/gpu/msm/kgsl_cmdstream.h
  30. +87 −0 drivers/gpu/msm/kgsl_debugfs.c
  31. +39 −0 drivers/gpu/msm/kgsl_debugfs.h
  32. +184 −107 drivers/gpu/msm/kgsl_device.h
  33. +0 −1,878 drivers/gpu/msm/kgsl_drawctxt.c
  34. +0 −135 drivers/gpu/msm/kgsl_drawctxt.h
  35. +75 −127 drivers/gpu/msm/kgsl_drm.c
  36. +0 −867 drivers/gpu/msm/kgsl_g12.c
  37. +0 −69 drivers/gpu/msm/kgsl_g12.h
  38. +0 −249 drivers/gpu/msm/kgsl_g12_cmdstream.c
  39. +0 −52 drivers/gpu/msm/kgsl_g12_cmdstream.h
  40. +0 −63 drivers/gpu/msm/kgsl_g12_cmdwindow.c
  41. +0 −38 drivers/gpu/msm/kgsl_g12_cmdwindow.h
  42. +0 −50 drivers/gpu/msm/kgsl_g12_drawctxt.c
  43. +0 −77 drivers/gpu/msm/kgsl_g12_drawctxt.h
  44. +0 −40 drivers/gpu/msm/kgsl_g12_vgv3types.h
  45. +767 −0 drivers/gpu/msm/kgsl_gpummu.c
  46. +85 −0 drivers/gpu/msm/kgsl_gpummu.h
  47. +333 −0 drivers/gpu/msm/kgsl_iommu.c
  48. +68 −85 drivers/gpu/msm/kgsl_log.h
  49. +527 −568 drivers/gpu/msm/kgsl_mmu.c
  50. +140 −155 drivers/gpu/msm/kgsl_mmu.h
  51. +0 −193 drivers/gpu/msm/kgsl_pm4types.h
  52. +0 −687 drivers/gpu/msm/kgsl_postmortem.c
  53. +0 −39 drivers/gpu/msm/kgsl_postmortem.h
  54. +550 −177 drivers/gpu/msm/kgsl_pwrctrl.c
  55. +53 −65 drivers/gpu/msm/kgsl_pwrctrl.h
  56. +339 −0 drivers/gpu/msm/kgsl_pwrscale.c
  57. +77 −0 drivers/gpu/msm/kgsl_pwrscale.h
  58. +221 −0 drivers/gpu/msm/kgsl_pwrscale_idlestats.c
  59. +197 −0 drivers/gpu/msm/kgsl_pwrscale_trustzone.c
  60. +0 −795 drivers/gpu/msm/kgsl_ringbuffer.c
  61. +0 −212 drivers/gpu/msm/kgsl_ringbuffer.h
  62. +526 −178 drivers/gpu/msm/kgsl_sharedmem.c
  63. +104 −93 drivers/gpu/msm/kgsl_sharedmem.h
  64. +0 −1,340 drivers/gpu/msm/kgsl_yamato.c
  65. +0 −63 drivers/gpu/msm/kgsl_yamato.h
  66. +0 −39 drivers/gpu/msm/leia_reg.h
  67. +953 −0 drivers/gpu/msm/z180.c
  68. +35 −0 drivers/gpu/msm/z180.h
  69. +49 −0 drivers/gpu/msm/z180_reg.h
  70. +10 −2 fs/anon_inodes.c
  71. +136 −34 include/linux/msm_kgsl.h
  72. +1 −0 lib/memory_alloc.c
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.35.7
-# Thu Dec 8 03:30:17 2011
+# Tue Jan 17 20:33:52 2012
#
CONFIG_ARM=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -162,10 +162,14 @@ CONFIG_IOSCHED_NOOP=y
# CONFIG_IOSCHED_CFQ is not set
CONFIG_IOSCHED_BFQ=y
# CONFIG_CGROUP_BFQIO is not set
+# CONFIG_IOSCHED_VR is not set
+# CONFIG_IOSCHED_SIO is not set
# CONFIG_DEFAULT_DEADLINE is not set
# CONFIG_DEFAULT_CFQ is not set
CONFIG_DEFAULT_BFQ=y
# CONFIG_DEFAULT_NOOP is not set
+# CONFIG_DEFAULT_VR is not set
+# CONFIG_DEFAULT_SIO is not set
CONFIG_DEFAULT_IOSCHED="bfq"
# CONFIG_INLINE_SPIN_TRYLOCK is not set
# CONFIG_INLINE_SPIN_TRYLOCK_BH is not set
@@ -505,6 +509,9 @@ CONFIG_CPU_FREQ_STAT_DETAILS=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_SMARTASS is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVE=y
+# CONFIG_CPU_FREQ_DEFAULT_GOV_LAGFREE is not set
+# CONFIG_CPU_FREQ_GOV_INTERACTIVEX is not set
+# CONFIG_CPU_FREQ_GOV_SAVAGEDZEN is not set
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
CONFIG_CPU_FREQ_GOV_POWERSAVE=y
CONFIG_CPU_FREQ_GOV_USERSPACE=y
@@ -513,6 +520,10 @@ CONFIG_CPU_FREQ_GOV_INTERACTIVE=y
CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
CONFIG_CPU_FREQ_GOV_SMARTASS=y
CONFIG_CPU_FREQ_GOV_SMARTASS2=y
+# CONFIG_CPU_FREQ_GOV_MINMAX is not set
+CONFIG_CPU_FREQ_MIN_TICKS=10
+CONFIG_CPU_FREQ_SAMPLING_LATENCY_MULTIPLIER=1000
+# CONFIG_CPU_FREQ_GOV_LAGFREE is not set
# CONFIG_CPU_IDLE is not set
CONFIG_CPU_FREQ_MSM=y
@@ -1536,9 +1547,10 @@ CONFIG_MSM_KGSL=y
# CONFIG_MSM_KGSL_PSTMRTMDMP_CP_STAT_NO_DETAIL is not set
# CONFIG_MSM_KGSL_PSTMRTMDMP_NO_IB_DUMP is not set
# CONFIG_MSM_KGSL_PSTMRTMDMP_RB_HEX is not set
-# CONFIG_MSM_KGSL_PSTMRTMDMP_NO_REG_DUMP is not set
+CONFIG_MSM_KGSL_GPUMMU=y
CONFIG_MSM_KGSL_MMU=y
# CONFIG_KGSL_PER_PROCESS_PAGE_TABLE is not set
+CONFIG_MSM_KGSL_PAGE_TABLE_SIZE=0xFFF0000
CONFIG_MSM_KGSL_MMU_PAGE_FAULT=y
# CONFIG_MSM_KGSL_DISABLE_SHADOW_WRITES is not set
# CONFIG_VGASTATE is not set
@@ -1536,9 +1536,10 @@ CONFIG_MSM_KGSL=y
# CONFIG_MSM_KGSL_PSTMRTMDMP_CP_STAT_NO_DETAIL is not set
# CONFIG_MSM_KGSL_PSTMRTMDMP_NO_IB_DUMP is not set
# CONFIG_MSM_KGSL_PSTMRTMDMP_RB_HEX is not set
-# CONFIG_MSM_KGSL_PSTMRTMDMP_NO_REG_DUMP is not set
+CONFIG_MSM_KGSL_GPUMMU=y
CONFIG_MSM_KGSL_MMU=y
# CONFIG_KGSL_PER_PROCESS_PAGE_TABLE is not set
+CONFIG_MSM_KGSL_PAGE_TABLE_SIZE=0xFFF0000
CONFIG_MSM_KGSL_MMU_PAGE_FAULT=y
# CONFIG_MSM_KGSL_DISABLE_SHADOW_WRITES is not set
# CONFIG_VGASTATE is not set
@@ -1520,9 +1520,10 @@ CONFIG_MSM_KGSL=y
# CONFIG_MSM_KGSL_PSTMRTMDMP_CP_STAT_NO_DETAIL is not set
# CONFIG_MSM_KGSL_PSTMRTMDMP_NO_IB_DUMP is not set
# CONFIG_MSM_KGSL_PSTMRTMDMP_RB_HEX is not set
-# CONFIG_MSM_KGSL_PSTMRTMDMP_NO_REG_DUMP is not set
+CONFIG_MSM_KGSL_GPUMMU=y
CONFIG_MSM_KGSL_MMU=y
# CONFIG_KGSL_PER_PROCESS_PAGE_TABLE is not set
+CONFIG_MSM_KGSL_PAGE_TABLE_SIZE=0xFFF0000
CONFIG_MSM_KGSL_MMU_PAGE_FAULT=y
# CONFIG_MSM_KGSL_DISABLE_SHADOW_WRITES is not set
# CONFIG_VGASTATE is not set
@@ -1070,31 +1070,56 @@ static void __init bt_power_init(void)
#endif
#ifdef CONFIG_ARCH_MSM7X27
-static struct resource kgsl_resources[] = {
- {
- .name = "kgsl_reg_memory",
- .start = 0xA0000000,
- .end = 0xA001ffff,
- .flags = IORESOURCE_MEM,
+
+static struct resource kgsl_3d0_resources[] = {
+ {
+ .name = KGSL_3D0_REG_MEMORY,
+ .start = 0xA0000000,
+ .end = 0xA001ffff,
+ .flags = IORESOURCE_MEM,
+ },
+ {
+ .name = KGSL_3D0_IRQ,
+ .start = INT_GRAPHICS,
+ .end = INT_GRAPHICS,
+ .flags = IORESOURCE_IRQ,
+ },
+};
+
+static struct kgsl_device_platform_data kgsl_3d0_pdata = {
+ .pwr_data = {
+ .pwrlevel = {
+ {
+ .gpu_freq = 128000000,
+ .bus_freq = 128000000,
+ },
+ },
+ .init_level = 0,
+ .num_levels = 1,
+ .set_grp_async = NULL,
+ .idle_timeout = HZ/5,
+ .nap_allowed = true,
},
- {
- .name = "kgsl_yamato_irq",
- .start = INT_GRAPHICS,
- .end = INT_GRAPHICS,
- .flags = IORESOURCE_IRQ,
+ .clk = {
+ .name = {
+ .clk = "grp_clk",
+ .pclk = "grp_pclk",
+ },
+ },
+ .imem_clk_name = {
+ .clk = "imem_clk",
+ .pclk = NULL,
},
};
-static struct kgsl_platform_data kgsl_pdata;
-
-static struct platform_device msm_device_kgsl = {
- .name = "kgsl",
- .id = -1,
- .num_resources = ARRAY_SIZE(kgsl_resources),
- .resource = kgsl_resources,
- .dev = {
- .platform_data = &kgsl_pdata,
- },
+struct platform_device msm_kgsl_3d0 = {
+ .name = "kgsl-3d0",
+ .id = 0,
+ .num_resources = ARRAY_SIZE(kgsl_3d0_resources),
+ .resource = kgsl_3d0_resources,
+ .dev = {
+ .platform_data = &kgsl_3d0_pdata,
+ },
};
#endif
@@ -2637,7 +2662,7 @@ static struct platform_device *devices[] __initdata = {
&msm_bluesleep_device,
&msm_bcmsleep_device, //compatible of qualcomm and broadcomm bluetooth chip ZTE_BT_QXX_20101207
#ifdef CONFIG_ARCH_MSM7X27
- &msm_device_kgsl,
+ &msm_kgsl_3d0,
#endif
#ifdef CONFIG_MT9P111
/*
@@ -3373,38 +3398,7 @@ static void __init msm7x2x_init(void)
msm_acpu_clock_init(&msm7x2x_clock_data);
#ifdef CONFIG_ZTE_PLATFORM
init_usb3v3();//USB-HML-001 enable ldo.
- #endif
-#ifdef CONFIG_ARCH_MSM7X27
- // /* Initialize the zero page for barriers and cache ops */
- // map_zero_page_strongly_ordered();
- /* This value has been set to 160000 for power savings. */
- /* OEMs may modify the value at their discretion for performance */
- /* The appropriate maximum replacement for 160000 is: */
- /* clk_get_max_axi_khz() */
- kgsl_pdata.high_axi_3d = 160000;
-
- /* 7x27 doesn't allow graphics clocks to be run asynchronously to */
- /* the AXI bus */
- kgsl_pdata.max_grp2d_freq = 0;
- kgsl_pdata.min_grp2d_freq = 0;
- kgsl_pdata.set_grp2d_async = NULL;
- kgsl_pdata.max_grp3d_freq = 0;
- kgsl_pdata.min_grp3d_freq = 0;
- kgsl_pdata.set_grp3d_async = NULL;
- kgsl_pdata.imem_clk_name = "imem_clk";
- kgsl_pdata.grp3d_clk_name = "grp_clk";
- kgsl_pdata.grp3d_pclk_name = "grp_pclk";
- kgsl_pdata.grp2d0_clk_name = NULL;
- kgsl_pdata.idle_timeout_3d = HZ/5;
- kgsl_pdata.idle_timeout_2d = 0;
-#ifdef CONFIG_KGSL_PER_PROCESS_PAGE_TABLE
- kgsl_pdata.pt_va_size = SZ_32M;
-#else
- kgsl_pdata.pt_va_size = SZ_128M;
#endif
-#endif
-
-
#if defined( CONFIG_TOUCHSCREEN_MSM_LEGACY) || defined( CONFIG_TOUCHSCREEN_MSM)
msm_device_tssc.dev.platform_data = &msm_tssc_pdata;
@@ -1349,31 +1349,56 @@ static void __init bt_power_init(void)
#endif
#ifdef CONFIG_ARCH_MSM7X27
-static struct resource kgsl_resources[] = {
- {
- .name = "kgsl_reg_memory",
- .start = 0xA0000000,
- .end = 0xA001ffff,
- .flags = IORESOURCE_MEM,
- },
- {
- .name = "kgsl_yamato_irq",
- .start = INT_GRAPHICS,
- .end = INT_GRAPHICS,
- .flags = IORESOURCE_IRQ,
- },
-};
-
-static struct kgsl_platform_data kgsl_pdata;
-static struct platform_device msm_device_kgsl = {
- .name = "kgsl",
- .id = -1,
- .num_resources = ARRAY_SIZE(kgsl_resources),
- .resource = kgsl_resources,
- .dev = {
- .platform_data = &kgsl_pdata,
- },
+static struct resource kgsl_3d0_resources[] = {
+ {
+ .name = KGSL_3D0_REG_MEMORY,
+ .start = 0xA0000000,
+ .end = 0xA001ffff,
+ .flags = IORESOURCE_MEM,
+ },
+ {
+ .name = KGSL_3D0_IRQ,
+ .start = INT_GRAPHICS,
+ .end = INT_GRAPHICS,
+ .flags = IORESOURCE_IRQ,
+ },
+};
+
+static struct kgsl_device_platform_data kgsl_3d0_pdata = {
+ .pwr_data = {
+ .pwrlevel = {
+ {
+ .gpu_freq = 128000000,
+ .bus_freq = 128000000,
+ },
+ },
+ .init_level = 0,
+ .num_levels = 1,
+ .set_grp_async = NULL,
+ .idle_timeout = HZ/5,
+ .nap_allowed = true,
+ },
+ .clk = {
+ .name = {
+ .clk = "grp_clk",
+ .pclk = "grp_pclk",
+ },
+ },
+ .imem_clk_name = {
+ .clk = "imem_clk",
+ .pclk = NULL,
+ },
+};
+
+struct platform_device msm_kgsl_3d0 = {
+ .name = "kgsl-3d0",
+ .id = 0,
+ .num_resources = ARRAY_SIZE(kgsl_3d0_resources),
+ .resource = kgsl_3d0_resources,
+ .dev = {
+ .platform_data = &kgsl_3d0_pdata,
+ },
};
#endif
@@ -2623,7 +2648,7 @@ static struct platform_device *devices[] __initdata = {
&msm_bluesleep_device,
&msm_bcmsleep_device,
#ifdef CONFIG_ARCH_MSM7X27
- &msm_device_kgsl,
+ &msm_kgsl_3d0,
#endif
#ifdef CONFIG_MT9P111
&msm_camera_sensor_mt9p111,
@@ -3245,33 +3270,6 @@ static void __init msm7x2x_init(void)
msm_acpu_clock_init(&msm7x2x_clock_data);
#ifdef CONFIG_ZTE_PLATFORM
init_usb3v3();
- #endif
-#ifdef CONFIG_ARCH_MSM7X27
- /* This value has been set to 160000 for power savings. */
- /* OEMs may modify the value at their discretion for performance */
- /* The appropriate maximum replacement for 160000 is: */
- /* clk_get_max_axi_khz() */
- kgsl_pdata.high_axi_3d = 160000;
-
- /* 7x27 doesn't allow graphics clocks to be run asynchronously to */
- /* the AXI bus */
- kgsl_pdata.max_grp2d_freq = 0;
- kgsl_pdata.min_grp2d_freq = 0;
- kgsl_pdata.set_grp2d_async = NULL;
- kgsl_pdata.max_grp3d_freq = 0;
- kgsl_pdata.min_grp3d_freq = 0;
- kgsl_pdata.set_grp3d_async = NULL;
- kgsl_pdata.imem_clk_name = "imem_clk";
- kgsl_pdata.grp3d_clk_name = "grp_clk";
- kgsl_pdata.grp3d_pclk_name = "grp_pclk";
- kgsl_pdata.grp2d0_clk_name = NULL;
- kgsl_pdata.idle_timeout_3d = HZ/5;
- kgsl_pdata.idle_timeout_2d = 0;
-#ifdef CONFIG_KGSL_PER_PROCESS_PAGE_TABLE
- kgsl_pdata.pt_va_size = SZ_32M;
-#else
- kgsl_pdata.pt_va_size = SZ_128M;
-#endif
#endif
#if defined( CONFIG_TOUCHSCREEN_MSM_LEGACY) || defined( CONFIG_TOUCHSCREEN_MSM)
Oops, something went wrong.

0 comments on commit c02c7df

Please sign in to comment.