Re: [bug report] drm/amd/display: Do full modeset when DSC debugfs is changed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[AMD Official Use Only - Internal Distribution Only]


Hi Dan,

Thanks for catching this!
I've removed the extra NULL check as it's not needed.

Cheers,
Eryk Brol

From: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
Sent: Friday, December 4, 2020 10:18 AM
To: Brol, Eryk <Eryk.Brol@xxxxxxx>
Cc: amd-gfx@xxxxxxxxxxxxxxxxxxxxx <amd-gfx@xxxxxxxxxxxxxxxxxxxxx>
Subject: [bug report] drm/amd/display: Do full modeset when DSC debugfs is changed
 
Hello Eryk Brol,

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

The patch 115a385c08d8: "drm/amd/display: Do full modeset when DSC
debugfs is changed" from Nov 19, 2020, leads to the following Smatch
complaint:

    drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:9335 amdgpu_dm_atomic_check()
    warn: variable dereferenced before check 'new_crtc_state' (see line 9318)

drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c
  9317 
  9318                  if (!drm_atomic_crtc_needs_modeset(new_crtc_state) &&
  9319                      !new_crtc_state->color_mgmt_changed &&
  9320                      old_crtc_state->vrr_enabled == new_crtc_state->vrr_enabled &&
  9321                          dm_old_crtc_state->dsc_force_changed == false)
  9322                          continue;
  9323 
  9324                  if (!new_crtc_state->enable)
                             ^^^^^^^^^^^^^^^^^^^^^^
This is already dereferenced

  9325                          continue;
  9326 
  9327                  ret = drm_atomic_add_affected_connectors(state, crtc);
  9328                  if (ret)
  9329                          return ret;
  9330 
  9331                  ret = drm_atomic_add_affected_planes(state, crtc);
  9332                  if (ret)
  9333                          goto fail;
  9334 
  9335                  if (dm_old_crtc_state->dsc_force_changed && new_crtc_state)
                                                                    ^^^^^^^^^^^^^^
So hopefully this NULL check can be removed?

  9336                          new_crtc_state->mode_changed = true;
  9337          }

regards,
dan carpenter
_______________________________________________
amd-gfx mailing list
amd-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux