From: Hans de Goede <hdegoede@redhat.com> To: "Rafael J. Wysocki" <rafael@kernel.org> Cc: "Rafael J . Wysocki" <rjw@rjwysocki.net>, Len Brown <lenb@kernel.org>, Zhang Rui <rui.zhang@intel.com>, intel-gfx <intel-gfx@lists.freedesktop.org>, ACPI Devel Maling List <linux-acpi@vger.kernel.org> Subject: Re: [PATCH 1/2] ACPI: utils: Add acpi_reduced_hardware() helper Date: Wed, 7 Apr 2021 20:02:32 +0200 [thread overview] Message-ID: <f24d4fef-3d20-8627-272c-36f4f5a5c493@redhat.com> (raw) In-Reply-To: <CAJZ5v0jYUA8GHqYvnkp=Q0fzMKcsXtuZ-RcSS3jc_exKjtsewA@mail.gmail.com> Hi, On 4/7/21 7:50 PM, Rafael J. Wysocki wrote: > On Wed, Apr 7, 2021 at 7:43 PM Hans de Goede <hdegoede@redhat.com> wrote: >> >> Hi, >> >> On 4/7/21 7:13 PM, Rafael J. Wysocki wrote: >>> On Tue, Apr 6, 2021 at 11:17 PM Hans de Goede <hdegoede@redhat.com> wrote: >>>> >>>> Add a getter for the acpi_gbl_reduced_hardware variable so that modules >>>> can check if they are running on an ACPI reduced-hw platform or not. >>>> >>>> Signed-off-by: Hans de Goede <hdegoede@redhat.com> >>>> --- >>>> drivers/acpi/utils.c | 11 +++++++++++ >>>> include/acpi/acpi_bus.h | 1 + >>>> include/linux/acpi.h | 5 +++++ >>>> 3 files changed, 17 insertions(+) >>>> >>>> diff --git a/drivers/acpi/utils.c b/drivers/acpi/utils.c >>>> index 682edd913b3b..4cb061d3169a 100644 >>>> --- a/drivers/acpi/utils.c >>>> +++ b/drivers/acpi/utils.c >>>> @@ -872,6 +872,17 @@ acpi_dev_get_first_match_dev(const char *hid, const char *uid, s64 hrv) >>>> } >>>> EXPORT_SYMBOL(acpi_dev_get_first_match_dev); >>>> >>>> +/** >>>> + * acpi_reduced_hardware - Return if this is an ACPI-reduced-hw machine >>>> + * >>>> + * Return true when running on an ACPI-reduced-hw machine, false otherwise. >>>> + */ >>>> +bool acpi_reduced_hardware(void) >>>> +{ >>>> + return acpi_gbl_reduced_hardware; >>>> +} >>>> +EXPORT_SYMBOL(acpi_reduced_hardware); >>> >>> EXPORT_SYMBOL_GPL()? >> >> Yes, that was my intention, no idea what happened here. I just prepped and send out v2 and I think I know what happened, all the other functions in drivers/acpi/utils.c are EXPORT_SYMBOL, so I probably just copy-and-pasted this without too much thinking. It might be worthwhile to see if we should also mark some other functions as EXPORT_SYMBOL_GPL() here. >> Before I send a v2, do you have any remarks on patch 2/2 (which is actually >> the more interesting patch) ? > > I thought that basing that check on the ACPICA's global variable may > be too coarse grained for some cases, but then I've decided to do it > as is now and we'll see. Yes, the whole code for selecting which backlight driver to use is mostly heuristics, so "we'll see" indeed . With that said I'm pretty confident that this change should not cause problems. Platforms which actually set acpi_gbl_reduced_hardware=true seem to be quite rare. I'm actually only aware of Bay Trail-T based devices doing this. Regards, Hans
WARNING: multiple messages have this Message-ID (diff)
From: Hans de Goede <hdegoede@redhat.com> To: "Rafael J. Wysocki" <rafael@kernel.org> Cc: ACPI Devel Maling List <linux-acpi@vger.kernel.org>, Zhang Rui <rui.zhang@intel.com>, "Rafael J . Wysocki" <rjw@rjwysocki.net>, intel-gfx <intel-gfx@lists.freedesktop.org>, Len Brown <lenb@kernel.org> Subject: Re: [Intel-gfx] [PATCH 1/2] ACPI: utils: Add acpi_reduced_hardware() helper Date: Wed, 7 Apr 2021 20:02:32 +0200 [thread overview] Message-ID: <f24d4fef-3d20-8627-272c-36f4f5a5c493@redhat.com> (raw) In-Reply-To: <CAJZ5v0jYUA8GHqYvnkp=Q0fzMKcsXtuZ-RcSS3jc_exKjtsewA@mail.gmail.com> Hi, On 4/7/21 7:50 PM, Rafael J. Wysocki wrote: > On Wed, Apr 7, 2021 at 7:43 PM Hans de Goede <hdegoede@redhat.com> wrote: >> >> Hi, >> >> On 4/7/21 7:13 PM, Rafael J. Wysocki wrote: >>> On Tue, Apr 6, 2021 at 11:17 PM Hans de Goede <hdegoede@redhat.com> wrote: >>>> >>>> Add a getter for the acpi_gbl_reduced_hardware variable so that modules >>>> can check if they are running on an ACPI reduced-hw platform or not. >>>> >>>> Signed-off-by: Hans de Goede <hdegoede@redhat.com> >>>> --- >>>> drivers/acpi/utils.c | 11 +++++++++++ >>>> include/acpi/acpi_bus.h | 1 + >>>> include/linux/acpi.h | 5 +++++ >>>> 3 files changed, 17 insertions(+) >>>> >>>> diff --git a/drivers/acpi/utils.c b/drivers/acpi/utils.c >>>> index 682edd913b3b..4cb061d3169a 100644 >>>> --- a/drivers/acpi/utils.c >>>> +++ b/drivers/acpi/utils.c >>>> @@ -872,6 +872,17 @@ acpi_dev_get_first_match_dev(const char *hid, const char *uid, s64 hrv) >>>> } >>>> EXPORT_SYMBOL(acpi_dev_get_first_match_dev); >>>> >>>> +/** >>>> + * acpi_reduced_hardware - Return if this is an ACPI-reduced-hw machine >>>> + * >>>> + * Return true when running on an ACPI-reduced-hw machine, false otherwise. >>>> + */ >>>> +bool acpi_reduced_hardware(void) >>>> +{ >>>> + return acpi_gbl_reduced_hardware; >>>> +} >>>> +EXPORT_SYMBOL(acpi_reduced_hardware); >>> >>> EXPORT_SYMBOL_GPL()? >> >> Yes, that was my intention, no idea what happened here. I just prepped and send out v2 and I think I know what happened, all the other functions in drivers/acpi/utils.c are EXPORT_SYMBOL, so I probably just copy-and-pasted this without too much thinking. It might be worthwhile to see if we should also mark some other functions as EXPORT_SYMBOL_GPL() here. >> Before I send a v2, do you have any remarks on patch 2/2 (which is actually >> the more interesting patch) ? > > I thought that basing that check on the ACPICA's global variable may > be too coarse grained for some cases, but then I've decided to do it > as is now and we'll see. Yes, the whole code for selecting which backlight driver to use is mostly heuristics, so "we'll see" indeed . With that said I'm pretty confident that this change should not cause problems. Platforms which actually set acpi_gbl_reduced_hardware=true seem to be quite rare. I'm actually only aware of Bay Trail-T based devices doing this. Regards, Hans _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2021-04-07 18:02 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-04-06 21:16 [PATCH 1/2] ACPI: utils: Add acpi_reduced_hardware() helper Hans de Goede 2021-04-06 21:16 ` [Intel-gfx] " Hans de Goede 2021-04-06 21:16 ` [PATCH 2/2] ACPI: video: Check LCD flag on ACPI-reduced-hardware devices Hans de Goede 2021-04-06 21:16 ` [Intel-gfx] " Hans de Goede 2021-04-06 21:37 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for series starting with [1/2] ACPI: utils: Add acpi_reduced_hardware() helper Patchwork 2021-04-06 21:40 ` [Intel-gfx] ✗ Fi.CI.DOCS: " Patchwork 2021-04-06 22:04 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork 2021-04-06 23:42 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork 2021-04-07 17:13 ` [PATCH 1/2] " Rafael J. Wysocki 2021-04-07 17:13 ` [Intel-gfx] " Rafael J. Wysocki 2021-04-07 17:43 ` Hans de Goede 2021-04-07 17:43 ` [Intel-gfx] " Hans de Goede 2021-04-07 17:50 ` Rafael J. Wysocki 2021-04-07 17:50 ` [Intel-gfx] " Rafael J. Wysocki 2021-04-07 18:02 ` Hans de Goede [this message] 2021-04-07 18:02 ` Hans de Goede
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=f24d4fef-3d20-8627-272c-36f4f5a5c493@redhat.com \ --to=hdegoede@redhat.com \ --cc=intel-gfx@lists.freedesktop.org \ --cc=lenb@kernel.org \ --cc=linux-acpi@vger.kernel.org \ --cc=rafael@kernel.org \ --cc=rjw@rjwysocki.net \ --cc=rui.zhang@intel.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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.