aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_overlay.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-08-19 03:19:30 -0400
committerChris Wilson <chris@chris-wilson.co.uk>2010-09-08 05:23:55 -0400
commit3bd3c9329973a93fa3ef5e9840f2fd6fa2889e3f (patch)
treeff0f4e7631d46664c5c6b9990a283842b597b8b1 /drivers/gpu/drm/i915/intel_overlay.c
parentb303cf9542b016e2af3b9d17255a7f93cd790ef5 (diff)
drm/i915: Compile out error state without DEBUG_FS
Alexander reported that the compilation of intel_overlay.c was failing due to an inclusion that was only valid with CONFIG_DEBUG_FS. As the whole error reporting is only useful with debugfs enabled, remove all the redundant error state collection code when compiling without CONFIG_DEBUG_FS. Reported-by: Alexander Lam <lambchop468@gmail.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_overlay.c')
-rw-r--r--drivers/gpu/drm/i915/intel_overlay.c55
1 files changed, 30 insertions, 25 deletions
diff --git a/drivers/gpu/drm/i915/intel_overlay.c b/drivers/gpu/drm/i915/intel_overlay.c
index bb2256f9dbc8..743ced7c4ae7 100644
--- a/drivers/gpu/drm/i915/intel_overlay.c
+++ b/drivers/gpu/drm/i915/intel_overlay.c
@@ -190,31 +190,6 @@ struct intel_overlay {
190}; 190};
191 191
192static struct overlay_registers * 192static struct overlay_registers *
193intel_overlay_map_regs_atomic(struct intel_overlay *overlay,
194 int slot)
195{
196 drm_i915_private_t *dev_priv = overlay->dev->dev_private;
197 struct overlay_registers *regs;
198
199 if (OVERLAY_NEEDS_PHYSICAL(overlay->dev))
200 regs = overlay->reg_bo->phys_obj->handle->vaddr;
201 else
202 regs = io_mapping_map_atomic_wc(dev_priv->mm.gtt_mapping,
203 overlay->reg_bo->gtt_offset,
204 slot);
205
206 return regs;
207}
208
209static void intel_overlay_unmap_regs_atomic(struct intel_overlay *overlay,
210 int slot,
211 struct overlay_registers *regs)
212{
213 if (!OVERLAY_NEEDS_PHYSICAL(overlay->dev))
214 io_mapping_unmap_atomic(regs, slot);
215}
216
217static struct overlay_registers *
218intel_overlay_map_regs(struct intel_overlay *overlay) 193intel_overlay_map_regs(struct intel_overlay *overlay)
219{ 194{
220 drm_i915_private_t *dev_priv = overlay->dev->dev_private; 195 drm_i915_private_t *dev_priv = overlay->dev->dev_private;
@@ -1454,6 +1429,9 @@ void intel_cleanup_overlay(struct drm_device *dev)
1454 kfree(dev_priv->overlay); 1429 kfree(dev_priv->overlay);
1455} 1430}
1456 1431
1432#ifdef CONFIG_DEBUG_FS
1433#include <linux/seq_file.h>
1434
1457struct intel_overlay_error_state { 1435struct intel_overlay_error_state {
1458 struct overlay_registers regs; 1436 struct overlay_registers regs;
1459 unsigned long base; 1437 unsigned long base;
@@ -1461,6 +1439,32 @@ struct intel_overlay_error_state {
1461 u32 isr; 1439 u32 isr;
1462}; 1440};
1463 1441
1442static struct overlay_registers *
1443intel_overlay_map_regs_atomic(struct intel_overlay *overlay,
1444 int slot)
1445{
1446 drm_i915_private_t *dev_priv = overlay->dev->dev_private;
1447 struct overlay_registers *regs;
1448
1449 if (OVERLAY_NEEDS_PHYSICAL(overlay->dev))
1450 regs = overlay->reg_bo->phys_obj->handle->vaddr;
1451 else
1452 regs = io_mapping_map_atomic_wc(dev_priv->mm.gtt_mapping,
1453 overlay->reg_bo->gtt_offset,
1454 slot);
1455
1456 return regs;
1457}
1458
1459static void intel_overlay_unmap_regs_atomic(struct intel_overlay *overlay,
1460 int slot,
1461 struct overlay_registers *regs)
1462{
1463 if (!OVERLAY_NEEDS_PHYSICAL(overlay->dev))
1464 io_mapping_unmap_atomic(regs, slot);
1465}
1466
1467
1464struct intel_overlay_error_state * 1468struct intel_overlay_error_state *
1465intel_overlay_capture_error_state(struct drm_device *dev) 1469intel_overlay_capture_error_state(struct drm_device *dev)
1466{ 1470{
@@ -1549,3 +1553,4 @@ intel_overlay_print_error_state(struct seq_file *m, struct intel_overlay_error_s
1549 P(UVSCALEV); 1553 P(UVSCALEV);
1550#undef P 1554#undef P
1551} 1555}
1556#endif