platform-driver-x86.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Jafar Akhondali <jafar.akhoondali@gmail.com>
Cc: jlee@suse.com, linux-kernel@vger.kernel.org,
	platform-driver-x86@vger.kernel.org, mgross@linux.intel.com
Subject: Re: [PATCH v5] platform/x86: acer-wmi: Add Turbo Mode support for Acer PH315-53
Date: Sun, 15 Aug 2021 15:50:05 +0200	[thread overview]
Message-ID: <e3fbabc6-36a7-6c8d-2b28-065467325697@redhat.com> (raw)
In-Reply-To: <CAMW3L+3WUCXx60fALT=2J8TjK_BO3jOTb+8+JQQrKA1_F9pLTQ@mail.gmail.com>

Hi,

On 8/14/21 1:40 PM, Jafar Akhondali wrote:
>  Hi Hans,
> Thank you for your efforts on the patch, I've sure learned a lot from
> your comments as this
> was my first contribution to Linux kernel.
> 
> Just an extra question, for the next patch I'm gonna send turbo mode support for
> 14 other Acer Predator laptops. The only required change is that I should add
> "quirk_entry" for GPU and CPU fan count, and match product names to their quirk.
> 
> 12 of these Predator laptops have exactly 1 fan for CPU and 1 fan for GPU,
> but two of them have 2 fans for GPU and 1 for CPU. So my question is should
> I add the quirks per product (which will end up to have 14 quirks,
> same as current patch) like:
> 
> static struct quirk_entry quirk_acer_predator_ph315_53 = {
>       .turbo = 1,
>       .cpu_fans = 1,
>       .gpu_fans = 1,
> };
> 
> or should I specify the quirk per fan count like this one:
> 
> static struct quirk_entry quirk_acer_predator_gpu_fan_one_cpu_fan_one = {
>       .turbo = 1,
>       .cpu_fans = 1,
>       .gpu_fans = 1,
> };
> 
> and then set different matched DMI product names to the above quirk?
> 
> The first approach is more verbose, the second uses less code.
> If possible, I would like to know your thoughts on this.

Please use the second approach of having a single:

static struct quirk_entry quirk_acer_predator_gpu_fan_one_cpu_fan_one = {
      .turbo = 1,
      .cpu_fans = 1,
      .gpu_fans = 1,
};

With the DMI entries with all laptops with this setup pointing to that
one quirk_entry.

Regards,

Hans


      reply	other threads:[~2021-08-15 13:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-12 12:53 [PATCH v5] platform/x86: acer-wmi: Add Turbo Mode support for Acer PH315-53 JafarAkhondali
2021-08-12 16:43 ` kernel test robot
2021-08-12 17:57 ` kernel test robot
2021-08-12 20:15 ` Hans de Goede
2021-08-13 11:22 ` Hans de Goede
2021-08-14 11:40   ` Jafar Akhondali
2021-08-15 13:50     ` Hans de Goede [this message]

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=e3fbabc6-36a7-6c8d-2b28-065467325697@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=jafar.akhoondali@gmail.com \
    --cc=jlee@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgross@linux.intel.com \
    --cc=platform-driver-x86@vger.kernel.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).