All of lore.kernel.org
 help / color / mirror / Atom feed
From: Felix Kuehling <felix.kuehling@amd.com>
To: Mukul Joshi <mukul.joshi@amd.com>, amd-gfx@lists.freedesktop.org
Cc: Harish.Kasiviswanathan@amd.com, philip.yang@amd.com
Subject: Re: [PATCHv2 8/8] drm/amdgpu: Temporarily enable UALink loopback via module parameter
Date: Tue, 27 Oct 2026 17:47:59 -0400	[thread overview]
Message-ID: <75e4bbf1-1153-44bb-b759-b0d21cec858e@amd.com> (raw)
In-Reply-To: <20261027195913.1794477-9-mukul.joshi@amd.com>

On 2026-10-27 15:54, Mukul Joshi wrote:
> Temporarily add the amdgpu.ualink_loopback module parameter to request
> UALink loopback mode for manufacturing testing, until the final
> mechanism for enabling loopback is in place. Loopback is disabled by
> default.
>
> Only amdgpu_ualink_loopback_requested() reads the parameter, so moving
> to the final mechanism only needs to replace it there.
>
> Signed-off-by: Mukul Joshi <mukul.joshi@amd.com>

Acked-by: Felix Kuehling <felix.kuehling@amd.com>

We probably don't want to push this one upstream. It could be for our 
internal branch only until we have the proper detection method in place.

Regards,
   Felix


> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu.h        |  1 +
>   drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c    | 13 +++++++++++++
>   drivers/gpu/drm/amd/amdgpu/amdgpu_ualink.c |  5 +++--
>   3 files changed, 17 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> index 5a32b54b1e9b..b8be093b8a33 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> @@ -270,6 +270,7 @@ extern int amdgpu_rebar;
>   extern int amdgpu_wbrf;
>   extern int amdgpu_user_queue;
>   extern int amdgpu_ptl;
> +extern int amdgpu_ualink_loopback;
>   
>   extern uint amdgpu_hdmi_hpd_debounce_delay_ms;
>   
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> index 3e5634de077f..e0cf40f86194 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> @@ -253,6 +253,7 @@ int amdgpu_rebar = -1; /* auto */
>   int amdgpu_user_queue = -1;
>   uint amdgpu_hdmi_hpd_debounce_delay_ms;
>   int amdgpu_ptl = -1; /* auto */
> +int amdgpu_ualink_loopback;
>   
>   DECLARE_DYNDBG_CLASSMAP(drm_debug_classes, DD_CLASS_TYPE_DISJOINT_BITS, 0,
>   			"DRM_UT_CORE",
> @@ -1165,6 +1166,18 @@ module_param_named(hdmi_hpd_debounce_delay_ms, amdgpu_hdmi_hpd_debounce_delay_ms
>   MODULE_PARM_DESC(ptl, "Enable PTL (-1 = auto, 0 = disable (default), 1 = enable, 2 = permanently disable)");
>   module_param_named(ptl, amdgpu_ptl, int, 0444);
>   
> +/**
> + * DOC: ualink_loopback (int)
> + * Enable UALink loopback mode for manufacturing testing. In loopback mode a
> + * single GPU acts as both the exporter (accelerator ID 1) and the importer
> + * (accelerator ID 0) and loops UALink requests back to itself. Possible values:
> + *
> + * - 0 = disable (default)
> + * - 1 = enable
> + */
> +MODULE_PARM_DESC(ualink_loopback, "Enable UALink loopback mode (0 = disable (default), 1 = enable)");
> +module_param_named(ualink_loopback, amdgpu_ualink_loopback, int, 0444);
> +
>   /* These devices are not supported by amdgpu.
>    * They are supported by the mach64, r128, radeon drivers
>    */
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ualink.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ualink.c
> index 1c2203ff175d..a98fa5f970b1 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ualink.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ualink.c
> @@ -96,11 +96,12 @@ static int amdgpu_ualink_drm_client_create(struct amdgpu_device *adev)
>   /*
>    * amdgpu_ualink_loopback_requested - check whether UALink loopback is requested
>    *
> - * There is no mechanism to request loopback mode yet, so it stays disabled.
> + * Loopback mode is temporarily requested with the amdgpu.ualink_loopback
> + * module parameter.
>    */
>   static bool amdgpu_ualink_loopback_requested(struct amdgpu_device *adev)
>   {
> -	return false;
> +	return amdgpu_ualink_loopback == 1;
>   }
>   
>   /*

      reply	other threads:[~2026-10-27 21:48 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-27 19:54 [PATCHv2 0/8] Add UALink Loopback support Mukul Joshi
2026-10-27 19:54 ` [PATCHv2 1/8] drm/amdgpu: Add UALink loopback infrastructure Mukul Joshi
2026-10-27 20:22   ` Felix Kuehling
2026-10-27 20:45     ` Mukul Joshi
2026-10-27 20:56       ` Felix Kuehling
2026-10-28  6:06         ` Lazar, Lijo
2026-10-27 19:54 ` [PATCHv2 2/8] drm/amdgpu: Support VMID 0 GPUVA completion WB address for UALink Mukul Joshi
2026-10-27 21:23   ` Felix Kuehling
2026-10-27 19:54 ` [PATCHv2 3/8] drm/amdgpu: Emulate exporter->importer UALink messages in loopback Mukul Joshi
2026-10-27 21:34   ` Felix Kuehling
2026-10-27 19:54 ` [PATCHv2 4/8] drm/amdgpu: Attribute UALink loopback messages to the correct sender Mukul Joshi
2026-10-27 21:38   ` Felix Kuehling
2026-10-28  6:23   ` Lazar, Lijo
2026-10-28 13:53     ` Mukul Joshi
2026-10-28 14:00       ` Lazar, Lijo
2026-10-28 14:43         ` Mukul Joshi
2026-10-27 19:54 ` [PATCHv2 5/8] drm/amdgpu: Set up UALink rings and metadata for loopback Mukul Joshi
2026-10-27 20:20   ` Felix Kuehling
2026-10-27 19:54 ` [PATCHv2 6/8] drm/amdgpu: Enable UALink loopback mode Mukul Joshi
2026-10-27 21:45   ` Felix Kuehling
2026-10-28  6:33   ` Lazar, Lijo
2026-10-27 19:54 ` [PATCHv2 7/8] drm/amdgpu: Reject config updates in " Mukul Joshi
2026-10-27 21:06   ` Felix Kuehling
2026-10-27 19:54 ` [PATCHv2 8/8] drm/amdgpu: Temporarily enable UALink loopback via module parameter Mukul Joshi
2026-10-27 21:47   ` Felix Kuehling [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=75e4bbf1-1153-44bb-b759-b0d21cec858e@amd.com \
    --to=felix.kuehling@amd.com \
    --cc=Harish.Kasiviswanathan@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=mukul.joshi@amd.com \
    --cc=philip.yang@amd.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: 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.