Linux PWM subsystem development
 help / color / mirror / Atom feed
From: Thierry Reding <thierry.reding@gmail.com>
To: Hans de Goede <hdegoede@redhat.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	linux-pwm@vger.kernel.org, linux-acpi@vger.kernel.org,
	"Rafael J . Wysocki" <rjw@rjwysocki.net>,
	Len Brown <lenb@kernel.org>
Subject: Re: [PATCH 0/2] pwm: lpss: Force runtime-resume on suspend on CHT devices
Date: Tue, 16 Oct 2018 13:16:52 +0200	[thread overview]
Message-ID: <20181016111652.GF8852@ulmo> (raw)
In-Reply-To: <20181014151202.29955-1-hdegoede@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1730 bytes --]

On Sun, Oct 14, 2018 at 05:12:00PM +0200, Hans de Goede wrote:
> Hi All,
> 
> Here are 2 more / new pwm-lpss fixes.
> 
> I've received a bug report that the recent ACPI-LPSS code changes which
> properly order device resume on Cherry Trail so that the GFX0 _PS0 method
> no longer exits with an error causes the backlight to flicker on some
> Cherry Trail devices.
> 
> This series is the result of investigating this issue. On Cherry Trail
> devices under Windows the PWM controller used for the backlight is
> considered part of the GPU even though it is part of the LPSS block and
> thus is an entirely different independent hardware unit.
> 
> Because of this on Cherry Trail the GPU's (GFX0 ACPI node) _PS3 and _PS0
> ACPI methods save and restore the PWM controller registers.
> 
> After the recent fixes this save + restore of the PWM controller registers
> is actually also happening under Linux.
> 
> If userspace blanks the screen before suspending, such as e.g. GNOME
> does, then the PWM controller will be runtime-suspended when the suspend
> starts. This causes the GFX0 _PS3 method to save a value of 0xffffffff
> for the PWM control register and to restore this value on resume.
> Note that the GPU's _PS0 method also puts the PWM controller in D0, so
> this write of 0xffffffff does actually stick.
> 
> The first patch in this patch-set fixes this. This fix exposes another
> issue, the pwm-lpss driver unconditionally sets the update bit when
> pwm_apply gets called, even if nothing has changed. At least on
> Cherry Trail this seems to cause the next update (which actually changes
> something) to be ignored. The second patch fixes this issue.

Applied, thanks.

Thierry

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      parent reply	other threads:[~2018-10-16 11:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-14 15:12 [PATCH 0/2] pwm: lpss: Force runtime-resume on suspend on CHT devices Hans de Goede
2018-10-14 15:12 ` [PATCH 1/2] pwm: lpss: Force runtime-resume on suspend on Cherry Trail Hans de Goede
2018-10-14 15:12 ` [PATCH 2/2] pwm: lpss: Only set update bit if we are actually changing the settings Hans de Goede
2018-10-16 11:16 ` Thierry Reding [this message]

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=20181016111652.GF8852@ulmo \
    --to=thierry.reding@gmail.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=hdegoede@redhat.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox