> -----Original Message----- > From: Deak, Imre <[email protected]> > Sent: Friday, 5 June 2026 15.42 > To: Kahola, Mika <[email protected]> > Cc: [email protected]; [email protected]; Nikula, > Jani <[email protected]> > Subject: Re: [PATCH v2 01/22] drm/i915/dp_link_training: Introduce link > training state struct > > On Fri, Jun 05, 2026 at 12:50:14PM +0300, Kahola, Mika wrote: > > [...] > > > diff --git a/drivers/gpu/drm/i915/display/intel_dp.c > > > b/drivers/gpu/drm/i915/display/intel_dp.c > > > index 0ce0c09835f6d..7a9157849159b 100644 > > > --- a/drivers/gpu/drm/i915/display/intel_dp.c > > > +++ b/drivers/gpu/drm/i915/display/intel_dp.c > > > @@ -7642,3 +7642,17 @@ u8 intel_dp_as_sdp_transmission_time(void) > > > > > > return DP_PR_AS_SDP_SETUP_TIME_T1; } > > > + > > > +int intel_dp_link_init(struct intel_dp *intel_dp) { > > > + intel_dp->link.training = intel_dp_link_training_init(intel_dp); > > > + if (!intel_dp->link.training) > > > + return -ENOMEM; > > > + > > > + return 0; > > > +} > > > + > > > +void intel_dp_link_cleanup(struct intel_dp *intel_dp) { > > > + intel_dp_link_training_cleanup(intel_dp->link.training); > > > > Should we clear the pointer as well like setting > > Intel_dp->link.training = NULL? > > The above is called either during driver loading in case of an init failure > or driver unloading. In both cases intel_dp/dig_port will be just freed > afterwards and so nothing within it can be accessed. So I don't link.training > needs to be set to NULL here.
Ok, in that case this is Reviewed-by: Mika Kahola <[email protected]> > > > > +}
