AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
To: Tom Chung <chiahsuan.chung@amd.com>, amd-gfx@lists.freedesktop.org
Cc: stylon.wang@amd.com, Dan Carpenter <error27@gmail.com>,
	Sunpeng.Li@amd.com, Bhawanpreet.Lakha@amd.com,
	qingqing.zhuo@amd.com, Rodrigo.Siqueira@amd.com,
	roman.li@amd.com, solomon.chiu@amd.com,
	Aurabindo Pillai <aurabindo.pillai@amd.com>,
	Dan Carpenter <dan.carpenter@linaro.org>,
	wayne.lin@amd.com, Harry Wentland <harry.wentland@amd.com>,
	agustin.gutierrez@amd.com, pavle.kotarac@amd.com
Subject: Re: [PATCH 01/18] drm/amd/display: improve the message printed when loading DC
Date: Tue, 23 May 2023 15:35:58 +0530	[thread overview]
Message-ID: <a781b35b-a091-00b8-e846-d4ebe7b4a321@oracle.com> (raw)
In-Reply-To: <20230517113723.1757259-2-chiahsuan.chung@amd.com>

Hi,

On 17/05/23 5:07 pm, Tom Chung wrote:
> From: Aurabindo Pillai <aurabindo.pillai@amd.com>
> 
> [Why&How]
> Change how DC version and hardware version is printed when driver is
> loaded.
> 
> - Remove exclamation
> - Add DC version and hardware version to both success and failure cases
> - Add version in between appropriate filler words to make a complete
>    statement.
> 
> Reviewed-by: Harry Wentland <harry.wentland@amd.com>
> Acked-by: Tom Chung <chiahsuan.chung@amd.com>
> Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
> ---
>   drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 5 +++--
>   1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> index 14b296e1d0f6..45b778631430 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -1666,10 +1666,11 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
>   	adev->dm.dc = dc_create(&init_data);
>   
>   	if (adev->dm.dc) {

	// Check for NULL
> -		DRM_INFO("Display Core initialized with v%s! %s\n", DC_VER,
> +		DRM_INFO("Display Core v%s initialized on %s\n", DC_VER,
>   			 dce_version_to_string(adev->dm.dc->ctx->dce_version));
>   	} else {
	// adev->dm.dc is NULL here

> -		DRM_INFO("Display Core failed to initialize with v%s!\n", DC_VER);
> +		DRM_INFO("Display Core v%s failed to initialize on %s\n", DC_VER,
> +			 dce_version_to_string(adev->dm.dc->ctx->dce_version));						       ^^^^NULL deref bug here.

I found this using static analysis with smatch.

drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:1673 
amdgpu_dm_init() error: we previously assumed 'adev->dm.dc' could be 
null (see line 1669)

If you fix this could you please consider adding:

Reported-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>

Thanks,
Harshit
														
					
>   		goto error;
>   	}
>   

  reply	other threads:[~2023-05-23 12:55 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-17 11:37 [PATCH 00/18] DC Patches May 19 2023 Tom Chung
2023-05-17 11:37 ` [PATCH 01/18] drm/amd/display: improve the message printed when loading DC Tom Chung
2023-05-23 10:05   ` Harshit Mogalapalli [this message]
2023-05-17 11:37 ` [PATCH 02/18] drm/amd/display: Fix DMUB debugging print issue Tom Chung
2023-05-17 11:37 ` [PATCH 03/18] drm/amd/display: disable dcn315 pixel rate crb when scaling Tom Chung
2023-05-17 11:37 ` [PATCH 04/18] drm/amd/display: Update SR watermarks for DCN314 Tom Chung
2023-05-17 11:37 ` [PATCH 05/18] drm/amd/display: Fix warning in disabling vblank irq Tom Chung
2023-05-17 11:37 ` [PATCH 06/18] drm/amd/display: lower dp link training message level Tom Chung
2023-05-17 11:37 ` [PATCH 07/18] drm/amd/display: fix dcn315 pixel rate crb scaling check Tom Chung
2023-05-17 11:37 ` [PATCH 08/18] drm/amd/display: Have Payload Properly Created After Resume Tom Chung
2023-05-17 11:37 ` [PATCH 09/18] drm/amd/display: Trigger DIO FIFO resync on commit streams Tom Chung
2023-05-17 11:37 ` [PATCH 10/18] drm/amd/display: Revert vblank change that causes null pointer crash Tom Chung
2023-05-17 11:37 ` [PATCH 11/18] drm/amd/display: Fix possible underflow for displays with large vblank Tom Chung
2023-05-17 11:37 ` [PATCH 12/18] drm/amd/display: Apply 60us prefetch for DCFCLK <= 300Mhz Tom Chung
2023-05-17 11:37 ` [PATCH 13/18] drm/amd/display: Clean FPGA code in dc Tom Chung
2023-05-17 11:37 ` [PATCH 14/18] drm/amd/display: Update correct DCN314 register header Tom Chung
2023-05-17 11:37 ` [PATCH 15/18] drm/amd/display: Trigger DIO FIFO resync on commit streams for DCN32 Tom Chung
2023-05-17 11:37 ` [PATCH 16/18] drm/amd/display: Reorganize DCN30 Makefile Tom Chung
2023-05-17 11:37 ` [PATCH 17/18] drm/amd/display: cache trace buffer size Tom Chung
2023-05-17 11:37 ` [PATCH 18/18] drm/amd/display: 3.2.237 Tom Chung

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=a781b35b-a091-00b8-e846-d4ebe7b4a321@oracle.com \
    --to=harshit.m.mogalapalli@oracle.com \
    --cc=Bhawanpreet.Lakha@amd.com \
    --cc=Rodrigo.Siqueira@amd.com \
    --cc=Sunpeng.Li@amd.com \
    --cc=agustin.gutierrez@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=aurabindo.pillai@amd.com \
    --cc=chiahsuan.chung@amd.com \
    --cc=dan.carpenter@linaro.org \
    --cc=error27@gmail.com \
    --cc=harry.wentland@amd.com \
    --cc=pavle.kotarac@amd.com \
    --cc=qingqing.zhuo@amd.com \
    --cc=roman.li@amd.com \
    --cc=solomon.chiu@amd.com \
    --cc=stylon.wang@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