intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/i915: Use for_each_pipe in intel_display_crc_init
@ 2013-11-14 10:30 Daniel Vetter
  2013-11-14 10:30 ` [PATCH 2/2] drm/i915: Reject opening of pipe crc files for invalid pipes Daniel Vetter
  2013-11-14 10:53 ` [PATCH 1/2] drm/i915: Use for_each_pipe in intel_display_crc_init Damien Lespiau
  0 siblings, 2 replies; 4+ messages in thread
From: Daniel Vetter @ 2013-11-14 10:30 UTC (permalink / raw)
  To: Intel Graphics Development; +Cc: Daniel Vetter

We have a nice macro, so use it.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 drivers/gpu/drm/i915/i915_debugfs.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 6875b7a0f0cd..09e7f7beeb61 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -3099,10 +3099,10 @@ static const struct i915_debugfs_files {
 void intel_display_crc_init(struct drm_device *dev)
 {
 	struct drm_i915_private *dev_priv = dev->dev_private;
-	int i;
+	enum pipe pipe;
 
-	for (i = 0; i < INTEL_INFO(dev)->num_pipes; i++) {
-		struct intel_pipe_crc *pipe_crc = &dev_priv->pipe_crc[i];
+	for_each_pipe(pipe) {
+		struct intel_pipe_crc *pipe_crc = &dev_priv->pipe_crc[pipe];
 
 		pipe_crc->opened = false;
 		spin_lock_init(&pipe_crc->lock);
-- 
1.8.1.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-11-14 11:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-14 10:30 [PATCH 1/2] drm/i915: Use for_each_pipe in intel_display_crc_init Daniel Vetter
2013-11-14 10:30 ` [PATCH 2/2] drm/i915: Reject opening of pipe crc files for invalid pipes Daniel Vetter
2013-11-14 10:53 ` [PATCH 1/2] drm/i915: Use for_each_pipe in intel_display_crc_init Damien Lespiau
2013-11-14 11:24   ` Daniel Vetter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).