drm/i915: Add reverse mapping between port and intel_encoder
This patch adds a reverse mapping from a digital port number to
intel_encoder object containing the corresponding intel_digital_port.
It simplifies the query of the encoder a lot.
Note that, even if it's a valid digital port, the dig_port_map[] might
point still to NULL -- usually it implies a DP MST port. Due to this
fact, the NULL check in each place has no WARN_ON() and just skips the
port. Once when the situation changes in future, we might introduce
WARN_ON() for a more strict check.
Signed-off-by:
Takashi Iwai <tiwai@suse.de>
Showing
- drivers/gpu/drm/i915/i915_drv.h 2 additions, 0 deletionsdrivers/gpu/drm/i915/i915_drv.h
- drivers/gpu/drm/i915/intel_audio.c 24 additions, 35 deletionsdrivers/gpu/drm/i915/intel_audio.c
- drivers/gpu/drm/i915/intel_ddi.c 1 addition, 0 deletionsdrivers/gpu/drm/i915/intel_ddi.c
- drivers/gpu/drm/i915/intel_dp.c 1 addition, 0 deletionsdrivers/gpu/drm/i915/intel_dp.c
- drivers/gpu/drm/i915/intel_hdmi.c 2 additions, 0 deletionsdrivers/gpu/drm/i915/intel_hdmi.c
Please register or sign in to comment