Re: [bug report] drm/amd/display: Add MST atomic routines

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

 



Hi Dan,

The bug has been fixed by the patch "drm/amd/display: Fix unsigned variable compared to less than zero" by Gustavo A. R. Silva

Thanks

On 13.11.2019 13:28, Dan Carpenter wrote:
Hello Mikita Lipski,

The patch b4c578f08378: "drm/amd/display: Add MST atomic routines"
from Nov 6, 2019, leads to the following static checker warning:

	drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:4870 dm_encoder_helper_atomic_check()
	warn: unsigned 'dm_new_connector_state->vcpi_slots' is never less than zero.

drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c
   4851          if (!aconnector->port || !aconnector->dc_sink)
   4852                  return 0;
   4853
   4854          mst_port = aconnector->port;
   4855          mst_mgr = &aconnector->mst_port->mst_mgr;
   4856
   4857          if (!crtc_state->connectors_changed && !crtc_state->mode_changed)
   4858                  return 0;
   4859
   4860          if (!state->duplicated) {
   4861                  color_depth = convert_color_depth_from_display_info(connector, conn_state);
   4862                  bpp = convert_dc_color_depth_into_bpc(color_depth) * 3;
   4863                  clock = adjusted_mode->clock;
   4864                  dm_new_connector_state->pbn = drm_dp_calc_pbn_mode(clock, bpp);
   4865          }
   4866          dm_new_connector_state->vcpi_slots = drm_dp_atomic_find_vcpi_slots(state,
   4867                                                                             mst_mgr,
   4868                                                                             mst_port,
   4869                                                                             dm_new_connector_state->pbn);
   4870          if (dm_new_connector_state->vcpi_slots < 0) {
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Impossible condition.

   4871                  DRM_DEBUG_ATOMIC("failed finding vcpi slots: %d\n", (int)dm_new_connector_state->vcpi_slots);
   4872                  return dm_new_connector_state->vcpi_slots;
   4873          }
   4874          return 0;
   4875  }

regards,
dan carpenter


--
Thanks,
Mikita Lipski
Software Engineer, AMD
mikita.lipski@xxxxxxx
_______________________________________________
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