From patchwork Wed Jun 10 00:22:18 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Todd Previte X-Patchwork-Id: 6575951 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 7ED32C0020 for ; Wed, 10 Jun 2015 00:22:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8AEF920562 for ; Wed, 10 Jun 2015 00:22:33 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id E2FB0204D6 for ; Wed, 10 Jun 2015 00:22:31 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 69B0A6E28E; Tue, 9 Jun 2015 17:22:31 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-pa0-f41.google.com (mail-pa0-f41.google.com [209.85.220.41]) by gabe.freedesktop.org (Postfix) with ESMTP id DB4C26E296 for ; Tue, 9 Jun 2015 17:22:30 -0700 (PDT) Received: by payr10 with SMTP id r10so22971774pay.1 for ; Tue, 09 Jun 2015 17:22:30 -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=veY8aQOJt//NT7D1HgduQ+oWxRUbboUQRhjOeV3jOT0=; b=YtvU+0AH69NZ1Fb+zQPdLaVLOnseVgJRuGKGu1sl30Si/iGkf2MDbe4hBPJWId5X7V O8KtiCNG5VfrsL3qom92caaJQrCOHyceBOwh1kUBXzhvvW/XPfD8J1jkAaY4S9T4sYBo ScCHZQeEDYj3e60jo1cFuGljM/J6Lzc8ukw2cU2bPEN1U5CgG1X0sgN6g3Dlh72btk0G mUELFfDeHD8IFNQZaPC9wPE8P+bihCQl7zl/aNxrAHv3VP8CSQLG8AyvCg8n5h3UGm/0 YWN+LAC9VDmqnYtmHnmuf8RMBXg8ClEGlPAntmW/1Ke4cZygsyl/JxcTSP2pd3itjbZN izkw== X-Received: by 10.66.145.33 with SMTP id sr1mr550201pab.41.1433895750647; Tue, 09 Jun 2015 17:22:30 -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 f4sm6677230pdc.95.2015.06.09.17.22.29 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 09 Jun 2015 17:22:29 -0700 (PDT) From: Todd Previte To: intel-gfx@lists.freedesktop.org Date: Tue, 9 Jun 2015 17:22:18 -0700 Message-Id: <1433895740-13698-2-git-send-email-tprevite@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1433895740-13698-1-git-send-email-tprevite@gmail.com> References: <1433895740-13698-1-git-send-email-tprevite@gmail.com> Subject: [Intel-gfx] [PATCH 1/3] drm/i915: Displayport compliance test 4.2.2.9 support 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 Implement the fix for test 4.2.2.9. This test is a 4-block E-DDC read over the AUX channel. For test purposes, the normal 1-block EDID read is required to write the checksum of that block to the sink device via the AUX channel. For 4.2.2.9, that checksum must be the checksum of the last block read. The DRM EDID read code already does the 4-block read, so the checksum just needs to be adjusted to the one that we need based on the number of extensions detected in the block. Signed-off-by: Todd Previte --- drivers/gpu/drm/i915/intel_dp.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index c7cbb67..14147d0 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -4020,9 +4020,17 @@ static uint8_t intel_dp_autotest_edid(struct intel_dp *intel_dp) intel_dp->aux.i2c_defer_count); intel_dp->compliance_test_data = INTEL_DP_RESOLUTION_FAILSAFE; } else { + /* Checksum write for EDID reads (DP CTS 1.2 Core r1.1) + * 4.2.2.3: checksum of EDID block 0 + * 4.2.2.9: checksum of the last 128-byte block read + */ + int checksum = *(&intel_connector->detect_edid->checksum + + (intel_connector->detect_edid->extensions * + EDID_LENGTH)); + if (!drm_dp_dpcd_write(&intel_dp->aux, DP_TEST_EDID_CHECKSUM, - &intel_connector->detect_edid->checksum, + &checksum, 1)) DRM_DEBUG_KMS("Failed to write EDID checksum\n");