[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d963ed6f-4ced-cc9d-6612-8720ed9d2c41@amd.com>
Date: Thu, 19 Dec 2019 11:29:19 -0500
From: Mikita Lipski <mlipski@....com>
To: Aditya Pakki <pakki001@....edu>
Cc: "David (ChunMing) Zhou" <David1.Zhou@....com>,
Mario Kleiner <mario.kleiner.de@...il.com>,
Leo Li <sunpeng.li@....com>,
Bhawanpreet Lakha <Bhawanpreet.Lakha@....com>,
David Francis <David.Francis@....com>, kjlu@....edu,
linux-kernel@...r.kernel.org, amd-gfx@...ts.freedesktop.org,
Nicholas Kazlauskas <nicholas.kazlauskas@....com>,
David Airlie <airlied@...ux.ie>,
dri-devel@...ts.freedesktop.org, Daniel Vetter <daniel@...ll.ch>,
Alex Deucher <alexander.deucher@....com>,
Harry Wentland <harry.wentland@....com>,
Christian König <christian.koenig@....com>
Subject: Re: [PATCH] drm/amd/display: replace BUG_ON with WARN_ON
On 12/18/19 11:15 AM, Aditya Pakki wrote:
> In skip_modeset label within dm_update_crtc_state(), the dc stream
> cannot be NULL. Using BUG_ON as an assertion is not required and
> can be removed. The patch replaces the check with a WARN_ON in case
> dm_new_crtc_state->stream is NULL.
>
> Signed-off-by: Aditya Pakki <pakki001@....edu>
> ---
> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> 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 7aac9568d3be..03cb30913c20 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -7012,7 +7012,7 @@ static int dm_update_crtc_state(struct amdgpu_display_manager *dm,
> * 3. Is currently active and enabled.
> * => The dc stream state currently exists.
> */
> - BUG_ON(dm_new_crtc_state->stream == NULL);
> + WARN_ON(!dm_new_crtc_state->stream);
>
Thanks for the patch, but this is NAK from me since it doesn't really do
anything to prevent it or fix it.
If the stream is NULL and it passed this far in the function then
something really wrong has happened and the process should be stopped.
I'm currently dealing with an issue where dm_new_crtc_state->stream is
NULL. One of the scenarios could be that driver creates stream for a
fake sink instead of failing, that is connected over MST, and calls
dm_update_crtc_state to enable CRTC.
> /* Scaling or underscan settings */
> if (is_scaling_state_different(dm_old_conn_state, dm_new_conn_state))
>
--
Thanks,
Mikita Lipski
Software Engineer, AMD
mikita.lipski@....com
Powered by blists - more mailing lists