* [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* [PATCH 2/2] drm/i915: Reject opening of pipe crc files for invalid pipes
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 ` Daniel Vetter
2013-11-14 10:53 ` [PATCH 1/2] drm/i915: Use for_each_pipe in intel_display_crc_init Damien Lespiau
1 sibling, 0 replies; 4+ messages in thread
From: Daniel Vetter @ 2013-11-14 10:30 UTC (permalink / raw)
To: Intel Graphics Development; +Cc: Daniel Vetter
We don't init the lock nor set up all the other state. And it doesn't
make sense anyway.
This appeases lockdep when running the igt/drv_debugfs_reader test.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
drivers/gpu/drm/i915/i915_debugfs.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 09e7f7beeb61..d1491f8e0f39 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -1856,6 +1856,9 @@ static int i915_pipe_crc_open(struct inode *inode, struct file *filep)
struct drm_i915_private *dev_priv = info->dev->dev_private;
struct intel_pipe_crc *pipe_crc = &dev_priv->pipe_crc[info->pipe];
+ if (info->pipe >= INTEL_INFO(info->dev)->num_pipes)
+ return -ENODEV;
+
spin_lock_irq(&pipe_crc->lock);
if (pipe_crc->opened) {
--
1.8.1.4
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH 1/2] drm/i915: Use for_each_pipe in intel_display_crc_init
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 ` Damien Lespiau
2013-11-14 11:24 ` Daniel Vetter
1 sibling, 1 reply; 4+ messages in thread
From: Damien Lespiau @ 2013-11-14 10:53 UTC (permalink / raw)
To: Daniel Vetter; +Cc: Intel Graphics Development
On Thu, Nov 14, 2013 at 11:30:42AM +0100, Daniel Vetter wrote:
> We have a nice macro, so use it.
>
> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
For both patches:
Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
--
Damien
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] drm/i915: Use for_each_pipe in intel_display_crc_init
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
0 siblings, 0 replies; 4+ messages in thread
From: Daniel Vetter @ 2013-11-14 11:24 UTC (permalink / raw)
To: Damien Lespiau; +Cc: Daniel Vetter, Intel Graphics Development
On Thu, Nov 14, 2013 at 10:53:10AM +0000, Damien Lespiau wrote:
> On Thu, Nov 14, 2013 at 11:30:42AM +0100, Daniel Vetter wrote:
> > We have a nice macro, so use it.
> >
> > Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
>
> For both patches:
>
> Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Thanks for the review, both merged to dinq.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
^ permalink raw reply [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).