[Intel-gfx] [PATCH 2/4] drm/i915: add plane enable/disable functions

Chris Wilson chris at chris-wilson.co.uk
Thu Dec 30 22:34:46 CET 2010


Trivial comment, on passing...

On Thu, 30 Dec 2010 13:16:30 -0800, Jesse Barnes <jbarnes at virtuousgeek.org> wrote:
> Add plane enable/disable functions to prevent duplicated code and allow
> us to easily check for plane enable/disable requirements (such as pipe
> enable).

> +static void intel_disable_plane(struct drm_i915_private *dev_priv,
> +				enum plane plane, enum pipe pipe)
> +{
> +	int reg;
> +	u32 val;
> +
> +	reg = DSPCNTR(plane);
> +	val = I915_READ(reg);
> +	val &= ~DISPLAY_PLANE_ENABLE;
> +	I915_WRITE(reg, val);
> +	POSTING_READ(reg);

> +	reg = DSPADDR(plane);
> +	I915_WRITE(reg, I915_READ(reg)); /* trigger an update */

Use intel_flush_display_plane(dev_priv, plane); though maybe that function
becomes redundant? Unlikely...
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre



More information about the Intel-gfx mailing list