summaryrefslogtreecommitdiff
path: root/meta-moblin
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-01-26 15:59:18 +0000
committerRichard Purdie <rpurdie@linux.intel.com>2010-01-26 15:59:18 +0000
commit684d263e75a6a7ede638afa60e35a238e24c12ba (patch)
tree5ab1d38848909494b693e31d0a29659bcaa365e4 /meta-moblin
parent3a32c2c6e9d1d9823971a17c0ee8f8839bd79b1f (diff)
downloadopenembedded-core-684d263e75a6a7ede638afa60e35a238e24c12ba.tar.gz
openembedded-core-684d263e75a6a7ede638afa60e35a238e24c12ba.tar.bz2
openembedded-core-684d263e75a6a7ede638afa60e35a238e24c12ba.zip
linux-moblin: Add 2.6.31.5
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta-moblin')
-rw-r--r--meta-moblin/packages/linux/linux-moblin-2.6.31.5/MRST-GFX-driver-consolidated.patch44328
-rw-r--r--meta-moblin/packages/linux/linux-moblin-2.6.31.5/close_debug_info_of_rt2860.patch38
-rw-r--r--meta-moblin/packages/linux/linux-moblin-2.6.31.5/defconfig-netbook3220
-rw-r--r--meta-moblin/packages/linux/linux-moblin-2.6.31.5/linux-2.6-build-nonintconfig.patch142
-rw-r--r--meta-moblin/packages/linux/linux-moblin-2.6.31.5/linux-2.6-driver-level-usb-autosuspend.patch61
-rw-r--r--meta-moblin/packages/linux/linux-moblin-2.6.31.5/linux-2.6-usb-uvc-autosuspend.patch19
-rw-r--r--meta-moblin/packages/linux/linux-moblin-2.6.31.5/linux-2.6.29-dont-wait-for-mouse.patch47
-rw-r--r--meta-moblin/packages/linux/linux-moblin-2.6.31.5/linux-2.6.29-jbd-longer-commit-interval.patch25
-rw-r--r--meta-moblin/packages/linux/linux-moblin-2.6.31.5/linux-2.6.29-kms-after-sata.patch38
-rw-r--r--meta-moblin/packages/linux/linux-moblin-2.6.31.5/linux-2.6.29-kms-dont-blank-display.patch33
-rw-r--r--meta-moblin/packages/linux/linux-moblin-2.6.31.5/linux-2.6.29-kms-edid-cache.patch58
-rw-r--r--meta-moblin/packages/linux/linux-moblin-2.6.31.5/linux-2.6.29-kms-run-async.patch118
-rw-r--r--meta-moblin/packages/linux/linux-moblin-2.6.31.5/linux-2.6.29-silence-acer-message.patch22
-rw-r--r--meta-moblin/packages/linux/linux-moblin-2.6.31.5/linux-2.6.29-sreadahead.patch66
-rw-r--r--meta-moblin/packages/linux/linux-moblin-2.6.31.5/linux-2.6.29-touchkit.patch146
-rw-r--r--meta-moblin/packages/linux/linux-moblin-2.6.31.5/linux-2.6.30-non-root-X.patch32
-rw-r--r--meta-moblin/packages/linux/linux-moblin-2.6.31.5/linux-2.6.31-1-2-timberdale.patch12910
-rw-r--r--meta-moblin/packages/linux/linux-moblin-2.6.31.5/linux-2.6.31-2-2-timberdale.patch44
-rw-r--r--meta-moblin/packages/linux/linux-moblin-2.6.31.5/linux-2.6.31-bluetooth-suspend.patch465
-rw-r--r--meta-moblin/packages/linux/linux-moblin-2.6.31.5/linux-2.6.31-drm-i915-fix.patch26
-rw-r--r--meta-moblin/packages/linux/linux-moblin-2.6.31.5/linux-2.6.31-drm-i915-opregion.patch43
-rw-r--r--meta-moblin/packages/linux/linux-moblin-2.6.31.5/linux-2.6.31-drm-i915-vblank-fix.patch26
-rw-r--r--meta-moblin/packages/linux/linux-moblin-2.6.31.5/linux-2.6.31-drm-kms-flip.patch307
-rw-r--r--meta-moblin/packages/linux/linux-moblin-2.6.31.5/linux-2.6.31-drm-mem-info.patch140
-rw-r--r--meta-moblin/packages/linux/linux-moblin-2.6.31.5/linux-2.6.31-iegd.patch9290
-rw-r--r--meta-moblin/packages/linux/linux-moblin-2.6.31.5/linux-2.6.31-samsung.patch206
-rw-r--r--meta-moblin/packages/linux/linux-moblin-2.6.31.5/linux-2.6.31-silence-wacom.patch14
-rw-r--r--meta-moblin/packages/linux/linux-moblin-2.6.31.5/linux-2.6.32-acpi-cstate-fixup.patch173
-rw-r--r--meta-moblin/packages/linux/linux-moblin-2.6.31.5/linux-2.6.32-cpuidle.patch407
-rw-r--r--meta-moblin/packages/linux/linux-moblin-2.6.31.5/linux-2.6.32-n_tty-honor-opost-flag-for-echoes.patch86
-rw-r--r--meta-moblin/packages/linux/linux-moblin-2.6.31.5/linux-2.6.32-n_tty-move-echoctl-check-and-clean-up-logic.patch91
-rw-r--r--meta-moblin/packages/linux/linux-moblin-2.6.31.5/linux-2.6.32-timer-fix.patch64
-rw-r--r--meta-moblin/packages/linux/linux-moblin-2.6.31.5/linux-2.6.33-copy-checks.patch275
-rw-r--r--meta-moblin/packages/linux/linux-moblin-2.6.31.5/linux-2.6.33-pit-fix.patch95
-rw-r--r--meta-moblin/packages/linux/linux-moblin_2.6.31.5.bb47
35 files changed, 73102 insertions, 0 deletions
diff --git a/meta-moblin/packages/linux/linux-moblin-2.6.31.5/MRST-GFX-driver-consolidated.patch b/meta-moblin/packages/linux/linux-moblin-2.6.31.5/MRST-GFX-driver-consolidated.patch
new file mode 100644
index 0000000000..e7676e3725
--- /dev/null
+++ b/meta-moblin/packages/linux/linux-moblin-2.6.31.5/MRST-GFX-driver-consolidated.patch
@@ -0,0 +1,44328 @@
+From 42e6f8da6d694e77678b7ffd8a32a5e9ab56efe3 Mon Sep 17 00:00:00 2001
+From: Alan Olsen <alan.r.olsen@intel.com>
+Date: Thu, 15 Oct 2009 10:42:37 -0700
+Subject: [PATCH] Moorestown graphics consolidation patch v2.10
+
+Includes all patches through v2.10 of the PSB drivers as well as
+Alpha2-2.9-mrst-GFX-driver-incremental-restore-MSIreg-in-PCIx.patch.
+
+Signed-off-by: Thomas Hellstrom <thellstrom-at-vmware-dot-com>
+Signed-off-by: Sophia (Chia-Hung) Kuo <chia-hung.s.kuo@intel.com>
+Signed-off-by: Alan Olsen <alan.r.olsen@intel.com>
+---
+ drivers/gpu/drm/Kconfig | 12 +
+ drivers/gpu/drm/Makefile | 3 +-
+ drivers/gpu/drm/drm_crtc.c | 130 ++
+ drivers/gpu/drm/drm_drv.c | 13 +-
+ drivers/gpu/drm/drm_global.c | 107 +
+ drivers/gpu/drm/drm_irq.c | 30 +
+ drivers/gpu/drm/psb/Makefile | 19 +
+ drivers/gpu/drm/psb/lnc_topaz.c | 676 +++++++
+ drivers/gpu/drm/psb/lnc_topaz.h | 902 +++++++++
+ drivers/gpu/drm/psb/lnc_topazinit.c | 2058 ++++++++++++++++++++
+ drivers/gpu/drm/psb/psb_bl.c | 232 +++
+ drivers/gpu/drm/psb/psb_buffer.c | 519 +++++
+ drivers/gpu/drm/psb/psb_dpst.c | 208 ++
+ drivers/gpu/drm/psb/psb_dpst.h | 90 +
+ drivers/gpu/drm/psb/psb_drm.h | 716 +++++++
+ drivers/gpu/drm/psb/psb_drv.c | 2239 +++++++++++++++++++++
+ drivers/gpu/drm/psb/psb_drv.h | 1224 ++++++++++++
+ drivers/gpu/drm/psb/psb_fb.c | 1833 +++++++++++++++++
+ drivers/gpu/drm/psb/psb_fb.h | 47 +
+ drivers/gpu/drm/psb/psb_fence.c | 359 ++++
+ drivers/gpu/drm/psb/psb_gtt.c | 278 +++
+ drivers/gpu/drm/psb/psb_hotplug.c | 427 ++++
+ drivers/gpu/drm/psb/psb_hotplug.h | 96 +
+ drivers/gpu/drm/psb/psb_intel_bios.c | 309 +++
+ drivers/gpu/drm/psb/psb_intel_bios.h | 436 +++++
+ drivers/gpu/drm/psb/psb_intel_display.c | 2484 ++++++++++++++++++++++++
+ drivers/gpu/drm/psb/psb_intel_display.h | 31 +
+ drivers/gpu/drm/psb/psb_intel_drv.h | 246 +++
+ drivers/gpu/drm/psb/psb_intel_dsi.c | 1798 +++++++++++++++++
+ drivers/gpu/drm/psb/psb_intel_i2c.c | 179 ++
+ drivers/gpu/drm/psb/psb_intel_lvds.c | 1343 +++++++++++++
+ drivers/gpu/drm/psb/psb_intel_modes.c | 64 +
+ drivers/gpu/drm/psb/psb_intel_reg.h | 1015 ++++++++++
+ drivers/gpu/drm/psb/psb_intel_sdvo.c | 1350 +++++++++++++
+ drivers/gpu/drm/psb/psb_intel_sdvo_regs.h | 345 ++++
+ drivers/gpu/drm/psb/psb_irq.c | 621 ++++++
+ drivers/gpu/drm/psb/psb_mmu.c | 1073 ++++++++++
+ drivers/gpu/drm/psb/psb_msvdx.c | 855 ++++++++
+ drivers/gpu/drm/psb/psb_msvdx.h | 527 +++++
+ drivers/gpu/drm/psb/psb_msvdxinit.c | 747 +++++++
+ drivers/gpu/drm/psb/psb_powermgmt.c | 1146 +++++++++++
+ drivers/gpu/drm/psb/psb_powermgmt.h | 73 +
+ drivers/gpu/drm/psb/psb_reg.h | 574 ++++++
+ drivers/gpu/drm/psb/psb_reset.c | 484 +++++
+ drivers/gpu/drm/psb/psb_scene.c | 523 +++++
+ drivers/gpu/drm/psb/psb_scene.h | 119 ++
+ drivers/gpu/drm/psb/psb_schedule.c | 1593 +++++++++++++++
+ drivers/gpu/drm/psb/psb_schedule.h | 181 ++
+ drivers/gpu/drm/psb/psb_setup.c | 18 +
+ drivers/gpu/drm/psb/psb_sgx.c | 1784 +++++++++++++++++
+ drivers/gpu/drm/psb/psb_sgx.h | 41 +
+ drivers/gpu/drm/psb/psb_socket.c | 340 ++++
+ drivers/gpu/drm/psb/psb_ttm_glue.c | 342 ++++
+ drivers/gpu/drm/psb/psb_umevents.c | 490 +++++
+ drivers/gpu/drm/psb/psb_umevents.h | 150 ++
+ drivers/gpu/drm/psb/psb_xhw.c | 652 +++++++
+ drivers/gpu/drm/psb/ttm/ttm_agp_backend.c | 149 ++
+ drivers/gpu/drm/psb/ttm/ttm_bo.c | 1716 ++++++++++++++++
+ drivers/gpu/drm/psb/ttm/ttm_bo_api.h | 578 ++++++
+ drivers/gpu/drm/psb/ttm/ttm_bo_driver.h | 859 ++++++++
+ drivers/gpu/drm/psb/ttm/ttm_bo_util.c | 536 +++++
+ drivers/gpu/drm/psb/ttm/ttm_bo_vm.c | 596 ++++++
+ drivers/gpu/drm/psb/ttm/ttm_execbuf_util.c | 115 ++
+ drivers/gpu/drm/psb/ttm/ttm_execbuf_util.h | 110 ++
+ drivers/gpu/drm/psb/ttm/ttm_fence.c | 607 ++++++
+ drivers/gpu/drm/psb/ttm/ttm_fence_api.h | 277 +++
+ drivers/gpu/drm/psb/ttm/ttm_fence_driver.h | 309 +++
+ drivers/gpu/drm/psb/ttm/ttm_fence_user.c | 242 +++
+ drivers/gpu/drm/psb/ttm/ttm_fence_user.h | 147 ++
+ drivers/gpu/drm/psb/ttm/ttm_lock.c | 162 ++
+ drivers/gpu/drm/psb/ttm/ttm_lock.h | 181 ++
+ drivers/gpu/drm/psb/ttm/ttm_memory.c | 232 +++
+ drivers/gpu/drm/psb/ttm/ttm_memory.h | 154 ++
+ drivers/gpu/drm/psb/ttm/ttm_object.c | 444 +++++
+ drivers/gpu/drm/psb/ttm/ttm_object.h | 269 +++
+ drivers/gpu/drm/psb/ttm/ttm_pat_compat.c | 178 ++
+ drivers/gpu/drm/psb/ttm/ttm_pat_compat.h | 41 +
+ drivers/gpu/drm/psb/ttm/ttm_placement_common.h | 98 +
+ drivers/gpu/drm/psb/ttm/ttm_placement_user.c | 468 +++++
+ drivers/gpu/drm/psb/ttm/ttm_placement_user.h | 259 +++
+ drivers/gpu/drm/psb/ttm/ttm_regman.h | 74 +
+ drivers/gpu/drm/psb/ttm/ttm_tt.c | 655 +++++++
+ drivers/gpu/drm/psb/ttm/ttm_userobj_api.h | 79 +
+ include/drm/drm.h | 1 +
+ include/drm/drmP.h | 30 +
+ include/drm/drm_crtc.h | 12 +
+ include/drm/drm_mode.h | 18 +
+ include/linux/backlight.h | 3 +
+ 89 files changed, 43758 insertions(+), 2 deletions(-)
+ create mode 100644 drivers/gpu/drm/drm_global.c
+ create mode 100644 drivers/gpu/drm/psb/Makefile
+ create mode 100644 drivers/gpu/drm/psb/lnc_topaz.c
+ create mode 100644 drivers/gpu/drm/psb/lnc_topaz.h
+ create mode 100644 drivers/gpu/drm/psb/lnc_topazinit.c
+ create mode 100644 drivers/gpu/drm/psb/psb_bl.c
+ create mode 100644 drivers/gpu/drm/psb/psb_buffer.c
+ create mode 100644 drivers/gpu/drm/psb/psb_dpst.c
+ create mode 100644 drivers/gpu/drm/psb/psb_dpst.h
+ create mode 100644 drivers/gpu/drm/psb/psb_drm.h
+ create mode 100644 drivers/gpu/drm/psb/psb_drv.c
+ create mode 100644 drivers/gpu/drm/psb/psb_drv.h
+ create mode 100644 drivers/gpu/drm/psb/psb_fb.c
+ create mode 100644 drivers/gpu/drm/psb/psb_fb.h
+ create mode 100644 drivers/gpu/drm/psb/psb_fence.c
+ create mode 100644 drivers/gpu/drm/psb/psb_gtt.c
+ create mode 100644 drivers/gpu/drm/psb/psb_hotplug.c
+ create mode 100644 drivers/gpu/drm/psb/psb_hotplug.h
+ create mode 100644 drivers/gpu/drm/psb/psb_intel_bios.c
+ create mode 100644 drivers/gpu/drm/psb/psb_intel_bios.h
+ create mode 100644 drivers/gpu/drm/psb/psb_intel_display.c
+ create mode 100644 drivers/gpu/drm/psb/psb_intel_display.h
+ create mode 100644 drivers/gpu/drm/psb/psb_intel_drv.h
+ create mode 100644 drivers/gpu/drm/psb/psb_intel_dsi.c
+ create mode 100644 drivers/gpu/drm/psb/psb_intel_i2c.c
+ create mode 100644 drivers/gpu/drm/psb/psb_intel_lvds.c
+ create mode 100644 drivers/gpu/drm/psb/psb_intel_modes.c
+ create mode 100644 drivers/gpu/drm/psb/psb_intel_reg.h
+ create mode 100644 drivers/gpu/drm/psb/psb_intel_sdvo.c
+ create mode 100644 drivers/gpu/drm/psb/psb_intel_sdvo_regs.h
+ create mode 100644 drivers/gpu/drm/psb/psb_irq.c
+ create mode 100644 drivers/gpu/drm/psb/psb_mmu.c
+ create mode 100644 drivers/gpu/drm/psb/psb_msvdx.c
+ create mode 100644 drivers/gpu/drm/psb/psb_msvdx.h
+ create mode 100644 drivers/gpu/drm/psb/psb_msvdxinit.c
+ create mode 100644 drivers/gpu/drm/psb/psb_powermgmt.c
+ create mode 100644 drivers/gpu/drm/psb/psb_powermgmt.h
+ create mode 100644 drivers/gpu/drm/psb/psb_reg.h
+ create mode 100644 drivers/gpu/drm/psb/psb_reset.c
+ create mode 100644 drivers/gpu/drm/psb/psb_scene.c
+ create mode 100644 drivers/gpu/drm/psb/psb_scene.h
+ create mode 100644 drivers/gpu/drm/psb/psb_schedule.c
+ create mode 100644 drivers/gpu/drm/psb/psb_schedule.h
+ create mode 100644 drivers/gpu/drm/psb/psb_setup.c
+ create mode 100644 drivers/gpu/drm/psb/psb_sgx.c
+ create mode 100644 drivers/gpu/drm/psb/psb_sgx.h
+ create mode 100644 drivers/gpu/drm/psb/psb_socket.c
+ create mode 100644 drivers/gpu/drm/psb/psb_ttm_glue.c
+ create mode 100644 drivers/gpu/drm/psb/psb_umevents.c
+ create mode 100644 drivers/gpu/drm/psb/psb_umevents.h
+ create mode 100644 drivers/gpu/drm/psb/psb_xhw.c
+ create mode 100644 drivers/gpu/drm/psb/ttm/ttm_agp_backend.c
+ create mode 100644 drivers/gpu/drm/psb/ttm/ttm_bo.c
+ create mode 100644 drivers/gpu/drm/psb/ttm/ttm_bo_api.h
+ create mode 100644 drivers/gpu/drm/psb/ttm/ttm_bo_driver.h
+ create mode 100644 drivers/gpu/drm/psb/ttm/ttm_bo_util.c
+ create mode 100644 drivers/gpu/drm/psb/ttm/ttm_bo_vm.c
+ create mode 100644 drivers/gpu/drm/psb/ttm/ttm_execbuf_util.c
+ create mode 100644 drivers/gpu/drm/psb/ttm/ttm_execbuf_util.h
+ create mode 100644 drivers/gpu/drm/psb/ttm/ttm_fence.c
+ create mode 100644 drivers/gpu/drm/psb/ttm/ttm_fence_api.h
+ create mode 100644 drivers/gpu/drm/psb/ttm/ttm_fence_driver.h
+ create mode 100644 drivers/gpu/drm/psb/ttm/ttm_fence_user.c
+ create mode 100644 drivers/gpu/drm/psb/ttm/ttm_fence_user.h
+ create mode 100644 drivers/gpu/drm/psb/ttm/ttm_lock.c
+ create mode 100644 drivers/gpu/drm/psb/ttm/ttm_lock.h
+ create mode 100644 drivers/gpu/drm/psb/ttm/ttm_memory.c
+ create mode 100644 drivers/gpu/drm/psb/ttm/ttm_memory.h
+ create mode 100644 drivers/gpu/drm/psb/ttm/ttm_object.c
+ create mode 100644 drivers/gpu/drm/psb/ttm/ttm_object.h
+ create mode 100644 drivers/gpu/drm/psb/ttm/ttm_pat_compat.c
+ create mode 100644 drivers/gpu/drm/psb/ttm/ttm_pat_compat.h
+ create mode 100644 drivers/gpu/drm/psb/ttm/ttm_placement_common.h
+ create mode 100644 drivers/gpu/drm/psb/ttm/ttm_placement_user.c
+ create mode 100644 drivers/gpu/drm/psb/ttm/ttm_placement_user.h
+ create mode 100644 drivers/gpu/drm/psb/ttm/ttm_regman.h
+ create mode 100644 drivers/gpu/drm/psb/ttm/ttm_tt.c
+ create mode 100644 drivers/gpu/drm/psb/ttm/ttm_userobj_api.h
+
+diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
+index 39b393d..9bd8ca1 100644
+--- a/drivers/gpu/drm/Kconfig
++++ b/drivers/gpu/drm/Kconfig
+@@ -143,3 +143,15 @@ config DRM_SAVAGE
+ help
+ Choose this option if you have a Savage3D/4/SuperSavage/Pro/Twister
+ chipset. If M is selected the module will be called savage.
++
++config DRM_PSB
++ tristate "Intel Poulsbo/Moorestown"
++ depends on DRM && PCI
++ select FB_CFB_COPYAREA
++ select FB_CFB_FILLRECT
++ select FB_CFB_IMAGEBLIT
++ select MRST_RAR_HANDLER
++ help
++ Choose this option if you have a Poulsbo or Moorestown platform.
++ If M is selected the module will be called psb.
++
+diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile
+index d76f167..4989b1e 100644
+--- a/drivers/gpu/drm/Makefile
++++ b/drivers/gpu/drm/Makefile
+@@ -15,12 +15,13 @@ drm-y := drm_auth.o drm_bufs.o drm_cache.o \
+ drm_agpsupport.o drm_scatter.o ati_pcigart.o drm_pci.o \
+ drm_sysfs.o drm_hashtab.o drm_sman.o drm_mm.o \
+ drm_crtc.o drm_crtc_helper.o drm_modes.o drm_edid.o \
+- drm_info.o drm_debugfs.o
++ drm_info.o drm_debugfs.o drm_global.o
+
+ drm-$(CONFIG_COMPAT) += drm_ioc32.o
+
+ obj-$(CONFIG_DRM) += drm.o
+ obj-$(CONFIG_DRM_TTM) += ttm/
++obj-$(CONFIG_DRM_PSB) +=psb/
+ obj-$(CONFIG_DRM_TDFX) += tdfx/
+ obj-$(CONFIG_DRM_R128) += r128/
+ obj-$(CONFIG_DRM_RADEON)+= radeon/
+diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
+index 2f631c7..11cd2e8 100644
+--- a/drivers/gpu/drm/drm_crtc.c
++++ b/drivers/gpu/drm/drm_crtc.c
+@@ -146,6 +146,7 @@ static struct drm_conn_prop_enum_list drm_connector_enum_list[] =
+ { DRM_MODE_CONNECTOR_DisplayPort, "DisplayPort", 0 },
+ { DRM_MODE_CONNECTOR_HDMIA, "HDMI Type A", 0 },
+ { DRM_MODE_CONNECTOR_HDMIB, "HDMI Type B", 0 },
++ { DRM_MODE_CONNECTOR_MIPI, "MIPI", 0 },
+ };
+
+ static struct drm_prop_enum_list drm_encoder_enum_list[] =
+@@ -154,6 +155,7 @@ static struct drm_prop_enum_list drm_encoder_enum_list[] =
+ { DRM_MODE_ENCODER_TMDS, "TMDS" },
+ { DRM_MODE_ENCODER_LVDS, "LVDS" },
+ { DRM_MODE_ENCODER_TVDAC, "TV" },
++ { DRM_MODE_ENCODER_MIPI, "MIPI" },
+ };
+
+ char *drm_get_encoder_name(struct drm_encoder *encoder)
+diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
+index b7f3a41..81195a7 100644
+--- a/drivers/gpu/drm/drm_drv.c
++++ b/drivers/gpu/drm/drm_drv.c
+@@ -344,6 +345,8 @@ static int __init drm_core_init(void)
+
+ DRM_INFO("Initialized %s %d.%d.%d %s\n",
+ CORE_NAME, CORE_MAJOR, CORE_MINOR, CORE_PATCHLEVEL, CORE_DATE);
++ drm_global_init();
++
+ return 0;
+ err_p3:
+ drm_sysfs_destroy();
+@@ -357,6 +360,7 @@ err_p1:
+
+ static void __exit drm_core_exit(void)
+ {
++ drm_global_release();
+ remove_proc_entry("dri", NULL);
+ debugfs_remove(drm_debugfs_root);
+ drm_sysfs_destroy();
+@@ -408,9 +412,16 @@ static int drm_version(struct drm_device *dev, void *data,
+ * Looks up the ioctl function in the ::ioctls table, checking for root
+ * previleges if so required, and dispatches to the respective function.
+ */
++
+ int drm_ioctl(struct inode *inode, struct file *filp,
+ unsigned int cmd, unsigned long arg)
+ {
++ return drm_unlocked_ioctl(filp, cmd, arg);
++}
++EXPORT_SYMBOL(drm_ioctl);
++
++long drm_unlocked_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
++{
+ struct drm_file *file_priv = filp->private_data;
+ struct drm_device *dev = file_priv->minor->dev;
+ struct drm_ioctl_desc *ioctl;
+@@ -493,7 +504,7 @@ int drm_ioctl(struct inode *inode, struct file *filp,
+ return retcode;
+ }
+
+-EXPORT_SYMBOL(drm_ioctl);
++EXPORT_SYMBOL(drm_unlocked_ioctl);
+
+ struct drm_local_map *drm_getsarea(struct drm_device *dev)
+ {
+diff --git a/drivers/gpu/drm/drm_global.c b/drivers/gpu/drm/drm_global.c
+new file mode 100644
+index 0000000..e054c4f
+--- /dev/null
++++ b/drivers/gpu/drm/drm_global.c
+@@ -0,0 +1,107 @@
++/**************************************************************************
++ *
++ * Copyright 2008-2009 VMware, Inc., Palo Alto, CA., USA
++ * All Rights Reserved.
++ *
++ * 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, sub license, 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 NON-INFRINGEMENT. IN NO EVENT SHALL
++ * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS 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.
++ *
++ **************************************************************************/
++#include <drmP.h>
++struct drm_global_item {
++ struct mutex mutex;
++ void *object;
++ int refcount;
++};
++
++static struct drm_global_item glob[DRM_GLOBAL_NUM];
++
++void drm_global_init(void)
++{
++ int i;
++
++ for (i = 0; i < DRM_GLOBAL_NUM; ++i) {
++ struct drm_global_item *item = &glob[i];
++ mutex_init(&item->mutex);
++ item->object = NULL;
++ item->refcount = 0;
++ }
++}
++
++void drm_global_release(void)
++{
++ int i;
++ for (i = 0; i < DRM_GLOBAL_NUM; ++i) {
++ struct drm_global_item *item = &glob[i];
++ BUG_ON(item->object != NULL);
++ BUG_ON(item->refcount != 0);
++ }
++}
++
++int drm_global_item_ref(struct drm_global_reference *ref)
++{
++ int ret;
++ struct drm_global_item *item = &glob[ref->global_type];
++ void *object;
++
++ mutex_lock(&item->mutex);
++ if (item->refcount == 0) {
++ item->object = kmalloc(ref->size, GFP_KERNEL);
++ if (unlikely(item->object == NULL)) {
++ ret = -ENOMEM;
++ goto out_err;
++ }
++
++ ref->object = item->object;
++ ret = ref->init(ref);
++ if (unlikely(ret != 0))
++ goto out_err;
++
++ ++item->refcount;
++ }
++ ref->object = item->object;
++ object = item->object;
++ mutex_unlock(&item->mutex);
++ return 0;
++ out_err:
++ kfree(item->object);
++ mutex_unlock(&item->mutex);
++ item->object = NULL;
++ return ret;
++}
++
++EXPORT_SYMBOL(drm_global_item_ref);
++
++void drm_global_item_unref(struct drm_global_reference *ref)
++{
++ struct drm_global_item *item = &glob[ref->global_type];
++
++ mutex_lock(&item->mutex);
++ BUG_ON(item->refcount == 0);
++ BUG_ON(ref->object != item->object);
++ if (--item->refcount == 0) {
++ ref->release(ref);
++ kfree(item->object);
++ item->object = NULL;
++ }
++ mutex_unlock(&item->mutex);
++}
++
++EXPORT_SYMBOL(drm_global_item_unref);
+diff --git a/drivers/gpu/drm/psb/Makefile b/drivers/gpu/drm/psb/Makefile
+new file mode 100644
+index 0000000..67319ba
+--- /dev/null
++++ b/drivers/gpu/drm/psb/Makefile
+@@ -0,0 +1,19 @@
++#
++# Makefile for the drm device driver. This driver provides support for the
++# Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher.
++
++ccflags-y := -Idrivers/gpu/drm/psb -Iinclude/drm -Iinclude/linux
++
++psb-y := psb_drv.o psb_mmu.o psb_sgx.o psb_irq.o psb_fence.o \
++ psb_buffer.o psb_gtt.o psb_schedule.o psb_scene.o \
++ psb_reset.o psb_xhw.o psb_msvdx.o psb_bl.o psb_intel_bios.o\
++ psb_umevents.o psb_hotplug.o psb_socket.o psb_dpst.o \
++ psb_powermgmt.o lnc_topaz.o lnc_topazinit.o \
++ psb_msvdxinit.o psb_ttm_glue.o psb_fb.o psb_setup.o \
++ ttm/ttm_object.o ttm/ttm_lock.o ttm/ttm_fence_user.o \
++ ttm/ttm_fence.o ttm/ttm_tt.o ttm/ttm_execbuf_util.o \
++ ttm/ttm_bo.o ttm/ttm_bo_util.o ttm/ttm_placement_user.o \
++ ttm/ttm_bo_vm.o ttm/ttm_pat_compat.o ttm/ttm_memory.o
++
++obj-$(CONFIG_DRM_PSB) += psb.o
++
+diff --git a/drivers/gpu/drm/psb/lnc_topaz.c b/drivers/gpu/drm/psb/lnc_topaz.c
+new file mode 100644
+index 0000000..adabac5
+--- /dev/null
++++ b/drivers/gpu/drm/psb/lnc_topaz.c
+@@ -0,0 +1,676 @@
++/**
++ * file lnc_topaz.c
++ * TOPAZ I/O operations and IRQ handling
++ *
++ */
++
++/**************************************************************************
++ *
++ * Copyright (c) 2007 Intel Corporation, Hillsboro, OR, USA
++ * Copyright (c) Imagination Technologies Limited, UK
++ * All Rights Reserved.
++ *
++ * 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, sub license, 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 NON-INFRINGEMENT. IN NO EVENT SHALL
++ * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS 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.
++ *
++ **************************************************************************/
++
++/* include headers */
++/* #define DRM_DEBUG_CODE 2 */
++
++#include <drm/drmP.h>
++#include <drm/drm_os_linux.h>
++
++#include "psb_drv.h"
++#include "psb_drm.h"
++#include "lnc_topaz.h"
++#include "psb_powermgmt.h"
++
++#include <linux/io.h>
++#include <linux/delay.h>
++
++
++/* static function define */
++static int lnc_topaz_deliver_command(struct drm_device *dev,
++ struct ttm_buffer_object *cmd_buffer,
++ unsigned long cmd_offset,
++ unsigned long cmd_size,
++ void **topaz_cmd, uint32_t sequence,
++ int copy_cmd);
++static int lnc_topaz_send(struct drm_device *dev, void *cmd,
++ unsigned long cmd_size, uint32_t sync_seq);
++static int lnc_mtx_send(struct drm_psb_private *dev_priv, const void *cmd);
++static int lnc_topaz_dequeue_send(struct drm_device *dev);
++static int lnc_topaz_save_command(struct drm_device *dev, void *cmd,
++ unsigned long cmd_size, uint32_t sequence);
++
++void lnc_topaz_interrupt(struct drm_device *dev, uint32_t topaz_stat)
++{
++ struct drm_psb_private *dev_priv =
++ (struct drm_psb_private *)dev->dev_private;
++ uint32_t clr_flag = lnc_topaz_queryirq(dev);
++ struct topaz_private *topaz_priv = dev_priv->topaz_private;
++ uint32_t cur_seq;
++
++ lnc_topaz_clearirq(dev, clr_flag);
++
++ /* ignore non-SYNC interrupts */
++ if ((CCB_CTRL_SEQ(dev_priv) & 0x8000) == 0)
++ return;
++
++ cur_seq = *(uint32_t *)topaz_priv->topaz_sync_addr;
++
++ PSB_DEBUG_IRQ("TOPAZ:Got SYNC IRQ,sync seq:0x%08x (MTX) vs 0x%08x\n",
++ cur_seq, dev_priv->sequence[LNC_ENGINE_ENCODE]);
++
++ psb_fence_handler(dev, LNC_ENGINE_ENCODE);
++
++ /* save frame skip flag for query */
++ topaz_priv->frame_skip = CCB_CTRL_FRAMESKIP(dev_priv);
++
++ topaz_priv->topaz_busy = 1;
++ lnc_topaz_dequeue_send(dev);
++
++ if (drm_topaz_pmpolicy == PSB_PMPOLICY_POWERDOWN)
++ schedule_delayed_work(&dev_priv->scheduler.topaz_suspend_wq, 0);
++}
++
++static int lnc_submit_encode_cmdbuf(struct drm_device *dev,
++ struct ttm_buffer_object *cmd_buffer,
++ unsigned long cmd_offset, unsigned long cmd_size,
++ struct ttm_fence_object *fence)
++{
++ struct drm_psb_private *dev_priv = dev->dev_private;
++ unsigned long irq_flags;
++ int ret = 0;
++ void *cmd;
++ uint32_t sequence = dev_priv->sequence[LNC_ENGINE_ENCODE];
++ struct topaz_private *topaz_priv = dev_priv->topaz_private;
++
++ PSB_DEBUG_GENERAL("TOPAZ: command submit\n");
++
++ PSB_DEBUG_GENERAL("TOPAZ: topaz busy = %d\n", topaz_priv->topaz_busy);
++
++ if (topaz_priv->topaz_fw_loaded == 0) {
++ /* #.# load fw to driver */
++ PSB_DEBUG_INIT("TOPAZ: load /lib/firmware/topaz_fw.bin\n");
++ ret = topaz_init_fw(dev);
++ if (ret != 0) {
++ /* FIXME: find a proper return value */
++ DRM_ERROR("TOPAX:load /lib/firmware/topaz_fw.bin fail,"
++ "ensure udevd is configured correctly!\n");
++
++ return -EFAULT;
++ }
++ topaz_priv->topaz_fw_loaded = 1;
++ }
++
++ /* # schedule watchdog */
++ /* psb_schedule_watchdog(dev_priv); */
++
++ /* # spin lock irq save [msvdx_lock] */
++ spin_lock_irqsave(&topaz_priv->topaz_lock, irq_flags);
++
++ /* # if topaz need to reset, reset it */
++ if (topaz_priv->topaz_needs_reset) {
++ /* #.# reset it */
++ spin_unlock_irqrestore(&topaz_priv->topaz_lock, irq_flags);
++ PSB_DEBUG_GENERAL("TOPAZ: needs reset.\n");
++
++ if (lnc_topaz_reset(dev_priv)) {
++ ret = -EBUSY;
++ DRM_ERROR("TOPAZ: reset failed.\n");
++ return ret;
++ }
++
++ PSB_DEBUG_GENERAL("TOPAZ: reset ok.\n");
++
++ /* #.# upload firmware */
++ if (topaz_setup_fw(dev, topaz_priv->topaz_cur_codec)) {
++ DRM_ERROR("TOPAZ: upload FW to HW failed\n");
++ return -EBUSY;
++ }
++
++ spin_lock_irqsave(&topaz_priv->topaz_lock, irq_flags);
++ }
++
++ if (!topaz_priv->topaz_busy) {
++ /* # direct map topaz command if topaz is free */
++ PSB_DEBUG_GENERAL("TOPAZ:direct send command,sequence %08x \n",
++ sequence);
++
++ topaz_priv->topaz_busy = 1;
++ spin_unlock_irqrestore(&topaz_priv->topaz_lock, irq_flags);
++
++ ret = lnc_topaz_deliver_command(dev, cmd_buffer, cmd_offset,
++ cmd_size, NULL, sequence, 0);
++
++ if (ret) {
++ DRM_ERROR("TOPAZ: failed to extract cmd...\n");
++