drm/i915/sdvo: Rework DDC bus handling
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 25 Aug 2023 13:44:30 +0000 (16:44 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 29 Aug 2023 08:39:38 +0000 (11:39 +0300)
commitc0ff6c6e4c2486734d417a61355e1da5d8773039
treeea5f8c6ba56b07f27008e3c71c56c80646b43474
parent5bb306b1d1412c9a42dd4f6534b0033eb36f2bda
drm/i915/sdvo: Rework DDC bus handling

Each SDVO device can have up to three sets of DDC pins.
Currently we just register a single i2c_adapter for the
entire SDVO device and semi-randomly pick the "correct"
set of DDC pins during intel_sdvo_tmds_sink_detect().
This doesn't make any real sense especially if we have
multiple outputs each with their own dedicated DDC bus.

Let's clean up this mess and register a dedicated
i2c_adapter for each of the possible pin pairs. Each
output (ie. connector) can then pick the correct i2c_adapter
to use for its DDC bus. And we can just switch over to
drm_connector_init_with_ddc() to take care of the
connector->ddc association, which also populates the
"ddc" sysfs symlink as a bonus.

And now that things are based on the actual connector we can
also nuke the sketchy sdvo->controller_output thing.

Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230825134431.24391-6-ville.syrjala@linux.intel.com
drivers/gpu/drm/i915/display/intel_sdvo.c