Re: [PATCH 1/2] drm/i915: Make for_each_plane() take dev_priv as argument

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Feb 28, 2015 at 09:04:44PM +0000, Chris Wilson wrote:
> > diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> > index e07a1cb..c204e30 100644
> > --- a/drivers/gpu/drm/i915/i915_drv.h
> > +++ b/drivers/gpu/drm/i915/i915_drv.h
> > @@ -223,8 +223,10 @@ enum hpd_pin {
> >  
> >  #define for_each_pipe(__dev_priv, __p) \
> >  	for ((__p) = 0; (__p) < INTEL_INFO(__dev_priv)->num_pipes; (__p)++)
> > -#define for_each_plane(pipe, p) \
> > -	for ((p) = 0; (p) < INTEL_INFO(dev)->num_sprites[(pipe)] + 1; (p)++)
> > +#define for_each_plane(__dev_priv, __pipe, __p)				\
> > +	for ((__p) = 0;							\
> > +	     (__p) < INTEL_INFO(__dev_priv)->num_sprites[(__pipe)] + 1;	\
> > +	     (__p)++)
> >  #define for_each_sprite(p, s) for ((s) = 0; (s) < INTEL_INFO(dev)->num_sprites[(p)]; (s)++)
> 
> Is num_sprites explained anywhere? In particular the plane = num_sprites+1?
> -Chris

There's a tentative explanation also talking about the cursor plane:

/*
 * This is the maximum (across all platforms) number of planes (primary +
 * sprites) that can be active at the same time on one pipe.
 *      
 * This value doesn't count the cursor plane.
 */     
#define I915_MAX_PLANES 3

But agreed that this couple be improved.

-- 
Damien
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx





[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux