All of lore.kernel.org
 help / color / mirror / Atom feed
From: Scot Doyle <lkml14@scotdoyle.com>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: Jani Nikula <jani.nikula@intel.com>,
	intel-gfx <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH] drm/i915: don't warn if backlight unexpectedly enabled
Date: Tue, 26 Aug 2014 16:15:53 +0000 (UTC)	[thread overview]
Message-ID: <alpine.LNX.2.11.1408261333260.2858@localhost.localdomain> (raw)
In-Reply-To: <20140826104537.GO15520@phenom.ffwll.local>

On Tue, 26 Aug 2014, Daniel Vetter wrote:
> On Thu, Aug 21, 2014 at 07:12:59AM +0000, Scot Doyle wrote:
>> When we enter intel_modeset_setup_hw_state during resume
>> - BLC_PWM_CPU_CTL2 == BLM_PWM_ENABLE
>> - the physical backlight is off
>
> Hm, this is actually interesting - we have some other evidence that the
> best way to shut off the backlight is actually to just set the pwm duty
> cycle to 0. Can you please check that this is the case for your system?

/sys/class/backlight/intel_backlight/brightness
0 -> backlight not visible
1 -> backlight visible
937 -> max backlight

Setting /sys/class/backlight/intel_backlight/brightness to 0 updates 
BLC_PWM_CPU_CTL, but BLC_PWM_CPU_CTL2 remains 0xe0000000.


> Maybe we just need to extend the check to look for !PWM_ENABLE ||
> duty_cycle == 0.

The following measurements hold true no matter the duty cycle before 
suspend:

When entering hsw_enable_pc8 during suspend
- the physical backlight is off
- BLC_PWM_CPU_CTL == 0x3a900000 (BACKLIGHT_DUTY_CYCLE_MASK == ffff)
- BLC_PWM_CPU_CTL2 == 0x60000000 (BLM_PWM_ENABLE)

When exiting hsw_disable_pc8 during resume
- the physical backlight is off
- BLC_PWM_CPU_CTL == 0x200
- BLC_PWM_CPU_CTL2 == 0x80000000 (BLM_PWM_ENABLE | BLM_TRANSCODER_EDP)

When entering pch_enable_backlight during resume
- the physical backlight is off
- BLC_PWM_CPU_CTL == 0x200
- BLC_PWM_CPU_CTL2 == 0x80000000 (BLM_PWM_ENABLE)

When exiting pch_enable_backlight during resume
- the physical backlight is off
- BLC_PWM_CPU_CTL == duty cycle prior to suspend
- BLC_PWM_CPU_CTL2 == 0xe0000000 (BLM_PWM_ENABLE | BLM_TRANSCODER_EDP)


So the BIOS is setting BLC_PWM_CPU_CTL=0x200 and BLC_PWM_CPU_CTL2=0x80000000 ?

  reply	other threads:[~2014-08-26 16:18 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-19  2:07 [PATCH] drm/i915: don't warn if backlight unexpectedly enabled Scot Doyle
2014-08-19 14:29 ` Daniel Vetter
2014-08-21  7:12   ` Scot Doyle
2014-08-26 10:45     ` Daniel Vetter
2014-08-26 16:15       ` Scot Doyle [this message]
2014-08-26 17:33         ` Daniel Vetter
2014-08-26 17:34           ` Daniel Vetter
2014-08-26 19:36             ` Scot Doyle
2014-08-27 11:01           ` Jani Nikula

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LNX.2.11.1408261333260.2858@localhost.localdomain \
    --to=lkml14@scotdoyle.com \
    --cc=daniel@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.