All of lore.kernel.org
 help / color / mirror / Atom feed
* [bug report] drm/amd/display: Disable MALL SS and messages for PSR supported configs
@ 2023-02-06 14:20 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2023-02-06 14:20 UTC (permalink / raw)
  To: Dillon.Varone; +Cc: amd-gfx

Hello Dillon Varone,

This is a semi-automatic email about new static checker warnings.

The patch 0bed85e48af1: "drm/amd/display: Disable MALL SS and
messages for PSR supported configs" from Jan 4, 2023, leads to the
following Smatch complaint:

    drivers/gpu/drm/amd/amdgpu/../display/dc/dcn32/dcn32_hwseq.c:257 dcn32_apply_idle_power_optimizations()
    warn: variable dereferenced before check 'dc->current_state' (see line 249)

drivers/gpu/drm/amd/amdgpu/../display/dc/dcn32/dcn32_hwseq.c
   248	
   249		for (i = 0; i < dc->current_state->stream_count; i++) {
                                ^^^^^^^^^^^^^^^^^^^
Patch adds unchecked dereference

   250			/* MALL SS messaging is not supported with PSR at this time */
   251			if (dc->current_state->streams[i] != NULL &&
   252					dc->current_state->streams[i]->link->psr_settings.psr_version != DC_PSR_VERSION_UNSUPPORTED)
   253				return false;
   254		}
   255	
   256		if (enable) {
   257			if (dc->current_state) {
                        ^^^^^^^^^^^^^^^^^^^^^^^^
Checked too late.

   258	
   259				/* 1. Check no memory request case for CAB.

regards,
dan carpenter

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-02-06 14:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-06 14:20 [bug report] drm/amd/display: Disable MALL SS and messages for PSR supported configs Dan Carpenter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.