From: Daniel Vetter <daniel@ffwll.ch>
To: Indan Zupancic <indan@nul.nu>
Cc: Jani Nikula <jani.nikula@intel.com>, Takashi Iwai <tiwai@suse.de>,
intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 1/4] drm/i915: save/restore the legacy backlight control
Date: Thu, 30 Aug 2012 10:50:06 +0200 [thread overview]
Message-ID: <20120830085006.GA18384@phenom.ffwll.local> (raw)
In-Reply-To: <058d0fbebf0fcda2648f59b033e514dc.squirrel@webmail.greenhost.nl>
On Thu, Aug 30, 2012 at 10:32:48AM +0200, Indan Zupancic wrote:
> On Tue, August 28, 2012 17:15, Daniel Vetter wrote:
> > On Tue, Aug 28, 2012 at 04:49:15PM +0200, Indan Zupancic wrote:
> >> By the way, saving LBPC only makes sense if it's done before it was
> >> set to 0 to disable the panel. I don't know if the current code does
> >> the right thing, I haven't looked at it for a while.
> >
> > I think we can coax it into doing the right thing, see my other mail. If
> > your completely sure that lbpc /should/ be handled by the bios across s/r
> > I think we can drop this. But tbh I have no idea how this really is
> > supposed to work, and unfortunately we're not allowed to cross-check with
> > the windows driver codebase :(
>
> Of course I'm not completely sure. But I agree with Chris' reasoning,
> why else have two ways of controlling the backlight? To me LBPC gives
> the impression of being a system specific thing the OS shouldn't need
> to worry about. Partly because it wasn't documented in the old docs at
> all, and its address isn't mentioned in the 965 vol3 manual, but also
> because it's from around the time that the BIOS used to do a lot more
> directly (APM versus ACPI etc.) It also gives a way to lower the max
> output voltage (via PWM) to the backlight hardware.
>
> These kind of problems are caused by us not having exactly the same
> info as the BIOS/machine makers got. Because that's what guided them
> into making the stuff as it is, not how it's supposed to work.
>
> The code could check if LBPC has a reasonable value after resume: Do
> nothing if it has and restore the last known good value if it doesn't.
>
> Writing 0 to LBPC before suspend seems unnecessary because the hardware
> is going into sleep mode anyway. So the PWM signal should become 0 anyway,
> or if it doesn't, the BIOS has a chance to disable the backlight. But I'm
> not sure if that's really true.
>
> So to get back to this patch, saving the LBPC value only makes sense if
> it's done before it's set to 0. I think saving it at i915_save_display()
> time is too late if the panel got disabled. Then the code is always saving
> and restoring zeros.
Well, if we use that backlight enable bit for panel on/off, we should no
longer clear neither lbpc nor the backlight registers. Hence I think this
might just work, without us saving lbpc. But we can easily add that later
on I think (if it's required on some kind of crazy machine).
> BTW, inverted sense of the PWM register could be related to the polarity
> of the PWM signal. That should be controlled with bit 28 in BLC_PWM_CTL2.
Well, I've tried that and it didn't work. I suspect that this entire
inverted backlight quirk mess we currently have is just an ugly hack to
prevent our code from setting the backlight to 0 and doesn't actually work
as advertised. Imo it was bad judgment to merge it ...
Thanks, Daniel
--
Daniel Vetter
Mail: daniel@ffwll.ch
Mobile: +41 (0)79 365 57 48
next prev parent reply other threads:[~2012-08-30 8:49 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-28 6:53 [PATCH 0/4] drm/i915: backlight fixes and cleanup Jani Nikula
2012-08-28 6:53 ` [PATCH 1/4] drm/i915: save/restore the legacy backlight control Jani Nikula
2012-08-28 7:16 ` Chris Wilson
2012-08-28 7:48 ` Daniel Vetter
2012-08-28 13:56 ` Indan Zupancic
2012-08-28 14:14 ` Daniel Vetter
2012-08-28 14:49 ` Indan Zupancic
2012-08-28 15:15 ` Daniel Vetter
2012-08-30 8:32 ` Indan Zupancic
2012-08-30 8:50 ` Daniel Vetter [this message]
2012-08-28 6:53 ` [PATCH 2/4] drm/i915: remove combination mode for backlight control, again Jani Nikula
2012-08-28 14:39 ` Indan Zupancic
2012-08-28 14:55 ` Daniel Vetter
2012-08-30 9:29 ` Indan Zupancic
2012-11-14 16:48 ` Jesse Barnes
2012-08-28 6:53 ` [PATCH 3/4] drm/i915: remove brightness inversion quirk for acer aspire 5734z Jani Nikula
2012-08-28 6:53 ` [PATCH 4/4] drm/i915: remove module parameter and quirk for inverting brightness 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=20120830085006.GA18384@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=indan@nul.nu \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@intel.com \
--cc=tiwai@suse.de \
/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