Re: [PATCH 02/62] drm/i915/bdw: Handle forcewake for writes on gen8

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

 



On Sat, Nov 02, 2013 at 09:07:00PM -0700, Ben Widawsky wrote:
> +static bool is_gen8_optimized(struct drm_i915_private *dev_priv, u32 reg)
> +{
> +	int i;
> +	for (i = 0; i < ARRAY_SIZE(gen8_optimized_regs); i++)
> +		if (reg == gen8_optimized_regs[i])
> +			return false;
> +
> +	return true;
> +}

The sense of this function is reversed, it really should be
is_gen8_legacy_register()? I'd prefer this to be an explicit switch() in
ascending order -- the compiler should emit an efficient bsearch.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
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