From: Mikita Lipski <mlipski@amd.com>
To: Aditya Pakki <pakki001@umn.edu>
Cc: "David (ChunMing) Zhou" <David1.Zhou@amd.com>,
"Mario Kleiner" <mario.kleiner.de@gmail.com>,
"Leo Li" <sunpeng.li@amd.com>,
"Bhawanpreet Lakha" <Bhawanpreet.Lakha@amd.com>,
"David Francis" <David.Francis@amd.com>,
kjlu@umn.edu, linux-kernel@vger.kernel.org,
amd-gfx@lists.freedesktop.org,
"Nicholas Kazlauskas" <nicholas.kazlauskas@amd.com>,
"David Airlie" <airlied@linux.ie>,
dri-devel@lists.freedesktop.org,
"Daniel Vetter" <daniel@ffwll.ch>,
"Alex Deucher" <alexander.deucher@amd.com>,
"Harry Wentland" <harry.wentland@amd.com>,
"Christian König" <christian.koenig@amd.com>
Subject: Re: [PATCH] drm/amd/display: replace BUG_ON with WARN_ON
Date: Thu, 19 Dec 2019 11:29:19 -0500 [thread overview]
Message-ID: <d963ed6f-4ced-cc9d-6612-8720ed9d2c41@amd.com> (raw)
In-Reply-To: <20191218161505.13416-1-pakki001@umn.edu>
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@umn.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@amd.com
next prev parent reply other threads:[~2019-12-19 16:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-18 16:15 Aditya Pakki
2019-12-19 16:29 ` Mikita Lipski [this message]
2019-12-19 17:06 ` Aditya Pakki
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=d963ed6f-4ced-cc9d-6612-8720ed9d2c41@amd.com \
--to=mlipski@amd.com \
--cc=Bhawanpreet.Lakha@amd.com \
--cc=David.Francis@amd.com \
--cc=David1.Zhou@amd.com \
--cc=airlied@linux.ie \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=christian.koenig@amd.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=harry.wentland@amd.com \
--cc=kjlu@umn.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=mario.kleiner.de@gmail.com \
--cc=nicholas.kazlauskas@amd.com \
--cc=pakki001@umn.edu \
--cc=sunpeng.li@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®