All of lore.kernel.org
 help / color / mirror / Atom feed
* [bug report] drm/amd/display: Enable DCN6 sources compilation
@ 2026-09-14 10:30 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2026-09-14 10:30 UTC (permalink / raw)
  To: Aurabindo Pillai; +Cc: amd-gfx, SHANMUGAM, SRINIVASAN

Hello Aurabindo Pillai,

Commit 992694ad2858 ("drm/amd/display: Enable DCN6 sources
compilation") from Jul 21, 2026, leads to the following Smatch
complaint:

    drivers/gpu/drm/amd/amdgpu/../display/dc/hwss/dce110/dce110_hwseq.c:3500 dce110_enable_tmds_link_output()
    warn: variable dereferenced before check 'link->link_enc' (see line 3490)

drivers/gpu/drm/amd/amdgpu/../display/dc/hwss/dce110/dce110_hwseq.c
  3489		(void)link_res;
  3490		link->link_enc->funcs->enable_tmds_output(
                ^^^^^^^^^^^^^^^^
The exiting code dereferences link->link_enc

  3491				link->link_enc,
  3492				clock_source,
  3493				color_depth,
  3494				signal,
  3495				pixel_clock);
  3496		link->phy_state.symclk_state = SYMCLK_ON_TX_ON;
  3497	
  3498		// For dongle Type 2 with no I2C support on board, setup sw mode of Ri/Pj check with proper aux instance
  3499		if (link->force_to_use_aux) {
  3500			if (link->link_enc && link->link_enc->funcs->setup_ri_pj_check_in_sw_or_hw_mode)
                            ^^^^^^^^^^^^^^

  3501				link->link_enc->funcs->setup_ri_pj_check_in_sw_or_hw_mode(link->link_enc,
  3502					link->aux_hw_inst, true);
  3503          } else
  3504                  // For HDMI setup hw mode of Ri/Pj check with proper ddc pin instance
  3505                  if (link->link_enc && link->link_enc->funcs->setup_ri_pj_check_in_sw_or_hw_mode)
                            ^^^^^^^^^^^^^^
So these checks don't make sense.

  3506                          link->link_enc->funcs->setup_ri_pj_check_in_sw_or_hw_mode(link->link_enc,
  3507                                  link->ddc_hw_inst, false);
  3508  }


This email is a free service from the Smatch-CI project [smatch.sf.net].

regards,
dan carpenter

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

only message in thread, other threads:[~2026-09-14 12:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-14 10:30 [bug report] drm/amd/display: Enable DCN6 sources compilation 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.