From: Wayne Lin <Wayne.Lin@amd.com>
To: <amd-gfx@lists.freedesktop.org>
Cc: Raghavendra Prasad Mallela <raghavendraprasad.mallela@amd.com>,
<HemaLatha.Pinnamreddy2@amd.com>,
Hemalatha Pinnamreddy <hemalatha.pinnamreddy2@amd.com>
Subject: Re: [PATCH] drm/amd/display: Fix aux timeout callback across engines
Date: Mon, 23 Nov 2026 09:46:14 +0800 [thread overview]
Message-ID: <20261123014614.1181287-1-Wayne.Lin@amd.com> (raw)
In-Reply-To: <20261111093528.2918607-1-raghavendraprasad.mallela@amd.com>
Reviewed-by: Wayne Lin <Wayne.Lin@amd.com>
On Wed, 11 Nov 2026 15:05:28 +0530, Raghavendra Prasad Mallela wrote:
> From: Hemalatha Pinnamreddy <hemalatha.pinnamreddy2@amd.com>
>
> [Why]
> Aux engines across multiple GPUs share single static
> dce_aux_funcs. When an engine supporting configurable
> AUX timeout is initialized, it updates the shared table,
> causing unsupported engines, including DCN1, to inherit
> the configure_timeout callback. As a result, these engines
> incorrectly attempt to program the AUX_RX timeout.
>
> [How]
> Embed dce_aux_funcs in each dce_aux instance to maintain a
> separate callback table per engine. Set configure_timeout
> only for engines that support configurable AUX timeout.
>
> Signed-off-by: Hemalatha Pinnamreddy <hemalatha.pinnamreddy2@amd.com>
> ---
> drivers/gpu/drm/amd/display/dc/dce/dce_aux.c | 11 ++++-------
> drivers/gpu/drm/amd/display/dc/dce/dce_aux.h | 18 +++++++++---------
> .../amd/display/dc/link/protocols/link_ddc.c | 8 ++++----
> 3 files changed, 17 insertions(+), 20 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_aux.c b/drivers/gpu/drm/amd/display/dc/dce/dce_aux.c
> index 4abf51c8ab52..10eac67ac784 100644
> --- a/drivers/gpu/drm/amd/display/dc/dce/dce_aux.c
> +++ b/drivers/gpu/drm/amd/display/dc/dce/dce_aux.c
> @@ -602,11 +602,6 @@ static uint32_t dce_aux_configure_timeout(struct ddc_service *ddc,
> return prev_timeout_val;
> }
>
> -static struct dce_aux_funcs aux_functions = {
> - .configure_timeout = NULL,
> - .destroy = NULL,
> -};
> -
> struct dce_aux *dce110_aux_engine_construct(struct aux_engine_dce110 *aux_engine110,
> struct dc_context *ctx,
> uint32_t inst,
> @@ -626,9 +621,11 @@ struct dce_aux *dce110_aux_engine_construct(struct aux_engine_dce110 *aux_engine
>
> aux_engine110->mask = mask;
> aux_engine110->shift = shift;
> - aux_engine110->base.funcs = &aux_functions;
> + aux_engine110->base.funcs.configure_timeout = NULL;
> + aux_engine110->base.funcs.destroy = NULL;
> +
> if (is_ext_aux_timeout_configurable)
> - aux_engine110->base.funcs->configure_timeout = &dce_aux_configure_timeout;
> + aux_engine110->base.funcs.configure_timeout = &dce_aux_configure_timeout;
>
> return &aux_engine110->base;
> }
> diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_aux.h b/drivers/gpu/drm/amd/display/dc/dce/dce_aux.h
> index b2153cb03b51..126768f098c3 100644
> --- a/drivers/gpu/drm/amd/display/dc/dce/dce_aux.h
> +++ b/drivers/gpu/drm/amd/display/dc/dce/dce_aux.h
> @@ -238,6 +238,14 @@ enum { /* This is the timeout as defined in DP 1.2a,
> SW_AUX_TIMEOUT_PERIOD_MULTIPLIER = 6
> };
>
> +struct dce_aux_funcs {
> + uint32_t (*configure_timeout)
> + (struct ddc_service *ddc,
> + uint32_t timeout);
> + void (*destroy)
> + (struct aux_engine **ptr);
> +};
> +
> struct dce_aux {
> uint32_t inst;
> struct ddc *ddc;
> @@ -247,7 +255,7 @@ struct dce_aux {
> uint32_t max_defer_write_retry;
>
> bool acquire_reset;
> - struct dce_aux_funcs *funcs;
> + struct dce_aux_funcs funcs;
> };
>
> struct dce110_aux_registers_mask {
> @@ -318,12 +326,4 @@ int dce_aux_transfer_dmub_raw(struct ddc_service *ddc,
> bool dce_aux_transfer_with_retries(struct ddc_service *ddc,
> struct aux_payload *cmd);
>
> -struct dce_aux_funcs {
> - uint32_t (*configure_timeout)
> - (struct ddc_service *ddc,
> - uint32_t timeout);
> - void (*destroy)
> - (struct aux_engine **ptr);
> -};
> -
> #endif
> diff --git a/drivers/gpu/drm/amd/display/dc/link/protocols/link_ddc.c b/drivers/gpu/drm/amd/display/dc/link/protocols/link_ddc.c
> index db798656c8a8..0a44382ccfa2 100644
> --- a/drivers/gpu/drm/amd/display/dc/link/protocols/link_ddc.c
> +++ b/drivers/gpu/drm/amd/display/dc/link/protocols/link_ddc.c
> @@ -549,13 +549,13 @@ bool try_to_configure_aux_timeout(struct ddc_service *ddc,
> return true;
>
> if (ddc->link->force_to_use_aux) {
> - if (ddc->ctx->dc->res_pool->engines[ddc->link->aux_hw_inst]->funcs->configure_timeout) {
> - ddc->ctx->dc->res_pool->engines[ddc->link->aux_hw_inst]->funcs->configure_timeout(ddc, timeout);
> + if (ddc->ctx->dc->res_pool->engines[ddc->link->aux_hw_inst]->funcs.configure_timeout) {
> + ddc->ctx->dc->res_pool->engines[ddc->link->aux_hw_inst]->funcs.configure_timeout(ddc, timeout);
> result = true;
> }
> } else {
> - if (ddc->ctx->dc->res_pool->engines[ddc_pin->pin_data->en]->funcs->configure_timeout) {
> - ddc->ctx->dc->res_pool->engines[ddc_pin->pin_data->en]->funcs->configure_timeout(ddc, timeout);
> + if (ddc->ctx->dc->res_pool->engines[ddc_pin->pin_data->en]->funcs.configure_timeout) {
> + ddc->ctx->dc->res_pool->engines[ddc_pin->pin_data->en]->funcs.configure_timeout(ddc, timeout);
> result = true;
> }
>
> --
> 2.17.1
>
>
prev parent reply other threads:[~2026-11-23 1:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-11 9:35 [PATCH] drm/amd/display: Fix aux timeout callback across engines Raghavendra Prasad Mallela
2026-11-23 1:46 ` Wayne Lin [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=20261123014614.1181287-1-Wayne.Lin@amd.com \
--to=wayne.lin@amd.com \
--cc=HemaLatha.Pinnamreddy2@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=raghavendraprasad.mallela@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.