[Intel-gfx] [PATCH] properly enable the blc controller on the right pipe

Daniel Vetter daniel at ffwll.ch
Fri Jul 20 10:10:46 CEST 2012


On Fri, Jul 20, 2012 at 12:51:41AM +0200, Carsten Emde wrote:
> On 07/19/2012 04:40 PM, Daniel Vetter wrote:
> >Well, the backlight-confusion branch had a bug and outright disabled
> >the intel backlight :( drm-intel-next-queued should have fixes for all
> >the backlight goofus I've accidentally created, so testing feedback on
> >that branch would be highly appreciated.
> This branch is now broken again. The original drm-intel-next-queued
> branch works well (it still has the quirk), but after I reverted the
> Acer quirk, the screen remains dark.
> 
> I double-checked it and used exactly the same patch to revert the
> quirk in the two trees: The backlight-confusion branch works, and
> the drm-intel-next-queued branch does not.
> 
> I then used drivers/gpu/drm/i915/intel_panel.c from
> backlight-confusion in drm-intel-next-queued and - it worked again.
> When testing the two differences separately it turned out this patch
> did the magic:

Yeah, I guess your system only worked whith the old code because it
accidentally disabled the entire backlight stuff. Now that that doesn't
happen any more, it's as broken as ever.

I'll look into creating another patch, afaict from digging through git
history, this backlight combination mode is totally bogus. But if we kill
it, a few machines will resume with dimmed backlight, because we don't
restore the lbpc register properly.

Thanks for testing, Daniel

> 
> Index: drm-intel/drivers/gpu/drm/i915/intel_panel.c
> ===================================================================
> --- drm-intel.orig/drivers/gpu/drm/i915/intel_panel.c
> +++ drm-intel/drivers/gpu/drm/i915/intel_panel.c
> @@ -121,6 +121,8 @@ static int is_backlight_combination_mode
>  {
>  	struct drm_i915_private *dev_priv = dev->dev_private;
> 
> +	return 0;
> +
>  	if (INTEL_INFO(dev)->gen >= 4)
>  		return I915_READ(BLC_PWM_CTL2) & BLM_COMBINATION_MODE;
> 
> Finally, only the first condition is obviously harmful - this patch
> also works well:
> 
> Index: drm-intel/drivers/gpu/drm/i915/intel_panel.c
> ===================================================================
> --- drm-intel.orig/drivers/gpu/drm/i915/intel_panel.c
> +++ drm-intel/drivers/gpu/drm/i915/intel_panel.c
> @@ -121,8 +121,10 @@ static int is_backlight_combination_mode
>  {
>  	struct drm_i915_private *dev_priv = dev->dev_private;
> 
> +#if 0
>  	if (INTEL_INFO(dev)->gen >= 4)
>  		return I915_READ(BLC_PWM_CTL2) & BLM_COMBINATION_MODE;
> +#endif
> 
>  	if (IS_GEN2(dev))
>  		return I915_READ(BLC_PWM_CTL) & BLM_LEGACY_MODE;
> 
> Hope this helps,
> 
> 	-Carsten.

-- 
Daniel Vetter
Mail: daniel at ffwll.ch
Mobile: +41 (0)79 365 57 48



More information about the Intel-gfx mailing list