summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/intel_drv.h
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2015-07-08 23:45:53 +0300
committerDaniel Vetter <daniel.vetter@ffwll.ch>2015-08-26 10:23:15 +0200
commit65d64cc5bb7aee1f5a8d6717f4d421623c58ea30 (patch)
tree7924b04ea3073f35b6fc3809b37dd89a49372df9 /drivers/gpu/drm/i915/intel_drv.h
parentc0b4c660311c73c8ee4ed0e58b65ae9b4b75276d (diff)
drm/i915: Add vlv_dport_to_phy()
Add vlv_dport_to_phy() and fix up the return values of vlv_dport_to_channel() and vlv_pipe_to_channel() to use the appropriate enums. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Deepak S <deepak.s@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_drv.h')
-rw-r--r--drivers/gpu/drm/i915/intel_drv.h18
1 files changed, 16 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index 525e45736e1c..49d1b61336a1 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -788,7 +788,7 @@ struct intel_dp_mst_encoder {
void *port; /* store this opaque as its illegal to dereference it */
};
-static inline int
+static inline enum dpio_channel
vlv_dport_to_channel(struct intel_digital_port *dport)
{
switch (dport->port) {
@@ -802,7 +802,21 @@ vlv_dport_to_channel(struct intel_digital_port *dport)
}
}
-static inline int
+static inline enum dpio_phy
+vlv_dport_to_phy(struct intel_digital_port *dport)
+{
+ switch (dport->port) {
+ case PORT_B:
+ case PORT_C:
+ return DPIO_PHY0;
+ case PORT_D:
+ return DPIO_PHY1;
+ default:
+ BUG();
+ }
+}
+
+static inline enum dpio_channel
vlv_pipe_to_channel(enum pipe pipe)
{
switch (pipe) {