mbox series

[v2,0/4] platform/surface: Add platform profile driver for Surface devices

Message ID 20210211201703.658240-1-luzmaximilian@gmail.com (mailing list archive)
Headers show
Series platform/surface: Add platform profile driver for Surface devices | expand

Message

Maximilian Luz Feb. 11, 2021, 8:16 p.m. UTC
This series adds a driver to provide platform profile support on 5th-
and later generation Microsoft Surface devices with a Surface System
Aggregator Module. On those devices, the platform profile can be used to
influence cooling behavior and power consumption.

To achieve this, a new platform profile is introduced: the
'balanced-performance' profile.

In addition, a couple of fix-ups are performed:
- Hide CONFIG_ACPI_PLATFORM_PROFILE and change drivers so that it is
  selected instead of depended on.
- Fix some references to documentation in a comment.

Note: This series (or more specifically "platform/surface: Add platform
profile driver") depends on the "platform/surface: Add Surface
Aggregator device registry" series.

Changes in v2:
 - Introduce new 'balanced-performance' platform profile and change
   profile mapping in driver.
 - Perform some fix-ups for the ACPI platform profile implementation:
   - Fix some references to documentation in a comment.
   - Hide CONFIG_ACPI_PLATFORM_PROFILE

Maximilian Luz (4):
  ACPI: platform: Hide ACPI_PLATFORM_PROFILE option
  ACPI: platform: Fix file references in comment
  ACPI: platform: Add balanced-performance platform profile
  platform/surface: Add platform profile driver

 .../ABI/testing/sysfs-platform_profile        |  18 +-
 MAINTAINERS                                   |   6 +
 drivers/acpi/Kconfig                          |  16 +-
 drivers/acpi/platform_profile.c               |   1 +
 drivers/platform/surface/Kconfig              |  22 ++
 drivers/platform/surface/Makefile             |   1 +
 .../surface/surface_platform_profile.c        | 190 ++++++++++++++++++
 drivers/platform/x86/Kconfig                  |   4 +-
 include/linux/platform_profile.h              |   6 +-
 9 files changed, 237 insertions(+), 27 deletions(-)
 create mode 100644 drivers/platform/surface/surface_platform_profile.c

Comments

Mark Pearson Feb. 12, 2021, 3:29 p.m. UTC | #1
On 11/02/2021 15:16, Maximilian Luz wrote:
> This series adds a driver to provide platform profile support on 5th-
> and later generation Microsoft Surface devices with a Surface System
> Aggregator Module. On those devices, the platform profile can be used to
> influence cooling behavior and power consumption.
> 
> To achieve this, a new platform profile is introduced: the
> 'balanced-performance' profile.
> 
> In addition, a couple of fix-ups are performed:
> - Hide CONFIG_ACPI_PLATFORM_PROFILE and change drivers so that it is
>   selected instead of depended on.
> - Fix some references to documentation in a comment.
> 
> Note: This series (or more specifically "platform/surface: Add platform
> profile driver") depends on the "platform/surface: Add Surface
> Aggregator device registry" series.
> 
> Changes in v2:
>  - Introduce new 'balanced-performance' platform profile and change
>    profile mapping in driver.
>  - Perform some fix-ups for the ACPI platform profile implementation:
>    - Fix some references to documentation in a comment.
>    - Hide CONFIG_ACPI_PLATFORM_PROFILE
> 
> Maximilian Luz (4):
>   ACPI: platform: Hide ACPI_PLATFORM_PROFILE option
>   ACPI: platform: Fix file references in comment
>   ACPI: platform: Add balanced-performance platform profile
>   platform/surface: Add platform profile driver
> 
>  .../ABI/testing/sysfs-platform_profile        |  18 +-
>  MAINTAINERS                                   |   6 +
>  drivers/acpi/Kconfig                          |  16 +-
>  drivers/acpi/platform_profile.c               |   1 +
>  drivers/platform/surface/Kconfig              |  22 ++
>  drivers/platform/surface/Makefile             |   1 +
>  .../surface/surface_platform_profile.c        | 190 ++++++++++++++++++
>  drivers/platform/x86/Kconfig                  |   4 +-
>  include/linux/platform_profile.h              |   6 +-
>  9 files changed, 237 insertions(+), 27 deletions(-)
>  create mode 100644 drivers/platform/surface/surface_platform_profile.c
> 
I looked through the patch series and it all looked good to me.
Glad the platform profile implementation is getting used in more places :)

Thanks
Mark
Hans de Goede Feb. 15, 2021, 2:34 p.m. UTC | #2
Hi,

On 2/11/21 9:16 PM, Maximilian Luz wrote:
> This series adds a driver to provide platform profile support on 5th-
> and later generation Microsoft Surface devices with a Surface System
> Aggregator Module. On those devices, the platform profile can be used to
> influence cooling behavior and power consumption.
> 
> To achieve this, a new platform profile is introduced: the
> 'balanced-performance' profile.
> 
> In addition, a couple of fix-ups are performed:
> - Hide CONFIG_ACPI_PLATFORM_PROFILE and change drivers so that it is
>   selected instead of depended on.
> - Fix some references to documentation in a comment.
> 
> Note: This series (or more specifically "platform/surface: Add platform
> profile driver") depends on the "platform/surface: Add Surface
> Aggregator device registry" series.
> 
> Changes in v2:
>  - Introduce new 'balanced-performance' platform profile and change
>    profile mapping in driver.
>  - Perform some fix-ups for the ACPI platform profile implementation:
>    - Fix some references to documentation in a comment.
>    - Hide CONFIG_ACPI_PLATFORM_PROFILE

Thanks, the entire series looks good to me, so for the series:

Reviewed-by: Hans de Goede <hdegoede@redhat.com>

Rafael, can you (once 5.12-rc1 is out) pick 1-3/4 and then provide a
stable branch for me to merge?

Then I will pick up 4/4.

Regards,

Hans




> 
> Maximilian Luz (4):
>   ACPI: platform: Hide ACPI_PLATFORM_PROFILE option
>   ACPI: platform: Fix file references in comment
>   ACPI: platform: Add balanced-performance platform profile
>   platform/surface: Add platform profile driver
> 
>  .../ABI/testing/sysfs-platform_profile        |  18 +-
>  MAINTAINERS                                   |   6 +
>  drivers/acpi/Kconfig                          |  16 +-
>  drivers/acpi/platform_profile.c               |   1 +
>  drivers/platform/surface/Kconfig              |  22 ++
>  drivers/platform/surface/Makefile             |   1 +
>  .../surface/surface_platform_profile.c        | 190 ++++++++++++++++++
>  drivers/platform/x86/Kconfig                  |   4 +-
>  include/linux/platform_profile.h              |   6 +-
>  9 files changed, 237 insertions(+), 27 deletions(-)
>  create mode 100644 drivers/platform/surface/surface_platform_profile.c
>
Rafael J. Wysocki Feb. 15, 2021, 2:54 p.m. UTC | #3
On Mon, Feb 15, 2021 at 3:36 PM Hans de Goede <hdegoede@redhat.com> wrote:
>
> Hi,
>
> On 2/11/21 9:16 PM, Maximilian Luz wrote:
> > This series adds a driver to provide platform profile support on 5th-
> > and later generation Microsoft Surface devices with a Surface System
> > Aggregator Module. On those devices, the platform profile can be used to
> > influence cooling behavior and power consumption.
> >
> > To achieve this, a new platform profile is introduced: the
> > 'balanced-performance' profile.
> >
> > In addition, a couple of fix-ups are performed:
> > - Hide CONFIG_ACPI_PLATFORM_PROFILE and change drivers so that it is
> >   selected instead of depended on.
> > - Fix some references to documentation in a comment.
> >
> > Note: This series (or more specifically "platform/surface: Add platform
> > profile driver") depends on the "platform/surface: Add Surface
> > Aggregator device registry" series.
> >
> > Changes in v2:
> >  - Introduce new 'balanced-performance' platform profile and change
> >    profile mapping in driver.
> >  - Perform some fix-ups for the ACPI platform profile implementation:
> >    - Fix some references to documentation in a comment.
> >    - Hide CONFIG_ACPI_PLATFORM_PROFILE
>
> Thanks, the entire series looks good to me, so for the series:
>
> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
>
> Rafael, can you (once 5.12-rc1 is out) pick 1-3/4 and then provide a
> stable branch for me to merge?

Since [1-3/4] appear to be uncontroversial, so IMO it would be better
to merge them during the merge window, so they are present in
5.12-rc1.

The extra stable branch wouldn't be necessary in that case.

> Then I will pick up 4/4.
Hans de Goede Feb. 15, 2021, 2:56 p.m. UTC | #4
Hi,

On 2/15/21 3:54 PM, Rafael J. Wysocki wrote:
> On Mon, Feb 15, 2021 at 3:36 PM Hans de Goede <hdegoede@redhat.com> wrote:
>>
>> Hi,
>>
>> On 2/11/21 9:16 PM, Maximilian Luz wrote:
>>> This series adds a driver to provide platform profile support on 5th-
>>> and later generation Microsoft Surface devices with a Surface System
>>> Aggregator Module. On those devices, the platform profile can be used to
>>> influence cooling behavior and power consumption.
>>>
>>> To achieve this, a new platform profile is introduced: the
>>> 'balanced-performance' profile.
>>>
>>> In addition, a couple of fix-ups are performed:
>>> - Hide CONFIG_ACPI_PLATFORM_PROFILE and change drivers so that it is
>>>   selected instead of depended on.
>>> - Fix some references to documentation in a comment.
>>>
>>> Note: This series (or more specifically "platform/surface: Add platform
>>> profile driver") depends on the "platform/surface: Add Surface
>>> Aggregator device registry" series.
>>>
>>> Changes in v2:
>>>  - Introduce new 'balanced-performance' platform profile and change
>>>    profile mapping in driver.
>>>  - Perform some fix-ups for the ACPI platform profile implementation:
>>>    - Fix some references to documentation in a comment.
>>>    - Hide CONFIG_ACPI_PLATFORM_PROFILE
>>
>> Thanks, the entire series looks good to me, so for the series:
>>
>> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
>>
>> Rafael, can you (once 5.12-rc1 is out) pick 1-3/4 and then provide a
>> stable branch for me to merge?
> 
> Since [1-3/4] appear to be uncontroversial, so IMO it would be better
> to merge them during the merge window, so they are present in
> 5.12-rc1.
> 
> The extra stable branch wouldn't be necessary in that case.

That works for me, thanks.

Regards,

Hans
Hans de Goede Feb. 15, 2021, 3:22 p.m. UTC | #5
Hi,

On 2/15/21 3:54 PM, Rafael J. Wysocki wrote:
> On Mon, Feb 15, 2021 at 3:36 PM Hans de Goede <hdegoede@redhat.com> wrote:
>>
>> Hi,
>>
>> On 2/11/21 9:16 PM, Maximilian Luz wrote:
>>> This series adds a driver to provide platform profile support on 5th-
>>> and later generation Microsoft Surface devices with a Surface System
>>> Aggregator Module. On those devices, the platform profile can be used to
>>> influence cooling behavior and power consumption.
>>>
>>> To achieve this, a new platform profile is introduced: the
>>> 'balanced-performance' profile.
>>>
>>> In addition, a couple of fix-ups are performed:
>>> - Hide CONFIG_ACPI_PLATFORM_PROFILE and change drivers so that it is
>>>   selected instead of depended on.
>>> - Fix some references to documentation in a comment.
>>>
>>> Note: This series (or more specifically "platform/surface: Add platform
>>> profile driver") depends on the "platform/surface: Add Surface
>>> Aggregator device registry" series.
>>>
>>> Changes in v2:
>>>  - Introduce new 'balanced-performance' platform profile and change
>>>    profile mapping in driver.
>>>  - Perform some fix-ups for the ACPI platform profile implementation:
>>>    - Fix some references to documentation in a comment.
>>>    - Hide CONFIG_ACPI_PLATFORM_PROFILE
>>
>> Thanks, the entire series looks good to me, so for the series:
>>
>> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
>>
>> Rafael, can you (once 5.12-rc1 is out) pick 1-3/4 and then provide a
>> stable branch for me to merge?
> 
> Since [1-3/4] appear to be uncontroversial, so IMO it would be better
> to merge them during the merge window, so they are present in
> 5.12-rc1.

So I just realized one problem with this plan, patch 1/4 depends
on (modifies) Kconfig bits which are only in my tree / my 5.12 pull-req
(which I send out earlier today).

One option here would be for me pickup 1-3/4 and send a second
pull-req during the merge-window, with your ack as these are
touching files under drivers/acpi ?

Regards,

Hans
Rafael J. Wysocki Feb. 15, 2021, 3:29 p.m. UTC | #6
On Mon, Feb 15, 2021 at 4:22 PM Hans de Goede <hdegoede@redhat.com> wrote:
>
> Hi,
>
> On 2/15/21 3:54 PM, Rafael J. Wysocki wrote:
> > On Mon, Feb 15, 2021 at 3:36 PM Hans de Goede <hdegoede@redhat.com> wrote:
> >>
> >> Hi,
> >>
> >> On 2/11/21 9:16 PM, Maximilian Luz wrote:
> >>> This series adds a driver to provide platform profile support on 5th-
> >>> and later generation Microsoft Surface devices with a Surface System
> >>> Aggregator Module. On those devices, the platform profile can be used to
> >>> influence cooling behavior and power consumption.
> >>>
> >>> To achieve this, a new platform profile is introduced: the
> >>> 'balanced-performance' profile.
> >>>
> >>> In addition, a couple of fix-ups are performed:
> >>> - Hide CONFIG_ACPI_PLATFORM_PROFILE and change drivers so that it is
> >>>   selected instead of depended on.
> >>> - Fix some references to documentation in a comment.
> >>>
> >>> Note: This series (or more specifically "platform/surface: Add platform
> >>> profile driver") depends on the "platform/surface: Add Surface
> >>> Aggregator device registry" series.
> >>>
> >>> Changes in v2:
> >>>  - Introduce new 'balanced-performance' platform profile and change
> >>>    profile mapping in driver.
> >>>  - Perform some fix-ups for the ACPI platform profile implementation:
> >>>    - Fix some references to documentation in a comment.
> >>>    - Hide CONFIG_ACPI_PLATFORM_PROFILE
> >>
> >> Thanks, the entire series looks good to me, so for the series:
> >>
> >> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
> >>
> >> Rafael, can you (once 5.12-rc1 is out) pick 1-3/4 and then provide a
> >> stable branch for me to merge?
> >
> > Since [1-3/4] appear to be uncontroversial, so IMO it would be better
> > to merge them during the merge window, so they are present in
> > 5.12-rc1.
>
> So I just realized one problem with this plan, patch 1/4 depends
> on (modifies) Kconfig bits which are only in my tree / my 5.12 pull-req
> (which I send out earlier today).

That should be fine.

I will be sending the first batch of pull requests tomorrow.  Then I
will wait for them to be merged and I will merge the mainline back at
that point.  The new patches will be applied on top of that merge, so
if your 5.12 material is included in it, they should build without
problems.
Hans de Goede Feb. 15, 2021, 4:36 p.m. UTC | #7
Hi,

On 2/15/21 4:29 PM, Rafael J. Wysocki wrote:
> On Mon, Feb 15, 2021 at 4:22 PM Hans de Goede <hdegoede@redhat.com> wrote:
>>
>> Hi,
>>
>> On 2/15/21 3:54 PM, Rafael J. Wysocki wrote:
>>> On Mon, Feb 15, 2021 at 3:36 PM Hans de Goede <hdegoede@redhat.com> wrote:
>>>>
>>>> Hi,
>>>>
>>>> On 2/11/21 9:16 PM, Maximilian Luz wrote:
>>>>> This series adds a driver to provide platform profile support on 5th-
>>>>> and later generation Microsoft Surface devices with a Surface System
>>>>> Aggregator Module. On those devices, the platform profile can be used to
>>>>> influence cooling behavior and power consumption.
>>>>>
>>>>> To achieve this, a new platform profile is introduced: the
>>>>> 'balanced-performance' profile.
>>>>>
>>>>> In addition, a couple of fix-ups are performed:
>>>>> - Hide CONFIG_ACPI_PLATFORM_PROFILE and change drivers so that it is
>>>>>   selected instead of depended on.
>>>>> - Fix some references to documentation in a comment.
>>>>>
>>>>> Note: This series (or more specifically "platform/surface: Add platform
>>>>> profile driver") depends on the "platform/surface: Add Surface
>>>>> Aggregator device registry" series.
>>>>>
>>>>> Changes in v2:
>>>>>  - Introduce new 'balanced-performance' platform profile and change
>>>>>    profile mapping in driver.
>>>>>  - Perform some fix-ups for the ACPI platform profile implementation:
>>>>>    - Fix some references to documentation in a comment.
>>>>>    - Hide CONFIG_ACPI_PLATFORM_PROFILE
>>>>
>>>> Thanks, the entire series looks good to me, so for the series:
>>>>
>>>> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
>>>>
>>>> Rafael, can you (once 5.12-rc1 is out) pick 1-3/4 and then provide a
>>>> stable branch for me to merge?
>>>
>>> Since [1-3/4] appear to be uncontroversial, so IMO it would be better
>>> to merge them during the merge window, so they are present in
>>> 5.12-rc1.
>>
>> So I just realized one problem with this plan, patch 1/4 depends
>> on (modifies) Kconfig bits which are only in my tree / my 5.12 pull-req
>> (which I send out earlier today).
> 
> That should be fine.
> 
> I will be sending the first batch of pull requests tomorrow.  Then I
> will wait for them to be merged and I will merge the mainline back at
> that point.  The new patches will be applied on top of that merge, so
> if your 5.12 material is included in it, they should build without
> problems.

Ok, that sounds good to me.

Regards,

Hans
Rafael J. Wysocki Feb. 15, 2021, 6:40 p.m. UTC | #8
On Mon, Feb 15, 2021 at 5:36 PM Hans de Goede <hdegoede@redhat.com> wrote:
>
> Hi,
>
> On 2/15/21 4:29 PM, Rafael J. Wysocki wrote:
> > On Mon, Feb 15, 2021 at 4:22 PM Hans de Goede <hdegoede@redhat.com> wrote:
> >>
> >> Hi,
> >>
> >> On 2/15/21 3:54 PM, Rafael J. Wysocki wrote:
> >>> On Mon, Feb 15, 2021 at 3:36 PM Hans de Goede <hdegoede@redhat.com> wrote:
> >>>>
> >>>> Hi,
> >>>>
> >>>> On 2/11/21 9:16 PM, Maximilian Luz wrote:
> >>>>> This series adds a driver to provide platform profile support on 5th-
> >>>>> and later generation Microsoft Surface devices with a Surface System
> >>>>> Aggregator Module. On those devices, the platform profile can be used to
> >>>>> influence cooling behavior and power consumption.
> >>>>>
> >>>>> To achieve this, a new platform profile is introduced: the
> >>>>> 'balanced-performance' profile.
> >>>>>
> >>>>> In addition, a couple of fix-ups are performed:
> >>>>> - Hide CONFIG_ACPI_PLATFORM_PROFILE and change drivers so that it is
> >>>>>   selected instead of depended on.
> >>>>> - Fix some references to documentation in a comment.
> >>>>>
> >>>>> Note: This series (or more specifically "platform/surface: Add platform
> >>>>> profile driver") depends on the "platform/surface: Add Surface
> >>>>> Aggregator device registry" series.
> >>>>>
> >>>>> Changes in v2:
> >>>>>  - Introduce new 'balanced-performance' platform profile and change
> >>>>>    profile mapping in driver.
> >>>>>  - Perform some fix-ups for the ACPI platform profile implementation:
> >>>>>    - Fix some references to documentation in a comment.
> >>>>>    - Hide CONFIG_ACPI_PLATFORM_PROFILE
> >>>>
> >>>> Thanks, the entire series looks good to me, so for the series:
> >>>>
> >>>> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
> >>>>
> >>>> Rafael, can you (once 5.12-rc1 is out) pick 1-3/4 and then provide a
> >>>> stable branch for me to merge?
> >>>
> >>> Since [1-3/4] appear to be uncontroversial, so IMO it would be better
> >>> to merge them during the merge window, so they are present in
> >>> 5.12-rc1.
> >>
> >> So I just realized one problem with this plan, patch 1/4 depends
> >> on (modifies) Kconfig bits which are only in my tree / my 5.12 pull-req
> >> (which I send out earlier today).
> >
> > That should be fine.
> >
> > I will be sending the first batch of pull requests tomorrow.  Then I
> > will wait for them to be merged and I will merge the mainline back at
> > that point.  The new patches will be applied on top of that merge, so
> > if your 5.12 material is included in it, they should build without
> > problems.
>
> Ok, that sounds good to me.

In fact, my pull requests are ready right now, so I will be sending
them shortly, but that doesn\t change the subsequent steps.
Rafael J. Wysocki Feb. 24, 2021, 2:13 p.m. UTC | #9
On Mon, Feb 15, 2021 at 5:36 PM Hans de Goede <hdegoede@redhat.com> wrote:
>
> Hi,
>
> On 2/15/21 4:29 PM, Rafael J. Wysocki wrote:
> > On Mon, Feb 15, 2021 at 4:22 PM Hans de Goede <hdegoede@redhat.com> wrote:
> >>
> >> Hi,
> >>
> >> On 2/15/21 3:54 PM, Rafael J. Wysocki wrote:
> >>> On Mon, Feb 15, 2021 at 3:36 PM Hans de Goede <hdegoede@redhat.com> wrote:
> >>>>
> >>>> Hi,
> >>>>
> >>>> On 2/11/21 9:16 PM, Maximilian Luz wrote:
> >>>>> This series adds a driver to provide platform profile support on 5th-
> >>>>> and later generation Microsoft Surface devices with a Surface System
> >>>>> Aggregator Module. On those devices, the platform profile can be used to
> >>>>> influence cooling behavior and power consumption.
> >>>>>
> >>>>> To achieve this, a new platform profile is introduced: the
> >>>>> 'balanced-performance' profile.
> >>>>>
> >>>>> In addition, a couple of fix-ups are performed:
> >>>>> - Hide CONFIG_ACPI_PLATFORM_PROFILE and change drivers so that it is
> >>>>>   selected instead of depended on.
> >>>>> - Fix some references to documentation in a comment.
> >>>>>
> >>>>> Note: This series (or more specifically "platform/surface: Add platform
> >>>>> profile driver") depends on the "platform/surface: Add Surface
> >>>>> Aggregator device registry" series.
> >>>>>
> >>>>> Changes in v2:
> >>>>>  - Introduce new 'balanced-performance' platform profile and change
> >>>>>    profile mapping in driver.
> >>>>>  - Perform some fix-ups for the ACPI platform profile implementation:
> >>>>>    - Fix some references to documentation in a comment.
> >>>>>    - Hide CONFIG_ACPI_PLATFORM_PROFILE
> >>>>
> >>>> Thanks, the entire series looks good to me, so for the series:
> >>>>
> >>>> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
> >>>>
> >>>> Rafael, can you (once 5.12-rc1 is out) pick 1-3/4 and then provide a
> >>>> stable branch for me to merge?
> >>>
> >>> Since [1-3/4] appear to be uncontroversial, so IMO it would be better
> >>> to merge them during the merge window, so they are present in
> >>> 5.12-rc1.
> >>
> >> So I just realized one problem with this plan, patch 1/4 depends
> >> on (modifies) Kconfig bits which are only in my tree / my 5.12 pull-req
> >> (which I send out earlier today).
> >
> > That should be fine.
> >
> > I will be sending the first batch of pull requests tomorrow.  Then I
> > will wait for them to be merged and I will merge the mainline back at
> > that point.  The new patches will be applied on top of that merge, so
> > if your 5.12 material is included in it, they should build without
> > problems.
>
> Ok, that sounds good to me.

The [1-3/4] have just been applied (as 5.12-rc material), thanks!