From: "Indan Zupancic" <indan@nul.nu>
To: "Chris Wilson" <chris@chris-wilson.co.uk>
Cc: "Dave Airlie" <airlied@linux.ie>,
intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org, "Matthew Garrett" <mjg@redhat.com>,
"Alan Cox" <alan@linux.intel.com>,
"Keith Packard" <keithp@keithp.com>,
"Len Brown" <lenb@kernel.org>
Subject: Re: [PATCH] ACPI/Intel: Rework Opregion support
Date: Tue, 15 Mar 2011 12:13:11 +0100 (CET) [thread overview]
Message-ID: <5060ae708cceef8df998d3f59be5d246.squirrel@webmail.greenhost.nl> (raw)
In-Reply-To: <b7da2f$qnp1ps@fmsmga001.fm.intel.com>
On Tue, March 15, 2011 09:37, Chris Wilson wrote:
> On Tue, 15 Mar 2011 02:18:02 +0100 (CET), "Indan Zupancic" <indan@nul.nu> wrote:
>> Hello,
>>
>> Some nitpicks below.
>>
>> On Mon, March 14, 2011 18:59, Chris Wilson wrote:
>> > Note: neither the opregion_dev interface or the alse_set_* properly report
>> > failures. As such we have a slight change in behaviour on Ironlake+
>> > platforms and an uncorrected bug for earlier chipsets.
>> > -Chris
>>
>> What uncorrected bug?
>
> For later chipsets we currently report the failure to respond to the ALSE
> requests, for earlier we do not. The patch harmonises the two code paths
> reusing the earlier code for later chipsets, hence the change in behaviour
> and potential regression. Alternatively, actually reporting the failure
> for earlier chipsets may also break existing setups.
Ah, okay, for the ASLE_SET_ALS_ILLUM/ASLE_SET_PFIT/ASLE_SET_PWM_FREQ cases.
Hopefully this change doesn't cause regressions, that would be sad.
>> And are there earlier chipsets with ASLE support at all, besides gen 4?
>> If there are no gen 2 or gen 3 chipsets with ASLE then the backlight
>> code can be simplified further.
>
> The OpRegion interface was devised midway through gen3 (afaik), and you
> find it on some i915-class hw and not others. In theory, there is nothing
> to prevent a BIOS/ACPI from being rewritten for it to be of use in gen2,
> and who knows one such beast may already exist (considering much to our
> horror you can still buy gen2 chipsets).
Pity, if they're still sold any bets are off.
>> > diff --git a/drivers/gpu/drm/i915/intel_panel.c b/drivers/gpu/drm/i915/intel_panel.c
>> > index 4e5ff59..51565bb 100644
>> > --- a/drivers/gpu/drm/i915/intel_panel.c
>> > +++ b/drivers/gpu/drm/i915/intel_panel.c
>> > @@ -261,8 +261,8 @@ intel_panel_detect(struct drm_device *dev)
>> > * appears to be either the BIOS or Linux ACPI fault */
>> > #if 0
>> > /* Assume that the BIOS does not lie through the OpRegion... */
>> > - if (dev_priv->opregion.lid_state)
>> > - return ioread32(dev_priv->opregion.lid_state) & 0x1 ?
>> > + if (dev_priv->opregion_dev.opregion.acpi)
>> > + return ioread32(&dev_priv->opregion_dev.opregion.acpi->clid) & 0x1 ?
>>
>> What guarantees that opregion.acpi != NULL here?
>
> You mean other than the explicit test for opregion.acpi != NULL?
I'm blind. I checked all the rest of the code, but not the line just above it.
Gah!
>> Or perhaps just remove that #if 0 code chunk altogether?
>
> Read the changelog and thread on the patch that disabled this logic, the
I just subscribed to intel-gfx, seemed like a good idea after the reject.
> failure (or at least inconsistent behaviour with the expectations of the
> HP BIOS authors) appears to be in how we initialise ACPI on the HP
> machines that causes the initial value of lid state to be incorrect. Since
> one of the laptops that Dave tests drm-next on is a HP, he was bitten by
> the bug and temporarily (we hope) disabled the logic. Or else once again,
> we will continue to light up the panel on a closed laptop.
Hopefully it's fixed by the next BIOS upgrade by HP...
Everything would be a lot simpler if the BIOSes were open source.
It's shocking with what you guys have to deal with.
Good luck and thanks for all the hard work!
Indan
next prev parent reply other threads:[~2011-03-15 11:13 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-22 20:03 [PATCH 1/2] " Matthew Garrett
2011-02-22 20:03 ` [PATCH 2/2] staging: Use generic IGD opregion code for gma500 Matthew Garrett
2011-02-22 21:15 ` Alan Cox
2011-03-03 2:14 ` Len Brown
2011-03-03 2:16 ` Len Brown
2011-03-03 11:43 ` Alan Cox
2011-03-03 11:43 ` Alan Cox
2011-03-03 13:07 ` Matthew Garrett
2011-03-03 12:52 ` Alan Cox
2011-02-22 20:18 ` [Intel-gfx] [PATCH 1/2] ACPI/Intel: Rework Opregion support Jesse Barnes
2011-03-03 2:14 ` Len Brown
2011-03-14 17:59 ` [PATCH] " Chris Wilson
2011-03-15 1:18 ` Indan Zupancic
2011-03-15 1:52 ` Matthew Garrett
2011-03-15 13:30 ` [Intel-gfx] " Olivier Galibert
2011-03-15 13:32 ` Matthew Garrett
2011-03-15 13:40 ` Olivier Galibert
2011-03-15 13:43 ` Matthew Garrett
2011-03-15 8:37 ` Chris Wilson
2011-03-15 11:13 ` Indan Zupancic [this message]
2011-03-15 11:27 ` Peter Stuge
2011-03-15 11:46 ` Indan Zupancic
2011-03-15 16:06 ` Alex Deucher
2011-03-16 0:02 ` Indan Zupancic
2011-03-16 2:17 ` Alex Deucher
2011-03-16 6:26 ` Indan Zupancic
2011-03-16 14:11 ` Jerome Glisse
2011-03-16 3:46 ` Dave Airlie
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=5060ae708cceef8df998d3f59be5d246.squirrel@webmail.greenhost.nl \
--to=indan@nul.nu \
--cc=airlied@linux.ie \
--cc=alan@linux.intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=keithp@keithp.com \
--cc=lenb@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mjg@redhat.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
all inboxes | Powered by JetHome®