All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Wu <peter-VTkQYDcBqhK7DlmcbJSQ7g@public.gmane.org>
To: Alex Deucher <alexdeucher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Alex Deucher <alexander.deucher-5C7GfCeVMHo@public.gmane.org>,
	amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: Re: [PATCH 2/2] drm/radeon: init atpx at switcheroo register time
Date: Fri, 29 Jul 2016 01:51:29 +0200	[thread overview]
Message-ID: <20160728235129.GD1031@al> (raw)
In-Reply-To: <1469650245-7919-2-git-send-email-alexander.deucher-5C7GfCeVMHo@public.gmane.org>

On Wed, Jul 27, 2016 at 04:10:45PM -0400, Alex Deucher wrote:
> If we do it at enable time, it's too late for the feature
> checks.
> 
> bug: https://bugzilla.kernel.org/show_bug.cgi?id=115321
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> Cc: Peter Wu <peter@lekensteyn.nl>
> ---
>  drivers/gpu/drm/radeon/radeon_atpx_handler.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/radeon/radeon_atpx_handler.c b/drivers/gpu/drm/radeon/radeon_atpx_handler.c
> index 86dcdf3..b46b4c4 100644
> --- a/drivers/gpu/drm/radeon/radeon_atpx_handler.c
> +++ b/drivers/gpu/drm/radeon/radeon_atpx_handler.c
> @@ -536,7 +536,7 @@ static int radeon_atpx_get_client_id(struct pci_dev *pdev)
>  static const struct vga_switcheroo_handler radeon_atpx_handler = {
>  	.switchto = radeon_atpx_switchto,
>  	.power_state = radeon_atpx_power_state,
> -	.init = radeon_atpx_init,
> +	.init = NULL,

Let's just remove this initialization, it allows for trivial removal of
the init member later. radeon was the only user of this anyway.

>  	.get_client_id = radeon_atpx_get_client_id,
>  };
>  
> @@ -572,6 +572,7 @@ static bool radeon_atpx_detect(void)
>  		printk(KERN_INFO "vga_switcheroo: detected switching method %s handle\n",
>  		       acpi_method_name);
>  		radeon_atpx_priv.atpx_detected = true;
> +		radeon_atpx_init();
>  		return true;
>  	}
>  	return false;
> -- 
> 2.5.5
> 

Other than the command above, both patches are
Reviewed-by: Peter Wu <peter@lekensteyn.nl>

I'll be testing this (via your amd-staging-4.6 branch) tomorrow on an
AMD/AMD hybrid (GCN 1.0 unfortunately, so restricted to radeon).
-- 
Kind regards,
Peter Wu
https://lekensteyn.nl
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

      parent reply	other threads:[~2016-07-28 23:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-27 20:10 [PATCH 1/2] drm/amdgpu: init atpx at switcheroo register time Alex Deucher
     [not found] ` <1469650245-7919-1-git-send-email-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
2016-07-27 20:10   ` [PATCH 2/2] drm/radeon: " Alex Deucher
     [not found]     ` <1469650245-7919-2-git-send-email-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
2016-07-28 23:51       ` Peter Wu [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=20160728235129.GD1031@al \
    --to=peter-vtkqydcbqhk7dlmcbjsq7g@public.gmane.org \
    --cc=alexander.deucher-5C7GfCeVMHo@public.gmane.org \
    --cc=alexdeucher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@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 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.