All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Viktor Jägersküpper" <viktor_jaegerskuepper@freenet.de>
To: "Timur Kristóf" <timur.kristof@gmail.com>
Cc: "Alex Deucher" <alexander.deucher@amd.com>,
	"Christian König" <christian.koenig@amd.com>,
	"Tvrtko Ursulin" <tursulin@ursulin.net>,
	"Natalie Vock" <nat@pixelcluster.dev>,
	"Harry Wentland" <harry.wentland@amd.com>,
	"Leo Li" <sunpeng.li@amd.com>,
	"Aurabindo Pillai" <aurabindo.pillai@amd.com>,
	"Dan Wheeler" <daniel.wheeler@amd.com>, "Ray Wu" <Ray.Wu@amd.com>,
	"Ivan Lipski" <ivan.lipski@amd.com>,
	"Alex Hung" <alex.hung@amd.com>,
	"Tomasz Siemek" <tomasz.siemek@amd.com>,
	"Wayne Lin" <Wayne.Lin@amd.com>,
	amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/amd/display: Fix crash in hwss_set_output_transfer_func()
Date: Tue, 4 Aug 2026 22:01:01 +0200	[thread overview]
Message-ID: <98b592c8-33d2-4467-b4f4-9d317acfcc3a@freenet.de> (raw)
In-Reply-To: <20260803124121.16912-1-timur.kristof@gmail.com>

On 8/3/26 14:41, Timur Kristóf wrote:
> The pipe_ctx->plane_res.hubp pointer is NULL on all DCE
> hardware, which causes a kernel NULL pointer dereference
> on all Vega and older GPUs.
> 
> Let's add a simple NULL check.
> 
> Fixes: f879f53407f0 ("drm/amd/display: Refactor DPP_SET_OUTPUT_TRANSFER_FUNC to drop pipe_ctx")
> Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
> Cc: Tomasz Siemek <tomasz.siemek@amd.com>

I've tested this patch (applied to amd-staging-drm-next) because I
observed the crash during my tests for
https://gitlab.freedesktop.org/drm/amd/-/work_items/5557 and I confirm
that the patch fixes the crash.

Tested-by: Viktor Jägersküpper <viktor_jaegerskuepper@freenet.de>

> ---
>  drivers/gpu/drm/amd/display/dc/core/dc_hw_sequencer.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_hw_sequencer.c b/drivers/gpu/drm/amd/display/dc/core/dc_hw_sequencer.c
> index 11411fa94665..5495e493b2eb 100644
> --- a/drivers/gpu/drm/amd/display/dc/core/dc_hw_sequencer.c
> +++ b/drivers/gpu/drm/amd/display/dc/core/dc_hw_sequencer.c
> @@ -1900,7 +1900,8 @@ void hwss_set_output_transfer_func(struct dc *dc, struct pipe_ctx *pipe_ctx)
>  				.xfm = pipe_ctx->plane_res.xfm,
>  				.dpp = pipe_ctx->plane_res.dpp,
>  				.mpc = dc->res_pool->mpc,
> -				.mpcc_id = pipe_ctx->plane_res.hubp->inst,
> +				.mpcc_id = pipe_ctx->plane_res.hubp ?
> +						pipe_ctx->plane_res.hubp->inst : 0,
>  				.is_top_pipe = resource_is_pipe_type(pipe_ctx, OPP_HEAD),
>  				.stream = pipe_ctx->stream,
>  			}

  reply	other threads:[~2026-08-05  7:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-03 12:41 [PATCH] drm/amd/display: Fix crash in hwss_set_output_transfer_func() Timur Kristóf
2026-08-04 20:01 ` Viktor Jägersküpper [this message]
2026-08-05 13:53 ` Alex Deucher
  -- strict thread matches above, loose matches on Subject: below --
2026-08-06  9:11 Dieter Nützel

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=98b592c8-33d2-4467-b4f4-9d317acfcc3a@freenet.de \
    --to=viktor_jaegerskuepper@freenet.de \
    --cc=Ray.Wu@amd.com \
    --cc=Wayne.Lin@amd.com \
    --cc=alex.hung@amd.com \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=aurabindo.pillai@amd.com \
    --cc=christian.koenig@amd.com \
    --cc=daniel.wheeler@amd.com \
    --cc=harry.wentland@amd.com \
    --cc=ivan.lipski@amd.com \
    --cc=nat@pixelcluster.dev \
    --cc=sunpeng.li@amd.com \
    --cc=timur.kristof@gmail.com \
    --cc=tomasz.siemek@amd.com \
    --cc=tursulin@ursulin.net \
    /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.