Re: [PATCH 5/7] drm/i915: pass status instead of enable flags to i915_enable_pipestat

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

 



On Wed, Feb 05, 2014 at 05:12:39PM +0100, Daniel Vetter wrote:
> On Wed, Feb 05, 2014 at 03:35:15PM +0000, Jesse Barnes wrote:
> > I almost think we should just separate enable vs status entirely.  As
> > long as the bits are named consistently it may be easier to follow (as
> > Ville found in your next patch with the subtle remapping of status
> > bits).
> 
> Yeah, I think for cases where the hw engineers just made a mess of it it's
> better to be explicit. So what about keeping the current pipestat
> enable/disable functions as wrappers which assume a regular mapping
> betweeen status and mask bit, and then add a low-level function which
> takes both mask and status explicitly?
> 
> That way we have less churn in the code, mostly pipestat enable/disable
> still looks sane but the irregular cases will really stick out. For a name
> I'd just go with __i915_enable_pipestat for lack of better ideas. Or maybe
> i915_enable_pipestat_irregular.

That could lead to someone accidentally using the regular function when
they should be using the irregular one and then we have some weird bug
on our hands. I rather like keeping the mess in one central place.

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
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