[Intel-gfx] [PATCH v2] drm/i915: Increase WM memory latency values on SNB

Jani Nikula jani.nikula at intel.com
Thu May 15 12:58:31 CEST 2014


On Thu, 15 May 2014, Ville Syrjälä <ville.syrjala at linux.intel.com> wrote:
> On Thu, May 15, 2014 at 01:34:44PM +0300, Jani Nikula wrote:
>> On Thu, 15 May 2014, Chris Wilson <chris at chris-wilson.co.uk> wrote:
>> > On Thu, May 15, 2014 at 01:13:21PM +0300, Jani Nikula wrote:
>> >> On Thu, 08 May 2014, ville.syrjala at linux.intel.com wrote:
>> >> > From: Ville Syrjälä <ville.syrjala at linux.intel.com>
>> >> > +static void snb_wm_latency_quirk(struct drm_device *dev)
>> >> > +{
>> >> > +	struct drm_i915_private *dev_priv = dev->dev_private;
>> >> > +	bool changed;
>> >> > +
>> >> > +	/*
>> >> > +	 * The BIOS provided WM memory latency values are often
>> >> > +	 * inadequate for high resolution displays. Adjust them.
>> >> > +	 */
>> >> > +	changed = ilk_increase_wm_latency(dev_priv, dev_priv->wm.pri_latency, 12) |
>> >> > +		ilk_increase_wm_latency(dev_priv, dev_priv->wm.spr_latency, 12) |
>> >> > +		ilk_increase_wm_latency(dev_priv, dev_priv->wm.cur_latency, 12);
>> >> 
>> >> Nitpick, s/|/||/g for bools.
>> >
>> > Consider side effects.
>> 
>> Ugh I'm slow today. Some might claim business as usual. I'll hide
>> somewhere.
>> 
>> Before I head under the rock, may I say bitops on bools are still ugly?
>
> I tend to use them but Paulo was also confused by them somewhere else
> in the watermark code, so maybe I should stop using them?
>
> I can rewrite as:
> changed |= ilk_increase_wm_latency(dev_priv, dev_priv->wm.pri_latency, 12);
> changed |= ilk_increase_wm_latency(dev_priv, dev_priv->wm.spr_latency, 12);
> changed |= ilk_increase_wm_latency(dev_priv, dev_priv->wm.cur_latency, 12);
>
> or just 3x
> if (ilk_increase_wm_latency(...))
> 	changed = true;
>
> if that helps.

Too late, patch pushed to -fixes, thanks for the patch and ridicule. ;)
You can send cleanups later for -next if you like.

BR,
Jani.


>
> -- 
> Ville Syrjälä
> Intel OTC

-- 
Jani Nikula, Intel Open Source Technology Center



More information about the Intel-gfx mailing list