[PATCH 0/2] drm/tegra: Fix device/module refs for DP

Lyude Paul lyude at redhat.com
Fri Apr 23 18:21:44 UTC 2021


This patch series fixes a regression that was introduced by one of the
changes I made to when Tegra registers its AUX adapters, along with
fixing some reference leaks that I found along the way.

			       !!!NOTE!!!

There's one thing I'm not entirely sure about, which is the use of
module references (e.g. try_module_get()) here. If I'm understanding how
this code worked previously: since the get_device call in tegra_sor_probe()
was previously the i2c adapter for the AUX channel - which itself is
initialized in drm_dp_aux_register() - then I -think- that the module
owner for the DDC adapter would likely have been drm_kms_helper. With
these changes, if I'm understanding things correctly we're now just
grabbing a module reference for ourselves - something which might not be
the best idea?

If anyone could confirm if I need to fix this or not that'd be
appreciated, along with reviews of course :P

Lyude Paul (2):
  drm/tegra: Get ref for DP AUX channel, not its ddc adapter
  drm/tegra: Fix DP AUX channel reference leaks

 drivers/gpu/drm/tegra/sor.c | 25 ++++++++++++++++++-------
 1 file changed, 18 insertions(+), 7 deletions(-)

-- 
2.30.2



More information about the dri-devel mailing list