drm/i915/dsi: clean up MIPI DSI pipe vs. port usage
MIPI DSI works on ports A and C, which map to pipes A and B, respectively. Things are going to get more complicated with the introduction of dual link DSI support, so clean up the register defines and code to match reality. Signed-off-by: Jani Nikula <jani.nikula@intel.com> Reviewed-by: Gaurav K Singh <gaurav.k.singh@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:

committed by
Daniel Vetter

parent
1362b77640
commit
e7d7cad08d
@@ -127,6 +127,22 @@ struct intel_dsi {
|
||||
u16 panel_pwr_cycle_delay;
|
||||
};
|
||||
|
||||
/* XXX: Transitional before dual port configuration */
|
||||
static inline enum port intel_dsi_pipe_to_port(enum pipe pipe)
|
||||
{
|
||||
if (pipe == PIPE_A)
|
||||
return PORT_A;
|
||||
else if (pipe == PIPE_B)
|
||||
return PORT_C;
|
||||
|
||||
WARN(1, "DSI on pipe %c, assuming port C\n", pipe_name(pipe));
|
||||
return PORT_C;
|
||||
}
|
||||
|
||||
#define for_each_dsi_port(__port, __ports_mask) \
|
||||
for ((__port) = PORT_A; (__port) < I915_MAX_PORTS; (__port)++) \
|
||||
if ((__ports_mask) & (1 << (__port)))
|
||||
|
||||
static inline struct intel_dsi *enc_to_intel_dsi(struct drm_encoder *encoder)
|
||||
{
|
||||
return container_of(encoder, struct intel_dsi, base.base);
|
||||
|
Reference in New Issue
Block a user