dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Samuel Pitoiset <samuel.pitoiset-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Pierre Moreau <pierre.morrow-GANU6spQydw@public.gmane.org>,
	nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: bskeggs-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: Re: [PATCH 2/8] acpi: Add evaluate to functons evaluating _DSM
Date: Tue, 26 May 2015 10:01:19 +0200	[thread overview]
Message-ID: <5564284F.3080406@gmail.com> (raw)
In-Reply-To: <1432592573-13743-2-git-send-email-pierre.morrow-GANU6spQydw@public.gmane.org>

s/functons/functions in the commit message.

On 05/26/2015 12:22 AM, Pierre Moreau wrote:
> This makes it clearer when reading the function name, as well as following the
> names of the related ACPI function.
>
> Signed-off-by: Pierre Moreau <pierre.morrow@free.fr>
> ---
>   drm/nouveau/nouveau_acpi.c | 25 ++++++++++++++-----------
>   1 file changed, 14 insertions(+), 11 deletions(-)
>
> diff --git a/drm/nouveau/nouveau_acpi.c b/drm/nouveau/nouveau_acpi.c
> index 4a48e21..1f18018 100644
> --- a/drm/nouveau/nouveau_acpi.c
> +++ b/drm/nouveau/nouveau_acpi.c
> @@ -71,7 +71,7 @@ static const char nouveau_op_dsm_muid[] = {
>   	0xA7, 0x2B, 0x60, 0x42, 0xA6, 0xB5, 0xBE, 0xE0,
>   };
>   
> -static int nouveau_optimus_dsm(acpi_handle handle, int func, int arg, uint32_t *result)
> +static int nouveau_evaluate_optimus_dsm(acpi_handle handle, int func, int arg, uint32_t *result)
>   {
>   	int i;
>   	union acpi_object *obj;
> @@ -118,7 +118,7 @@ static int nouveau_check_optimus_dsm(acpi_handle handle)
>   	 * Function 0 returns a Buffer containing available functions.
>   	 * The args parameter is ignored for function 0, so just put 0 in it
>   	 */
> -	if (nouveau_optimus_dsm(handle, 0, 0, &result))
> +	if (nouveau_evaluate_optimus_dsm(handle, 0, 0, &result))
>   		return 0;
>   
>   	/*
> @@ -128,7 +128,7 @@ static int nouveau_check_optimus_dsm(acpi_handle handle)
>   	return result & 1 && result & (1 << NOUVEAU_DSM_OPTIMUS_CAPS);
>   }
>   
> -static int nouveau_mux_dsm(acpi_handle handle, int func, int arg)
> +static int nouveau_evaluate_mux_dsm(acpi_handle handle, int func, int arg)
>   {
>   	int ret = 0;
>   	union acpi_object *obj;
> @@ -155,7 +155,7 @@ static int nouveau_dsm_switch_mux(acpi_handle handle, int mux_id)
>   {
>   	mxm_wmi_call_mxmx(mux_id == NOUVEAU_DSM_MUX_LED_STAMINA ? MXM_MXDS_ADAPTER_IGD : MXM_MXDS_ADAPTER_0);
>   	mxm_wmi_call_mxds(mux_id == NOUVEAU_DSM_MUX_LED_STAMINA ? MXM_MXDS_ADAPTER_IGD : MXM_MXDS_ADAPTER_0);
> -	return nouveau_mux_dsm(handle, NOUVEAU_DSM_MUX_LED, mux_id);
> +	return nouveau_evaluate_mux_dsm(handle, NOUVEAU_DSM_MUX_LED, mux_id);
>   }
>   
>   static int nouveau_dsm_set_discrete_state(acpi_handle handle, enum vga_switcheroo_state state)
> @@ -165,7 +165,7 @@ static int nouveau_dsm_set_discrete_state(acpi_handle handle, enum vga_switchero
>   		arg = NOUVEAU_DSM_MUX_POWER_SPEED;
>   	else
>   		arg = NOUVEAU_DSM_MUX_POWER_STAMINA;
> -	nouveau_mux_dsm(handle, NOUVEAU_DSM_MUX_POWER, arg);
> +	nouveau_evaluate_mux_dsm(handle, NOUVEAU_DSM_MUX_POWER, arg);
>   	return 0;
>   }
>   
> @@ -233,8 +233,8 @@ static int nouveau_dsm_pci_probe(struct pci_dev *pdev)
>   
>   	if (retval & NOUVEAU_DSM_HAS_OPT) {
>   		uint32_t result;
> -		nouveau_optimus_dsm(dhandle, NOUVEAU_DSM_OPTIMUS_CAPS, 0,
> -				    &result);
> +		nouveau_evaluate_optimus_dsm(dhandle, NOUVEAU_DSM_OPTIMUS_CAPS,
> +				             0, &result);
>   		dev_info(&pdev->dev, "optimus capabilities: %s, status %s%s\n",
>   			 (result & OPTIMUS_ENABLED) ? "enabled" : "disabled",
>   			 (result & OPTIMUS_DYNAMIC_PWR_CAP) ? "dynamic power, " : "",
> @@ -324,11 +324,14 @@ void nouveau_switcheroo_optimus_dsm(void)
>   	if (!nouveau_dsm_priv.optimus_detected)
>   		return;
>   
> -	nouveau_optimus_dsm(nouveau_dsm_priv.dhandle, NOUVEAU_DSM_OPTIMUS_FLAGS,
> -			    0x3, &result);
> +	nouveau_evaluate_optimus_dsm(nouveau_dsm_priv.dhandle,
> +			             NOUVEAU_DSM_OPTIMUS_FLAGS,
> +			             0x3, &result);
>   
> -	nouveau_optimus_dsm(nouveau_dsm_priv.dhandle, NOUVEAU_DSM_OPTIMUS_CAPS,
> -			    NOUVEAU_DSM_OPTIMUS_SET_POWERDOWN, &result);
> +	nouveau_evaluate_optimus_dsm(nouveau_dsm_priv.dhandle,
> +			             NOUVEAU_DSM_OPTIMUS_CAPS,
> +			             NOUVEAU_DSM_OPTIMUS_SET_POWERDOWN,
> +			             &result);
>   
>   }
>   

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau

  parent reply	other threads:[~2015-05-26  8:01 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-25 22:22 [PATCH 1/8] acpi: Rename v1 DSM to mux to avoid ambiguity Pierre Moreau
2015-05-25 22:22 ` [PATCH 3/8] acpi: Define static variables for revision ids Pierre Moreau
2015-05-28  2:59   ` [Nouveau] " Dave Airlie
2015-05-25 22:22 ` [PATCH 4/8] acpi: Allow evaluate_optimus_dsm to take NULL results Pierre Moreau
     [not found]   ` <1432592573-13743-4-git-send-email-pierre.morrow-GANU6spQydw@public.gmane.org>
2015-05-26  8:02     ` Samuel Pitoiset
2015-05-26  8:27       ` [Nouveau] " Pierre Moreau
     [not found] ` <1432592573-13743-1-git-send-email-pierre.morrow-GANU6spQydw@public.gmane.org>
2015-05-25 22:22   ` [PATCH 2/8] acpi: Add evaluate to functons evaluating _DSM Pierre Moreau
     [not found]     ` <1432592573-13743-2-git-send-email-pierre.morrow-GANU6spQydw@public.gmane.org>
2015-05-26  8:01       ` Samuel Pitoiset [this message]
     [not found]         ` <5564284F.3080406-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-05-28  2:59           ` Dave Airlie
2015-05-25 22:22   ` [PATCH 5/8] acpi: Check returned object type by Optimus _DSM locally Pierre Moreau
2015-05-25 22:39     ` [Nouveau] " Ilia Mirkin
2015-05-26  5:10       ` Pierre Moreau
     [not found]         ` <84DFBDB0-0382-479C-8019-7CD888B7B466-GANU6spQydw@public.gmane.org>
2015-05-26  5:17           ` Ilia Mirkin
2015-05-26  8:26             ` [Nouveau] " Pierre Moreau
     [not found]               ` <754009E0-60CD-4E58-BA04-5FF8F3315E23-GANU6spQydw@public.gmane.org>
2015-05-28  3:03                 ` Dave Airlie
     [not found]     ` <1432592573-13743-5-git-send-email-pierre.morrow-GANU6spQydw@public.gmane.org>
2015-05-26  8:08       ` Samuel Pitoiset
2015-05-25 22:22   ` [PATCH 8/8] acpi: Use booleans when probing different _DSM types Pierre Moreau
     [not found]     ` <1432592573-13743-8-git-send-email-pierre.morrow-GANU6spQydw@public.gmane.org>
2015-05-26 12:46       ` Pierre Moreau
     [not found]         ` <1279603096.13154002.1432644369153.JavaMail.root-x5ewXQG5twBsFmKuirFwRhh1pbbyJDp15NbjCUgZEJk@public.gmane.org>
2015-05-26 20:42           ` Samuel Pitoiset
2015-05-25 22:22 ` [PATCH 6/8] acpi: Improve some messages level and content Pierre Moreau
2015-05-25 22:22 ` [PATCH 7/8] acpi: Add support for Apple Gmux _DMS Pierre Moreau
     [not found]   ` <1432592573-13743-7-git-send-email-pierre.morrow-GANU6spQydw@public.gmane.org>
2015-05-26  8:13     ` Samuel Pitoiset
     [not found]       ` <55642B45.3020509-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-05-26  8:30         ` Pierre Moreau
2015-05-28  2:58 ` [Nouveau] [PATCH 1/8] acpi: Rename v1 DSM to mux to avoid ambiguity 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=5564284F.3080406@gmail.com \
    --to=samuel.pitoiset-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=bskeggs-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=pierre.morrow-GANU6spQydw@public.gmane.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).