summaryrefslogtreecommitdiff
path: root/shared-core/i915_dma.c
diff options
context:
space:
mode:
authorHong Liu <hong.liu@intel.com>2008-07-15 10:14:17 -0700
committerIan Romanick <ian.d.romanick@intel.com>2008-07-15 10:14:17 -0700
commitdfd441cf964f20e4a761cb8490d7cd82cf32e7b9 (patch)
tree152309de7821177bf9073ab8cb9337fc5421a321 /shared-core/i915_dma.c
parent764573f3b8bec90f20c3bdd58c4b55490fbbdaf4 (diff)
This is a modified version of Hong's patch from last month, with a few
modifications to make it work correctly on my test hardware (altered the backlight write function, made it enable the legacy backlight controller interrupts on mobile hardware, sorted the interrupt function so we don't get an excessive number of vblank interrupts). This lets the backlight keys on my T61 work properly, though there's a 750msec or so delay between the request and the brightness actually changing - this sounds awfully like the hardware spinning waiting for a status flag to become ready, but as far as I can tell they're all set correctly. If anyone can figure out what's wrong here, it'd be nice to know. Some of the functions are still stubs and just tell the hardware that the request was successful. These can be filled in as kernel modesetting gets integrated. I think it's worth getting this in anyway, since it's required for backlight control to work properly on some new platforms. Signed-off-by: Matthew Garrett <mjg@redhat.com>
Diffstat (limited to 'shared-core/i915_dma.c')
-rw-r--r--shared-core/i915_dma.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/shared-core/i915_dma.c b/shared-core/i915_dma.c
index 27d152cb..ad6e1293 100644
--- a/shared-core/i915_dma.c
+++ b/shared-core/i915_dma.c
@@ -1038,6 +1038,7 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25)
intel_init_chipset_flush_compat(dev);
#endif
+ intel_opregion_init(dev);
#endif
return ret;
@@ -1050,6 +1051,10 @@ int i915_driver_unload(struct drm_device *dev)
if (dev_priv->mmio_map)
drm_rmmap(dev, dev_priv->mmio_map);
+#ifdef __linux__
+ intel_opregion_free(dev);
+#endif
+
drm_free(dev->dev_private, sizeof(drm_i915_private_t),
DRM_MEM_DRIVER);
#ifdef __linux__