From: Daniel Vetter <daniel.vetter@ffwll.ch>
To: Intel Graphics Development <intel-gfx@lists.freedesktop.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Subject: [PATCH 4/4] drm/i915: Enable DP port CRC for the "auto" source on g4x/vlv
Date: Fri, 1 Nov 2013 10:50:23 +0100 [thread overview]
Message-ID: <1383299423-4950-4-git-send-email-daniel.vetter@ffwll.ch> (raw)
In-Reply-To: <1383299423-4950-1-git-send-email-daniel.vetter@ffwll.ch>
Now that DP port CRCs are stable, we can use it for generic CRC tests.
Yay, the auto CRC source should now work everywhere!
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
drivers/gpu/drm/i915/i915_debugfs.c | 19 +++++++++++++++++--
1 file changed, 17 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 5942362..7325de9 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -1990,6 +1990,7 @@ static int i9xx_pipe_crc_auto_source(struct drm_device *dev, enum pipe pipe,
{
struct intel_encoder *encoder;
struct intel_crtc *crtc;
+ struct intel_digital_port *dig_port;
int ret = 0;
*source = INTEL_PIPE_CRC_SOURCE_PIPE;
@@ -2011,8 +2012,22 @@ static int i9xx_pipe_crc_auto_source(struct drm_device *dev, enum pipe pipe,
break;
case INTEL_OUTPUT_DISPLAYPORT:
case INTEL_OUTPUT_EDP:
- /* We can't get stable CRCs for DP ports somehow. */
- ret = -ENODEV;
+ dig_port = enc_to_dig_port(&encoder->base);
+ switch (dig_port->port) {
+ case PORT_B:
+ *source = INTEL_PIPE_CRC_SOURCE_DP_B;
+ break;
+ case PORT_C:
+ *source = INTEL_PIPE_CRC_SOURCE_DP_C;
+ break;
+ case PORT_D:
+ *source = INTEL_PIPE_CRC_SOURCE_DP_D;
+ break;
+ default:
+ WARN(1, "nonexisting DP port %c\n",
+ port_name(dig_port->port));
+ break;
+ }
break;
}
}
--
1.8.4.rc3
next prev parent reply other threads:[~2013-11-01 9:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-31 16:28 [PATCH] drm/i916: add "auto" pipe CRC source Daniel Vetter
2013-10-31 22:33 ` Daniel Vetter
2013-11-01 9:50 ` [PATCH 1/4] " Daniel Vetter
2013-11-01 9:50 ` [PATCH 2/4] drm/i915: scramble reset support for DP port CRC on g4x Daniel Vetter
2013-11-01 12:58 ` Damien Lespiau
2013-11-01 9:50 ` [PATCH 3/4] drm/i915: scramble reset support for DP port CRC on vlv Daniel Vetter
2013-11-01 9:50 ` Daniel Vetter [this message]
2013-11-01 13:05 ` [PATCH 1/4] drm/i916: add "auto" pipe CRC source Damien Lespiau
2013-11-01 17:52 ` 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=1383299423-4950-4-git-send-email-daniel.vetter@ffwll.ch \
--to=daniel.vetter@ffwll.ch \
--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