* [bug report] drm/amd/display: access hpo dp link encoder only through link resource
@ 2022-01-31 16:23 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2022-01-31 16:23 UTC (permalink / raw)
To: wenjing.liu; +Cc: amd-gfx
Hello Wenjing Liu,
The patch 3d38a5839ea8: "drm/amd/display: access hpo dp link encoder
only through link resource" from Nov 26, 2021, leads to the following
Smatch static checker warning:
drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link_dp.c:2961 dc_link_dp_sync_lt_end()
error: NULL dereference inside function dp_disable_link_phy()
drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link_dp.c
2954 bool dc_link_dp_sync_lt_end(struct dc_link *link, bool link_down)
2955 {
2956 /* If input parameter is set, shut down phy.
2957 * Still shouldn't turn off dp_receiver (DPCD:600h)
2958 */
2959 if (link_down == true) {
2960 struct dc_link_settings link_settings = link->cur_link_settings;
--> 2961 dp_disable_link_phy(link, NULL, link->connector_signal);
^^^^
This NULL will lead to an Oops.
2962 if (dp_get_link_encoding_format(&link_settings) == DP_8b_10b_ENCODING)
2963 dp_set_fec_ready(link, NULL, false);
2964 }
2965
2966 link->sync_lt_in_progress = false;
2967 return true;
2968 }
regards,
dan carpenter
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-01-31 16:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-31 16:23 [bug report] drm/amd/display: access hpo dp link encoder only through link resource 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.