diff options
author | Eric Anholt <eric@anholt.net> | 2008-10-17 14:41:03 -0700 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2008-10-23 13:42:27 +1000 |
commit | a2d44cca4fc9ae04ed2c9fc2ef16b6989eeae218 (patch) | |
tree | 61bc40b8367f8afefc1217f3b10fb1abf8500dc3 | |
parent | 053d7f244a8739d96d316c77a97cd063804c8e35 (diff) | |
download | kernel_samsung_aries-a2d44cca4fc9ae04ed2c9fc2ef16b6989eeae218.zip kernel_samsung_aries-a2d44cca4fc9ae04ed2c9fc2ef16b6989eeae218.tar.gz kernel_samsung_aries-a2d44cca4fc9ae04ed2c9fc2ef16b6989eeae218.tar.bz2 |
i915: Don't dereference HWS in /proc debug files when it isn't initialized.
Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem_proc.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem_proc.c b/drivers/gpu/drm/i915/i915_gem_proc.c index 15d4160..93de15b 100644 --- a/drivers/gpu/drm/i915/i915_gem_proc.c +++ b/drivers/gpu/drm/i915/i915_gem_proc.c @@ -192,7 +192,12 @@ static int i915_gem_seqno_info(char *buf, char **start, off_t offset, *start = &buf[offset]; *eof = 0; - DRM_PROC_PRINT("Current sequence: %d\n", i915_get_gem_seqno(dev)); + if (dev_priv->hw_status_page != NULL) { + DRM_PROC_PRINT("Current sequence: %d\n", + i915_get_gem_seqno(dev)); + } else { + DRM_PROC_PRINT("Current sequence: hws uninitialized\n"); + } DRM_PROC_PRINT("Waiter sequence: %d\n", dev_priv->mm.waiting_gem_seqno); DRM_PROC_PRINT("IRQ sequence: %d\n", dev_priv->mm.irq_gem_seqno); @@ -230,8 +235,12 @@ static int i915_interrupt_info(char *buf, char **start, off_t offset, I915_READ(PIPEBSTAT)); DRM_PROC_PRINT("Interrupts received: %d\n", atomic_read(&dev_priv->irq_received)); - DRM_PROC_PRINT("Current sequence: %d\n", - i915_get_gem_seqno(dev)); + if (dev_priv->hw_status_page != NULL) { + DRM_PROC_PRINT("Current sequence: %d\n", + i915_get_gem_seqno(dev)); + } else { + DRM_PROC_PRINT("Current sequence: hws uninitialized\n"); + } DRM_PROC_PRINT("Waiter sequence: %d\n", dev_priv->mm.waiting_gem_seqno); DRM_PROC_PRINT("IRQ sequence: %d\n", |