From 9c229127aee2d7e80858b5d52a9a7049355b621c Mon Sep 17 00:00:00 2001 From: Neil Armstrong Date: Wed, 4 Jul 2018 17:08:17 +0200 Subject: drm/i915: hdmi: add CEC notifier to intel_hdmi MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patchs adds the cec_notifier feature to the intel_hdmi part of the i915 DRM driver. It uses the HDMI DRM connector name to differentiate between each HDMI ports. The changes will allow the i915 HDMI code to notify EDID and HPD changes to an eventual CEC adapter. Signed-off-by: Neil Armstrong Reviewed-by: Hans Verkuil Reviewed-by: Ville Syrjälä Acked-by: Rodrigo Vivi Signed-off-by: Lee Jones --- drivers/gpu/drm/i915/intel_display.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'drivers/gpu/drm/i915/intel_display.h') diff --git a/drivers/gpu/drm/i915/intel_display.h b/drivers/gpu/drm/i915/intel_display.h index 2ef31617614a..1f176a71e081 100644 --- a/drivers/gpu/drm/i915/intel_display.h +++ b/drivers/gpu/drm/i915/intel_display.h @@ -126,6 +126,30 @@ enum port { #define port_name(p) ((p) + 'A') +/* + * Ports identifier referenced from other drivers. + * Expected to remain stable over time + */ +static inline const char *port_identifier(enum port port) +{ + switch (port) { + case PORT_A: + return "Port A"; + case PORT_B: + return "Port B"; + case PORT_C: + return "Port C"; + case PORT_D: + return "Port D"; + case PORT_E: + return "Port E"; + case PORT_F: + return "Port F"; + default: + return ""; + } +} + enum dpio_channel { DPIO_CH0, DPIO_CH1 -- cgit