From: Todd Previte <tprevite@gmail.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH 1/5] drm/i915: Move Displayport test request and sink IRQ logic to intel_dp_detect()
Date: Sat, 18 Apr 2015 00:04:15 -0700 [thread overview]
Message-ID: <1429340659-14369-2-git-send-email-tprevite@gmail.com> (raw)
In-Reply-To: <1429340659-14369-1-git-send-email-tprevite@gmail.com>
Due to changes in the driver and to support Displayport compliance testing,
the test request and sink IRQ logic has been relocated from
intel_dp_check_link_status to intel_dp_detect. The reason for this is that
this handler should be called during the normal hot plug path for a long
pulse / hot plug event only. The intel_dp_check_link_status function is
called for short pulses from intel_dp_hpd_pulse().
This allows for the proper detection of Displayport compliance test requests
and the invocation of the test handler to support them. Additionally, this
places compliance testing in the normal operational paths, eliminating as
much special case code as possible.
Signed-off-by: Todd Previte <tprevite@gmail.com>
---
drivers/gpu/drm/i915/intel_dp.c | 29 ++++++++++++++---------------
1 file changed, 14 insertions(+), 15 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 2ef05d7..55d1f5f 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -4123,7 +4123,6 @@ intel_dp_check_link_status(struct intel_dp *intel_dp)
{
struct drm_device *dev = intel_dp_to_dev(intel_dp);
struct intel_encoder *intel_encoder = &dp_to_dig_port(intel_dp)->base;
- u8 sink_irq_vector;
u8 link_status[DP_LINK_STATUS_SIZE];
WARN_ON(!drm_modeset_is_locked(&dev->mode_config.connection_mutex));
@@ -4147,20 +4146,6 @@ intel_dp_check_link_status(struct intel_dp *intel_dp)
return;
}
- /* Try to read the source of the interrupt */
- if (intel_dp->dpcd[DP_DPCD_REV] >= 0x11 &&
- intel_dp_get_sink_irq(intel_dp, &sink_irq_vector)) {
- /* Clear interrupt source */
- drm_dp_dpcd_writeb(&intel_dp->aux,
- DP_DEVICE_SERVICE_IRQ_VECTOR,
- sink_irq_vector);
-
- if (sink_irq_vector & DP_AUTOMATED_TEST_REQUEST)
- intel_dp_handle_test_request(intel_dp);
- if (sink_irq_vector & (DP_CP_IRQ | DP_SINK_SPECIFIC_IRQ))
- DRM_DEBUG_DRIVER("CP or sink specific irq unhandled\n");
- }
-
if (!drm_dp_channel_eq_ok(link_status, intel_dp->lane_count)) {
DRM_DEBUG_KMS("%s: channel EQ not ok, retraining\n",
intel_encoder->base.name);
@@ -4386,6 +4371,7 @@ intel_dp_detect(struct drm_connector *connector, bool force)
enum drm_connector_status status;
enum intel_display_power_domain power_domain;
bool ret;
+ u8 sink_irq_vector;
DRM_DEBUG_KMS("[CONNECTOR:%d:%s]\n",
connector->base.id, connector->name);
@@ -4428,6 +4414,19 @@ intel_dp_detect(struct drm_connector *connector, bool force)
intel_encoder->type = INTEL_OUTPUT_DISPLAYPORT;
status = connector_status_connected;
+ /* Check for sink IRQ and determine cause */
+ if (intel_dp->dpcd[DP_DPCD_REV] >= 0x11 &&
+ intel_dp_get_sink_irq(intel_dp, &sink_irq_vector)) {
+ /* Clear interrupt source */
+ drm_dp_dpcd_writeb(&intel_dp->aux,
+ DP_DEVICE_SERVICE_IRQ_VECTOR,
+ sink_irq_vector);
+ if (sink_irq_vector & DP_AUTOMATED_TEST_REQUEST)
+ intel_dp_handle_test_request(intel_dp);
+ if (sink_irq_vector & (DP_CP_IRQ | DP_SINK_SPECIFIC_IRQ))
+ DRM_DEBUG_DRIVER("CP or sink specific irq unhandled\n");
+ }
+
out:
intel_dp_power_put(intel_dp, power_domain);
return status;
--
1.9.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2015-04-18 7:04 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-18 7:04 [PATCH V7] Displayport compliance testing V7 Todd Previte
2015-04-18 7:04 ` Todd Previte [this message]
2015-04-19 23:09 ` [PATCH] drm/i915: Move Displayport test request and sink IRQ logic to intel_dp_detect() Todd Previte
2015-04-20 2:01 ` shuang.he
2015-04-20 22:27 ` [PATCH 4/8] " Todd Previte
2015-04-30 18:14 ` Paulo Zanoni
2015-04-18 7:04 ` [PATCH 2/5] drm: Add edid_corrupt flag for Displayport Link CTS 4.2.2.6 Todd Previte
2015-04-21 18:09 ` Todd Previte
2015-04-22 20:20 ` Alex Deucher
2015-04-30 18:37 ` Paulo Zanoni
2015-05-08 14:13 ` [PATCH] drm: Fix missing kerneldoc for the edid_corrupt field in struct drm_connector Todd Previte
2015-05-09 1:59 ` shuang.he
2015-05-11 9:43 ` Daniel Vetter
2015-04-18 7:04 ` [PATCH 3/5] drm/i915: Implement the intel_dp_autotest_edid function for DP EDID complaince tests Todd Previte
2015-04-30 18:30 ` Paulo Zanoni
2015-05-04 13:17 ` Daniel Vetter
2015-05-05 13:50 ` Jani Nikula
2015-05-04 14:48 ` [PATCH 06/10] " Todd Previte
2015-05-07 7:35 ` Daniel Vetter
2015-04-18 7:04 ` [PATCH 4/5] drm: Fix for DP CTS test 4.2.2.5 - I2C DEFER handling Todd Previte
2015-04-20 16:30 ` Daniel Vetter
2015-04-18 7:04 ` [PATCH 5/5] drm/i915: Add debugfs test control files for Displayport compliance testing Todd Previte
2015-04-23 21:35 ` shuang.he
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=1429340659-14369-2-git-send-email-tprevite@gmail.com \
--to=tprevite@gmail.com \
--cc=intel-gfx@lists.freedesktop.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox