[Intel-gfx] [PATCH] drm/i915: properly enable the blc controller on the right pipe

Eugeni Dodonov eugeni.dodonov at linux.intel.com
Tue Jun 12 17:15:22 CEST 2012


On 06/05/2012 07:14 AM, Daniel Vetter wrote:
> +		/* Note that this can also get called through dpms changes. And
> +		 * we don't track the backlight dpms state, hence check whether
> +		 * we have to do anything first. */
> +		if (tmp & BLM_PWM_ENABLE)
> +			return;
> +

I am tempted to add a WARN_ON(pipe > dev_priv->num_pipe) here, now that
we should handle 3 pipes.

> +		if (dev_priv->num_pipe == 3)
> +			tmp &= ~BLM_PIPE_SELECT_IVB;
> +		else
> +			tmp &= ~BLM_PIPE_SELECT;
> +
> +		tmp |= BLM_PIPE(pipe);
> +		tmp &= ~BLM_PWM_ENABLE;
> +
> +		I915_WRITE(reg, tmp);
> +		POSTING_READ(reg);
> +		I915_WRITE(reg, tmp | BLM_PWM_ENABLE);
> +	}

But besides that:
Reviewed-by: Eugeni Dodonov <eugeni.dodonov at intel.com>

Eugeni




More information about the Intel-gfx mailing list