aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_dma.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/i915/i915_dma.c')
-rw-r--r--drivers/gpu/drm/i915/i915_dma.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index e6800819bca8..cb900dc83d95 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -34,6 +34,7 @@
34#include "i915_drm.h" 34#include "i915_drm.h"
35#include "i915_drv.h" 35#include "i915_drv.h"
36#include "i915_trace.h" 36#include "i915_trace.h"
37#include "../../../platform/x86/intel_ips.h"
37#include <linux/pci.h> 38#include <linux/pci.h>
38#include <linux/vgaarb.h> 39#include <linux/vgaarb.h>
39#include <linux/acpi.h> 40#include <linux/acpi.h>
@@ -1871,6 +1872,26 @@ out_unlock:
1871EXPORT_SYMBOL_GPL(i915_gpu_turbo_disable); 1872EXPORT_SYMBOL_GPL(i915_gpu_turbo_disable);
1872 1873
1873/** 1874/**
1875 * Tells the intel_ips driver that the i915 driver is now loaded, if
1876 * IPS got loaded first.
1877 *
1878 * This awkward dance is so that neither module has to depend on the
1879 * other in order for IPS to do the appropriate communication of
1880 * GPU turbo limits to i915.
1881 */
1882static void
1883ips_ping_for_i915_load(void)
1884{
1885 void (*link)(void);
1886
1887 link = symbol_get(ips_link_to_i915_driver);
1888 if (link) {
1889 link();
1890 symbol_put(ips_link_to_i915_driver);
1891 }
1892}
1893
1894/**
1874 * i915_driver_load - setup chip and create an initial config 1895 * i915_driver_load - setup chip and create an initial config
1875 * @dev: DRM device 1896 * @dev: DRM device
1876 * @flags: startup flags 1897 * @flags: startup flags
@@ -2075,6 +2096,8 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
2075 dev_priv->mchdev_lock = &mchdev_lock; 2096 dev_priv->mchdev_lock = &mchdev_lock;
2076 spin_unlock(&mchdev_lock); 2097 spin_unlock(&mchdev_lock);
2077 2098
2099 ips_ping_for_i915_load();
2100
2078 return 0; 2101 return 0;
2079 2102
2080out_workqueue_free: 2103out_workqueue_free: