* [PATCH] drm/i915: move i915_get_extra_insdone out of CONFIG_DEBUG_FS block
@ 2012-08-31 19:42 Daniel Vetter
2012-09-01 17:40 ` Ben Widawsky
0 siblings, 1 reply; 3+ messages in thread
From: Daniel Vetter @ 2012-08-31 19:42 UTC (permalink / raw)
To: Intel Graphics Development; +Cc: Daniel Vetter, Ben Widawsky
Otherwise it just won't compile ...
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Cc: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
drivers/gpu/drm/i915/i915_irq.c | 59 +++++++++++++++++++--------------------
1 file changed, 29 insertions(+), 30 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index 72093ba..d601013 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -853,6 +853,35 @@ static void i915_error_work_func(struct work_struct *work)
}
}
+/* NB: please notice the memset */
+static void i915_get_extra_instdone(struct drm_device *dev,
+ uint32_t *instdone)
+{
+ struct drm_i915_private *dev_priv = dev->dev_private;
+ memset(instdone, 0, sizeof(*instdone) * I915_NUM_INSTDONE_REG);
+
+ switch(INTEL_INFO(dev)->gen) {
+ case 2:
+ case 3:
+ instdone[0] = I915_READ(INSTDONE);
+ break;
+ case 4:
+ case 5:
+ case 6:
+ instdone[0] = I915_READ(INSTDONE_I965);
+ instdone[1] = I915_READ(INSTDONE1);
+ break;
+ default:
+ WARN_ONCE(1, "Unsupported platform\n");
+ case 7:
+ instdone[0] = I915_READ(GEN7_INSTDONE_1);
+ instdone[1] = I915_READ(GEN7_SC_INSTDONE);
+ instdone[2] = I915_READ(GEN7_SAMPLER_INSTDONE);
+ instdone[3] = I915_READ(GEN7_ROW_INSTDONE);
+ break;
+ }
+}
+
#ifdef CONFIG_DEBUG_FS
static struct drm_i915_error_object *
i915_error_object_create(struct drm_i915_private *dev_priv,
@@ -1070,36 +1099,6 @@ i915_error_first_batchbuffer(struct drm_i915_private *dev_priv,
return NULL;
}
-/* NB: please notice the memset */
-static void i915_get_extra_instdone(struct drm_device *dev,
- uint32_t *instdone)
-{
- struct drm_i915_private *dev_priv = dev->dev_private;
- memset(instdone, 0, sizeof(*instdone) * I915_NUM_INSTDONE_REG);
-
- switch(INTEL_INFO(dev)->gen) {
- case 2:
- case 3:
- instdone[0] = I915_READ(INSTDONE);
- break;
- case 4:
- case 5:
- case 6:
- instdone[0] = I915_READ(INSTDONE_I965);
- instdone[1] = I915_READ(INSTDONE1);
- break;
- default:
- WARN_ONCE(1, "Unsupported platform\n");
- case 7:
- instdone[0] = I915_READ(GEN7_INSTDONE_1);
- instdone[1] = I915_READ(GEN7_SC_INSTDONE);
- instdone[2] = I915_READ(GEN7_SAMPLER_INSTDONE);
- instdone[3] = I915_READ(GEN7_ROW_INSTDONE);
- break;
- }
-}
-
-
static void i915_record_ring_state(struct drm_device *dev,
struct drm_i915_error_state *error,
struct intel_ring_buffer *ring)
--
1.7.10.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/i915: move i915_get_extra_insdone out of CONFIG_DEBUG_FS block
2012-08-31 19:42 [PATCH] drm/i915: move i915_get_extra_insdone out of CONFIG_DEBUG_FS block Daniel Vetter
@ 2012-09-01 17:40 ` Ben Widawsky
2012-09-03 7:34 ` Daniel Vetter
0 siblings, 1 reply; 3+ messages in thread
From: Ben Widawsky @ 2012-09-01 17:40 UTC (permalink / raw)
To: Daniel Vetter; +Cc: Intel Graphics Development
On 2012-08-31 12:42, Daniel Vetter wrote:
> Otherwise it just won't compile ...
>
> Reported-by: Fengguang Wu <fengguang.wu@intel.com>
> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
Fengguang, you are awesome!
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/i915: move i915_get_extra_insdone out of CONFIG_DEBUG_FS block
2012-09-01 17:40 ` Ben Widawsky
@ 2012-09-03 7:34 ` Daniel Vetter
0 siblings, 0 replies; 3+ messages in thread
From: Daniel Vetter @ 2012-09-03 7:34 UTC (permalink / raw)
To: Ben Widawsky; +Cc: Daniel Vetter, Intel Graphics Development
On Sat, Sep 01, 2012 at 10:40:15AM -0700, Ben Widawsky wrote:
> On 2012-08-31 12:42, Daniel Vetter wrote:
> >Otherwise it just won't compile ...
> >
> >Reported-by: Fengguang Wu <fengguang.wu@intel.com>
>
> >Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> >---
>
> Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
> Fengguang, you are awesome!
Queued for -next, thanks for the review.
-Daniel
--
Daniel Vetter
Mail: daniel@ffwll.ch
Mobile: +41 (0)79 365 57 48
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-09-03 7:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-31 19:42 [PATCH] drm/i915: move i915_get_extra_insdone out of CONFIG_DEBUG_FS block Daniel Vetter
2012-09-01 17:40 ` Ben Widawsky
2012-09-03 7:34 ` Daniel Vetter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox