linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Dmitry Osipenko <dmitry.osipenko@collabora.com>,
	Len Brown <lenb@kernel.org>,
	Akihiko Odaki <akihiko.odaki@daynix.com>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Sean Paul <seanpaul@chromium.org>,
	kernel@collabora.com, linux-acpi@vger.kernel.org,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] ACPI: video: Fix missing native backlight on Chromebooks
Date: Mon, 24 Oct 2022 17:12:48 +0200	[thread overview]
Message-ID: <db61f939-a4a2-05ec-e09c-03a95c81e922@redhat.com> (raw)
In-Reply-To: <CAJZ5v0irmk3aAK9t3UYcus+SXDL+AaT88LPXfyJU2PrXbkgfMg@mail.gmail.com>

Hi,

On 10/24/22 16:45, Rafael J. Wysocki wrote:
> On Mon, Oct 24, 2022 at 4:32 PM Hans de Goede <hdegoede@redhat.com> wrote:
>>
>> Hi,
>>
>> On 10/24/22 16:12, Dmitry Osipenko wrote:
>>> Chromebooks don't have backlight in ACPI table, they suppose to use
>>> native backlight in this case. Check presence of the CrOS embedded
>>> controller ACPI device and prefer the native backlight if EC found.
>>>
>>> Suggested-by: Hans de Goede <hdegoede@redhat.com>
>>> Fixes: 2600bfa3df99 ("ACPI: video: Add acpi_video_backlight_use_native() helper")
>>> Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
>>> ---
>>>
>>> Changelog:
>>>
>>> v2: - Added explanatory comment to the code and added check for the
>>>       native backlight presence, like was requested by Hans de Goede.
>>
>> Thanks this version looks good to me:
>>
>> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
>>
>> Rafael, can you pick this up and send it in a fixes pull-req
>> for 6.1 to Linus? Or shall I pick this one up and include it
>> in my next pull-req?
> 
> It would be better if you could pick this up IMV, so please free to add
> 
> Acled-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Ok, I've merged this now and I'll send out fixes pull-req with this
to Linus before coming Friday.

Dmitry, Thank you for your patch, I've applied this patch to my
fixes branch:
https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=fixes

Regards,

Hans




> 
> to it.
> 
> Thanks!
> 
>>>
>>>  drivers/acpi/video_detect.c | 12 ++++++++++++
>>>  1 file changed, 12 insertions(+)
>>>
>>> diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c
>>> index 0d9064a9804c..9cd8797d12bb 100644
>>> --- a/drivers/acpi/video_detect.c
>>> +++ b/drivers/acpi/video_detect.c
>>> @@ -668,6 +668,11 @@ static const struct dmi_system_id video_detect_dmi_table[] = {
>>>       { },
>>>  };
>>>
>>> +static bool google_cros_ec_present(void)
>>> +{
>>> +     return acpi_dev_found("GOOG0004");
>>> +}
>>> +
>>>  /*
>>>   * Determine which type of backlight interface to use on this system,
>>>   * First check cmdline, then dmi quirks, then do autodetect.
>>> @@ -730,6 +735,13 @@ static enum acpi_backlight_type __acpi_video_get_backlight_type(bool native)
>>>                       return acpi_backlight_video;
>>>       }
>>>
>>> +     /*
>>> +      * Chromebooks that don't have backlight handle in ACPI table
>>> +      * are supposed to use native backlight if it's available.
>>> +      */
>>> +     if (google_cros_ec_present() && native_available)
>>> +             return acpi_backlight_native;
>>> +
>>>       /* No ACPI video (old hw), use vendor specific fw methods. */
>>>       return acpi_backlight_vendor;
>>>  }
>>
> 


  reply	other threads:[~2022-10-24 23:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-24 14:12 [PATCH v2] ACPI: video: Fix missing native backlight on Chromebooks Dmitry Osipenko
2022-10-24 14:32 ` Hans de Goede
2022-10-24 14:45   ` Rafael J. Wysocki
2022-10-24 15:12     ` Hans de Goede [this message]
2022-10-24 14:52 ` Akihiko Odaki
2022-10-24 14:59   ` Hans de Goede
2022-10-24 15:07     ` Akihiko Odaki

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=db61f939-a4a2-05ec-e09c-03a95c81e922@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=akihiko.odaki@daynix.com \
    --cc=dmitry.osipenko@collabora.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kernel@collabora.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=seanpaul@chromium.org \
    /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;
as well as URLs for NNTP newsgroup(s).