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

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.

Regards,

Hans

             reply	other threads:[~2018-10-14 15:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-14 15:12 Hans de Goede [this message]
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 ` [PATCH 0/2] pwm: lpss: Force runtime-resume on suspend on CHT devices Thierry Reding

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