From: Paulo Zanoni <przanoni@gmail.com>
To: intel-gfx@lists.freedesktop.org
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Subject: [PATCH 6/9] drm/i915: reset intel_encoder->type when DP or HDMI is detected
Date: Fri, 26 Oct 2012 19:05:49 -0200 [thread overview]
Message-ID: <1351285552-4156-7-git-send-email-przanoni@gmail.com> (raw)
In-Reply-To: <1351285552-4156-1-git-send-email-przanoni@gmail.com>
From: Paulo Zanoni <paulo.r.zanoni@intel.com>
When intel_hdmi_detect detects a monitor, set intel_encoder->type with
INTEL_OUTPUT_HDMI. Same for DP.
This should not break the current code because these variables never
change. This will be used after we create the DDI encoder because it
will have both DP and HDMI connectors.
We won't support eDP+HDMI on the same port, so if an encoder is eDP we
should expect it to always remain eDP and never change.
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
---
drivers/gpu/drm/i915/intel_dp.c | 4 ++++
drivers/gpu/drm/i915/intel_hdmi.c | 4 ++++
2 files changed, 8 insertions(+)
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index fcc15a2..5476c4a 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -2292,6 +2292,8 @@ static enum drm_connector_status
intel_dp_detect(struct drm_connector *connector, bool force)
{
struct intel_dp *intel_dp = intel_attached_dp(connector);
+ struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
+ struct intel_encoder *intel_encoder = &intel_dig_port->base;
struct drm_device *dev = connector->dev;
enum drm_connector_status status;
struct edid *edid = NULL;
@@ -2323,6 +2325,8 @@ intel_dp_detect(struct drm_connector *connector, bool force)
}
}
+ if (intel_encoder->type != INTEL_OUTPUT_EDP)
+ intel_encoder->type = INTEL_OUTPUT_DISPLAYPORT;
return connector_status_connected;
}
diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
index be949f1..c0aadc1 100644
--- a/drivers/gpu/drm/i915/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/intel_hdmi.c
@@ -792,6 +792,9 @@ static enum drm_connector_status
intel_hdmi_detect(struct drm_connector *connector, bool force)
{
struct intel_hdmi *intel_hdmi = intel_attached_hdmi(connector);
+ struct intel_digital_port *intel_dig_port =
+ hdmi_to_dig_port(intel_hdmi);
+ struct intel_encoder *intel_encoder = &intel_dig_port->base;
struct drm_i915_private *dev_priv = connector->dev->dev_private;
struct edid *edid;
enum drm_connector_status status = connector_status_disconnected;
@@ -820,6 +823,7 @@ intel_hdmi_detect(struct drm_connector *connector, bool force)
if (intel_hdmi->force_audio != HDMI_AUDIO_AUTO)
intel_hdmi->has_audio =
(intel_hdmi->force_audio == HDMI_AUDIO_ON);
+ intel_encoder->type = INTEL_OUTPUT_HDMI;
}
return status;
--
1.7.11.4
next prev parent reply other threads:[~2012-10-26 21:06 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-26 21:05 [PATCH 0/9] Haswell DDI encoder (DP + HDMI on the same port) Paulo Zanoni
2012-10-26 21:05 ` [PATCH 1/9] drm/i915: simplify assignments inside intel_dp.c Paulo Zanoni
2012-10-30 11:32 ` Lespiau, Damien
2012-10-26 21:05 ` [PATCH 2/9] drm/i915: add intel_dp_to_dev and intel_hdmi_to_dev Paulo Zanoni
2012-10-30 11:37 ` Lespiau, Damien
2012-10-26 21:05 ` [PATCH 3/9] drm/i915: create intel_digital_port and use it Paulo Zanoni
2012-10-30 11:44 ` Lespiau, Damien
2012-10-26 21:05 ` [PATCH 4/9] drm/i915: split intel_hdmi_init into encoder and connector pieces Paulo Zanoni
2012-10-30 11:57 ` Lespiau, Damien
2012-10-26 21:05 ` [PATCH 5/9] drm/i915: split intel_dp_init " Paulo Zanoni
2012-10-30 12:07 ` Lespiau, Damien
2012-10-26 21:05 ` Paulo Zanoni [this message]
2012-10-30 12:13 ` [PATCH 6/9] drm/i915: reset intel_encoder->type when DP or HDMI is detected Damien Lespiau
2012-10-26 21:05 ` [PATCH 7/9] drm/i915: add port field to intel_digital_port Paulo Zanoni
2012-10-30 12:17 ` Damien Lespiau
2012-10-26 21:05 ` [PATCH 8/9] drm/i915: add intel_ddi_connector_get_hw_state Paulo Zanoni
2012-10-30 12:33 ` Damien Lespiau
2012-10-26 21:05 ` [PATCH 9/9] drm/i915: create the DDI encoder Paulo Zanoni
2012-10-30 12:51 ` Damien Lespiau
2012-10-30 21:36 ` Daniel Vetter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1351285552-4156-7-git-send-email-przanoni@gmail.com \
--to=przanoni@gmail.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=paulo.r.zanoni@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.