From patchwork Mon Apr 13 14:53:09 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Todd Previte X-Patchwork-Id: 6210071 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 766A5BF4A6 for ; Mon, 13 Apr 2015 14:53:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 71FF22034E for ; Mon, 13 Apr 2015 14:53:15 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 558582034B for ; Mon, 13 Apr 2015 14:53:14 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B53B46E554; Mon, 13 Apr 2015 07:53:13 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-pd0-f174.google.com (mail-pd0-f174.google.com [209.85.192.174]) by gabe.freedesktop.org (Postfix) with ESMTP id BA63E6E554 for ; Mon, 13 Apr 2015 07:53:11 -0700 (PDT) Received: by pdea3 with SMTP id a3so109650729pde.3 for ; Mon, 13 Apr 2015 07:53:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=1VwHj2r9rupO87SVYCrB8p93N91XBj84laseV+eVBtE=; b=eo5P604l0oufvF7Jhxn9ifd22w/16MAA9QVFysVv6/EjhNHmPM7EhCyQu8pCLwpV6G 4u9DM6prv+Rcu9lGlIwCEkcslUB4NH+j7tg9NUkPlkPfnU/mHzRhLOri55rOIL9PIQi4 LlJ0aEevNqdVgG/4JuyYWsH6xDHfum8rICFtE3TWNbXohAkuNwa7IhBPc20saG8sbSQM KikFXqkK/u3Fl44du7aIrT7BKhBOXX2OUbioJQnpEa/QKJ9rlwUqsKqCDaEeivIsvvOf w3Btk1ZZ8TqqB3iUxulwDvOi72VCu6HKccpF86s6b/NwbO88bNBnEm3L5d5uukRhZ0Ah IFoQ== X-Received: by 10.66.224.109 with SMTP id rb13mr26698395pac.133.1428936791408; Mon, 13 Apr 2015 07:53:11 -0700 (PDT) Received: from localhost.localdomain (ip70-162-72-208.ph.ph.cox.net. [70.162.72.208]) by mx.google.com with ESMTPSA id id2sm7533452pbb.56.2015.04.13.07.53.10 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 13 Apr 2015 07:53:10 -0700 (PDT) From: Todd Previte To: intel-gfx@lists.freedesktop.org Date: Mon, 13 Apr 2015 07:53:09 -0700 Message-Id: <1428936789-13435-1-git-send-email-tprevite@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1428682372-21586-5-git-send-email-tprevite@gmail.com> References: <1428682372-21586-5-git-send-email-tprevite@gmail.com> Subject: [Intel-gfx] [PATCH 04/13] drm/i915: Add EDID read in intel_dp_check_link_status() for Link CTS 4.2.2.1 X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Adds in an EDID read after the DPCD read to accommodate test 4.2.2.1 in the Displayport Link CTS Core 1.2 rev1.1. This test requires an EDID read for all HPD plug events. To reduce the amount of code, this EDID read is also used for Link CTS tests 4.2.2.3, 4.2.2.4, 4.2.2.5 and 4.2.2.6. Actual support for these tests is implemented in later patches in this series. V2: - Fixed compilation error introduced during rework Signed-off-by: Todd Previte --- drivers/gpu/drm/i915/intel_dp.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 23184b0..75df3e2 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -3890,6 +3890,9 @@ 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; + struct drm_connector *connector = &intel_dp->attached_connector->base; + struct i2c_adapter *adapter = &intel_dp->aux.ddc; + struct edid *edid_read = NULL; u8 sink_irq_vector; u8 link_status[DP_LINK_STATUS_SIZE]; @@ -3906,6 +3909,14 @@ intel_dp_check_link_status(struct intel_dp *intel_dp) return; } + /* Displayport Link CTS Core 1.2 rev1.1 EDID testing + * 4.2.2.1 - EDID read required for all HPD events + */ + edid_read = drm_get_edid(connector, adapter); + if (!edid_read) { + DRM_DEBUG_DRIVER("Invalid EDID detected\n"); + } + /* 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)) {