diff options
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r-- | drivers/gpu/drm/i915/i915_dma.c | 17 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/i915_drv.c | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/i915_drv.h | 2 |
3 files changed, 19 insertions, 4 deletions
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c index 9341eb8ce93b..8a62285ddbd0 100644 --- a/drivers/gpu/drm/i915/i915_dma.c +++ b/drivers/gpu/drm/i915/i915_dma.c | |||
@@ -1183,6 +1183,21 @@ static bool i915_switcheroo_can_switch(struct pci_dev *pdev) | |||
1183 | return can_switch; | 1183 | return can_switch; |
1184 | } | 1184 | } |
1185 | 1185 | ||
1186 | static bool | ||
1187 | intel_enable_ppgtt(struct drm_device *dev) | ||
1188 | { | ||
1189 | if (i915_enable_ppgtt >= 0) | ||
1190 | return i915_enable_ppgtt; | ||
1191 | |||
1192 | #ifdef CONFIG_INTEL_IOMMU | ||
1193 | /* Disable ppgtt on SNB if VT-d is on. */ | ||
1194 | if (INTEL_INFO(dev)->gen == 6 && intel_iommu_gfx_mapped) | ||
1195 | return false; | ||
1196 | #endif | ||
1197 | |||
1198 | return true; | ||
1199 | } | ||
1200 | |||
1186 | static int i915_load_gem_init(struct drm_device *dev) | 1201 | static int i915_load_gem_init(struct drm_device *dev) |
1187 | { | 1202 | { |
1188 | struct drm_i915_private *dev_priv = dev->dev_private; | 1203 | struct drm_i915_private *dev_priv = dev->dev_private; |
@@ -1197,7 +1212,7 @@ static int i915_load_gem_init(struct drm_device *dev) | |||
1197 | drm_mm_init(&dev_priv->mm.stolen, 0, prealloc_size); | 1212 | drm_mm_init(&dev_priv->mm.stolen, 0, prealloc_size); |
1198 | 1213 | ||
1199 | mutex_lock(&dev->struct_mutex); | 1214 | mutex_lock(&dev->struct_mutex); |
1200 | if (i915_enable_ppgtt && HAS_ALIASING_PPGTT(dev)) { | 1215 | if (intel_enable_ppgtt(dev) && HAS_ALIASING_PPGTT(dev)) { |
1201 | /* PPGTT pdes are stolen from global gtt ptes, so shrink the | 1216 | /* PPGTT pdes are stolen from global gtt ptes, so shrink the |
1202 | * aperture accordingly when using aliasing ppgtt. */ | 1217 | * aperture accordingly when using aliasing ppgtt. */ |
1203 | gtt_size -= I915_PPGTT_PD_ENTRIES*PAGE_SIZE; | 1218 | gtt_size -= I915_PPGTT_PD_ENTRIES*PAGE_SIZE; |
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index 77afd3176dd0..19d55bc54873 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c | |||
@@ -107,8 +107,8 @@ MODULE_PARM_DESC(enable_hangcheck, | |||
107 | "WARNING: Disabling this can cause system wide hangs. " | 107 | "WARNING: Disabling this can cause system wide hangs. " |
108 | "(default: true)"); | 108 | "(default: true)"); |
109 | 109 | ||
110 | bool i915_enable_ppgtt __read_mostly = 1; | 110 | int i915_enable_ppgtt __read_mostly = -1; |
111 | module_param_named(i915_enable_ppgtt, i915_enable_ppgtt, bool, 0600); | 111 | module_param_named(i915_enable_ppgtt, i915_enable_ppgtt, int, 0600); |
112 | MODULE_PARM_DESC(i915_enable_ppgtt, | 112 | MODULE_PARM_DESC(i915_enable_ppgtt, |
113 | "Enable PPGTT (default: true)"); | 113 | "Enable PPGTT (default: true)"); |
114 | 114 | ||
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 2c192270cb0d..5fabc6c31fec 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h | |||
@@ -1086,7 +1086,7 @@ extern int i915_vbt_sdvo_panel_type __read_mostly; | |||
1086 | extern int i915_enable_rc6 __read_mostly; | 1086 | extern int i915_enable_rc6 __read_mostly; |
1087 | extern int i915_enable_fbc __read_mostly; | 1087 | extern int i915_enable_fbc __read_mostly; |
1088 | extern bool i915_enable_hangcheck __read_mostly; | 1088 | extern bool i915_enable_hangcheck __read_mostly; |
1089 | extern bool i915_enable_ppgtt __read_mostly; | 1089 | extern int i915_enable_ppgtt __read_mostly; |
1090 | 1090 | ||
1091 | extern int i915_suspend(struct drm_device *dev, pm_message_t state); | 1091 | extern int i915_suspend(struct drm_device *dev, pm_message_t state); |
1092 | extern int i915_resume(struct drm_device *dev); | 1092 | extern int i915_resume(struct drm_device *dev); |