mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Aurabindo Pillai <aurabindo.pillai@amd.com>
To: Ma Ke <make24@iscas.ac.cn>,
	harry.wentland@amd.com, sunpeng.li@amd.com,
	Rodrigo.Siqueira@amd.com, alexander.deucher@amd.com,
	christian.koenig@amd.com, Xinhui.Pan@amd.com, airlied@gmail.com,
	daniel@ffwll.ch, jun.lei@amd.com, wayne.lin@amd.com,
	dillon.varone@amd.com, nicholas.kazlauskas@amd.com,
	Qingqing.Zhuo@amd.com, stylon.wang@amd.com
Cc: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/amd/display: Add null check before access structs
Date: Wed, 26 Jun 2024 13:57:07 -0400	[thread overview]
Message-ID: <d62e10cd-6e27-4498-b90f-3ec891686070@amd.com> (raw)
In-Reply-To: <20240626130650.2866706-1-make24@iscas.ac.cn>

Thanks for the fix, I'll apply this.

On 6/26/24 9:06 AM, Ma Ke wrote:
> In enable_phantom_plane, we should better check null pointer before
> accessing various structs.
> 
> Fixes: 09a4ec5da92c ("drm/amd/display: Refactor dc_state interface")
> Signed-off-by: Ma Ke <make24@iscas.ac.cn>
> ---
>   drivers/gpu/drm/amd/display/dc/dml2/dml2_mall_phantom.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpu/drm/amd/display/dc/dml2/dml2_mall_phantom.c b/drivers/gpu/drm/amd/display/dc/dml2/dml2_mall_phantom.c
> index 282d70e2b18a..3d29169dd6bb 100644
> --- a/drivers/gpu/drm/amd/display/dc/dml2/dml2_mall_phantom.c
> +++ b/drivers/gpu/drm/amd/display/dc/dml2/dml2_mall_phantom.c
> @@ -750,6 +750,8 @@ static void enable_phantom_plane(struct dml2_context *ctx,
>   					ctx->config.svp_pstate.callbacks.dc,
>   					state,
>   					curr_pipe->plane_state);
> +			if (!phantom_plane)
> +				return;
>   		}
>   
>   		memcpy(&phantom_plane->address, &curr_pipe->plane_state->address, sizeof(phantom_plane->address));

-- 
--

Thanks & Regards,
Aurabindo Pillai

  parent reply	other threads:[~2024-06-26 17:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-26 13:06 Ma Ke
2024-06-26 16:25 ` Markus Elfring
2024-06-26 17:57 ` Aurabindo Pillai [this message]
2024-06-26 19:00   ` Markus Elfring

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=d62e10cd-6e27-4498-b90f-3ec891686070@amd.com \
    --to=aurabindo.pillai@amd.com \
    --cc=Qingqing.Zhuo@amd.com \
    --cc=Rodrigo.Siqueira@amd.com \
    --cc=Xinhui.Pan@amd.com \
    --cc=airlied@gmail.com \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=christian.koenig@amd.com \
    --cc=daniel@ffwll.ch \
    --cc=dillon.varone@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=harry.wentland@amd.com \
    --cc=jun.lei@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=make24@iscas.ac.cn \
    --cc=nicholas.kazlauskas@amd.com \
    --cc=stylon.wang@amd.com \
    --cc=sunpeng.li@amd.com \
    --cc=wayne.lin@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®