[Intel-gfx] [PATCH 2/3] drm/i915: Simplify for_each_fw_domain iterators

Chris Wilson chris at chris-wilson.co.uk
Tue Apr 5 09:36:54 UTC 2016


On Tue, Apr 05, 2016 at 10:05:24AM +0100, Tvrtko Ursulin wrote:
> On 04/04/16 20:14, Dave Gordon wrote:
> >On 04/04/16 17:51, Tvrtko Ursulin wrote:
> >>diff --git a/drivers/gpu/drm/i915/i915_drv.h
> >>b/drivers/gpu/drm/i915/i915_drv.h
> >>index 7d4c704d7d75..160f980f0368 100644
> >>--- a/drivers/gpu/drm/i915/i915_drv.h
> >>+++ b/drivers/gpu/drm/i915/i915_drv.h
> >>@@ -665,6 +665,7 @@ struct intel_uncore {
> >>      struct intel_uncore_forcewake_domain {
> >>          struct drm_i915_private *i915;
> >>          enum forcewake_domain_id id;
> >>+        enum forcewake_domains mask;
> >
> >At present this mask will always have only one bit set, but I suppose
> >there might be some utility in allowing multiple bits (virtual domains?)
> 
> I did not like the name mask myself but couldn't think of anything
> better. Do you have a suggestion?

mask is fine as we use it as a mask. We've called it intel_engine_flag()
which is worse imo. If there is a much better name for this, we should
also fixup that name as well.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list