* [PATCH] drm/amd/display: remove useless check in should_enable_fbc()
@ 2023-08-30 14:01 Dembskiy Igor
2023-08-31 18:48 ` Harry Wentland
0 siblings, 1 reply; 3+ messages in thread
From: Dembskiy Igor @ 2023-08-30 14:01 UTC (permalink / raw)
To: Alex Deucher
Cc: Dembskiy Igor, Harry Wentland, Leo Li, amd-gfx, dri-devel,
linux-kernel, hersen wu, Alexey Khoroshilov, lvc-project
It does not make sense to compare a pointer to array element with NULL.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Fixes: 65d38262b3e8 ("drm/amd/display: fbc state could not reach while enable fbc")
Signed-off-by: Dembskiy Igor <dii@itb.spb.ru>
---
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c b/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c
index 6966420dfbac..e87cf54ec658 100644
--- a/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c
+++ b/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c
@@ -1992,9 +1992,6 @@ static bool should_enable_fbc(struct dc *dc,
pipe_ctx = &res_ctx->pipe_ctx[i];
- if (!pipe_ctx)
- continue;
-
/* fbc not applicable on underlay pipe */
if (pipe_ctx->pipe_idx != underlay_idx) {
*pipe_idx = i;
--
2.34.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/amd/display: remove useless check in should_enable_fbc()
2023-08-30 14:01 [PATCH] drm/amd/display: remove useless check in should_enable_fbc() Dembskiy Igor
@ 2023-08-31 18:48 ` Harry Wentland
2023-08-31 19:36 ` Alex Deucher
0 siblings, 1 reply; 3+ messages in thread
From: Harry Wentland @ 2023-08-31 18:48 UTC (permalink / raw)
To: Dembskiy Igor, Alex Deucher
Cc: Leo Li, amd-gfx, dri-devel, linux-kernel, hersen wu,
Alexey Khoroshilov, lvc-project
On 2023-08-30 10:01, Dembskiy Igor wrote:
> It does not make sense to compare a pointer to array element with NULL.
>
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
>
> Fixes: 65d38262b3e8 ("drm/amd/display: fbc state could not reach while enable fbc")
> Signed-off-by: Dembskiy Igor <dii@itb.spb.ru>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Harry
> ---
> drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c b/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c
> index 6966420dfbac..e87cf54ec658 100644
> --- a/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c
> +++ b/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c
> @@ -1992,9 +1992,6 @@ static bool should_enable_fbc(struct dc *dc,
>
> pipe_ctx = &res_ctx->pipe_ctx[i];
>
> - if (!pipe_ctx)
> - continue;
> -
> /* fbc not applicable on underlay pipe */
> if (pipe_ctx->pipe_idx != underlay_idx) {
> *pipe_idx = i;
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/amd/display: remove useless check in should_enable_fbc()
2023-08-31 18:48 ` Harry Wentland
@ 2023-08-31 19:36 ` Alex Deucher
0 siblings, 0 replies; 3+ messages in thread
From: Alex Deucher @ 2023-08-31 19:36 UTC (permalink / raw)
To: Harry Wentland
Cc: Dembskiy Igor, Alex Deucher, lvc-project, Leo Li, linux-kernel,
dri-devel, hersen wu, amd-gfx, Alexey Khoroshilov
Applied. Thanks!
Alex
On Thu, Aug 31, 2023 at 2:48 PM Harry Wentland <harry.wentland@amd.com> wrote:
>
> On 2023-08-30 10:01, Dembskiy Igor wrote:
> > It does not make sense to compare a pointer to array element with NULL.
> >
> > Found by Linux Verification Center (linuxtesting.org) with SVACE.
> >
> > Fixes: 65d38262b3e8 ("drm/amd/display: fbc state could not reach while enable fbc")
> > Signed-off-by: Dembskiy Igor <dii@itb.spb.ru>
>
> Reviewed-by: Harry Wentland <harry.wentland@amd.com>
>
> Harry
>
> > ---
> > drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 3 ---
> > 1 file changed, 3 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c b/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c
> > index 6966420dfbac..e87cf54ec658 100644
> > --- a/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c
> > +++ b/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c
> > @@ -1992,9 +1992,6 @@ static bool should_enable_fbc(struct dc *dc,
> >
> > pipe_ctx = &res_ctx->pipe_ctx[i];
> >
> > - if (!pipe_ctx)
> > - continue;
> > -
> > /* fbc not applicable on underlay pipe */
> > if (pipe_ctx->pipe_idx != underlay_idx) {
> > *pipe_idx = i;
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-08-31 19:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-30 14:01 [PATCH] drm/amd/display: remove useless check in should_enable_fbc() Dembskiy Igor
2023-08-31 18:48 ` Harry Wentland
2023-08-31 19:36 ` Alex Deucher
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®