提交 0bdee30e 编写于 作者: P Paulo Zanoni 提交者: Daniel Vetter

drm/i915: add DP support to intel_ddi_get_encoder_port

Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: NDamien Lespiau <damien.lespiau@intel.com>
Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
上级 750eb99e
......@@ -60,14 +60,20 @@ static const u32 hsw_ddi_translations_fdi[] = {
static enum port intel_ddi_get_encoder_port(struct intel_encoder *intel_encoder)
{
struct drm_encoder *encoder = &intel_encoder->base;
int type = intel_encoder->type;
if (type == INTEL_OUTPUT_HDMI) {
struct intel_hdmi *intel_hdmi =
enc_to_intel_hdmi(&intel_encoder->base);
if (type == INTEL_OUTPUT_DISPLAYPORT || type == INTEL_OUTPUT_EDP) {
struct intel_dp *intel_dp = enc_to_intel_dp(encoder);
return intel_dp->port;
} else if (type == INTEL_OUTPUT_HDMI) {
struct intel_hdmi *intel_hdmi = enc_to_intel_hdmi(encoder);
return intel_hdmi->ddi_port;
} else if (type == INTEL_OUTPUT_ANALOG) {
return PORT_E;
} else {
DRM_ERROR("Invalid DDI encoder type %d\n", type);
BUG();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册