Re: [Intel-gfx] i915 PCH backlight vs. Dell XPS13

2013-02-12 Thread Kamal Mostafa
On Fri, Feb 8, 2013 at 8:36 PM, Kamal Mostafa ka...@canonical.com wrote:
  Daniel's backlight fixes which landed in 3.6 did enable working
  backlight controls on the XPS13, but it appears that this commit from
  Paolo broke it again:
  a4f32fc drm/i915: don't forget the PCH backlight registers

On Fri, 2013-02-08 at 20:55 +0100, Daniel Vetter wrote:
 You might want to try the latest drm-intel-nightly git branch from
 http://cgit.freedesktop.org/~danvet/drm-intel This has a few more
 tricks which helped on some similar platforsm to yours (and similar
 resume issues).


Yes indeed, this commit from drm-intel-nightly does fix the problem:
drm/i915: write backlight harder.

Thanks as always, for your help Daniel!

 -Kamal



signature.asc
Description: This is a digitally signed message part
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] i915 PCH backlight vs. Dell XPS13

2013-02-08 Thread Daniel Vetter
You might want to try the latest drm-intel-nightly git branch from
http://cgit.freedesktop.org/~danvet/drm-intel This has a few more
tricks which helped on some similar platforsm to yours (and similar
resume issues).

And please always include a mailing list when reporting issues, since
your dear maintainer might be on vacation (or simply swamped with
other stuff).

Cheers, Daniel

On Fri, Feb 8, 2013 at 8:36 PM, Kamal Mostafa ka...@canonical.com wrote:
 Hi Paulo and Daniel-

 I've been tracking Daniel's work on i915 backlight for quite some time
 now, in particular to support the Dell XPS13 (Sandybridge-mobile,
 CougarPoint PCH) in the Ubuntu kernels.

 Daniel's backlight fixes which landed in 3.6 did enable working
 backlight controls on the XPS13, but it appears that this commit from
 Paolo broke it again:

 a4f32fc drm/i915: don't forget the PCH backlight registers

 More specifically, the behavior on the XPS13 is this:

 With the current 3.8-rc6 i915 stack (including a4f32fc), this machine
 gets both of: /sys/class/backlight/{acpi_video0,intel_backlight}.
 Changes to acpi_video0/brightness don't have any effect on the
 backlight, unless I first echo 0  intel_backlight/brightness, then
 acpi_video0 works properly.  If I stuff a low non-zero number into
 intel_backlight/brightness, then the backlight pulsates and flickers
 continuously.

 If I revert a4f32fc (or just omit the setting of BLM_PCH_PWM_ENABLE in
 intel_panel_enable_backlight) then my backlight controls work fine:
 acpi_video0/brightness works at boot, and intel_backlight/brightness no
 longer induces the pulsate/flicker effect (or any effect at all).

 So... before I go shooting my mouth off on intel-gfx, I wonder if either
 of you can shed any (back)light on the situation (sorry ;-).

 I don't really have any reason to think that this issue is specific to
 CougarPoint PCH, but since the XPS13 is PCH_CPT this patch fixes it for
 me, for instance:

 --- a/drivers/gpu/drm/i915/intel_panel.c
 +++ b/drivers/gpu/drm/i915/intel_panel.c
 @@ -347,7 +347,9 @@ void intel_panel_enable_backlight(struct drm_device *dev,
 POSTING_READ(reg);
 I915_WRITE(reg, tmp | BLM_PWM_ENABLE);

 -   if (HAS_PCH_SPLIT(dev)) {
 +   /* Note setting BLM_PCH_PWM_ENABLE breaks backlight on
 +* Dell XPS13 (sandybridge_m, CougarPoint PCH). */
 +   if (HAS_PCH_SPLIT(dev)  !HAS_PCH_CPT(dev)) {
 tmp = I915_READ(BLC_PWM_PCH_CTL1);
 tmp |= BLM_PCH_PWM_ENABLE;
 tmp = ~BLM_PCH_OVERRIDE_ENABLE;


 I don't know if switching this based on HAS_PCH_CPT() is really relevant
 -- it just works for the Dell XPS.  (And please forgive my obvious
 cluelessness about what PCH_CPT even means!)

 Any advice?

  -Kamal



-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx