From patchwork Tue Oct 29 14:03:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 11217971 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2466614E5 for ; Tue, 29 Oct 2019 14:03:22 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0BB092087E for ; Tue, 29 Oct 2019 14:03:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0BB092087E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B80BC6EB6E; Tue, 29 Oct 2019 14:03:18 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by gabe.freedesktop.org (Postfix) with ESMTPS id 790616E40A; Tue, 29 Oct 2019 14:03:17 +0000 (UTC) Received: by mail-wr1-x443.google.com with SMTP id l10so13797778wrb.2; Tue, 29 Oct 2019 07:03:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=m0UAArgOQwklEDlIPd4FtLzQeSJWVWCAKXO/HPSaE6U=; b=gBckgW1nSacL07XjAK8JJMUTIvf93zA6ad39TkWkTGRYMvx0VXyFPdwxJRpFyMySQS /wL4mzfVQhzWytru2MmziUJkMYSgm7U+FS8/QM9jQ92HVG471IeQIFcdAZ5gDX8aOo9F PvHFboG9IpR05w4+iAL+q+rm3XcnU3qtRTfOaXnxYsbsNnGL+DXZKVHYR4BGNJllgvH3 EIVpoRHnMTqA9KcH15H8I3V4hsXw1dtiiiM3KN6P+fW5CsARU1Uql3l1fnKfbUKcPSqO tmXU/YzjNeh9kKBopXj+CEDsQ1rqCnZgQv8iZlhzopeg74jlF9mZzErN9HNQqPTM8ovy Bh3w== X-Gm-Message-State: APjAAAUKVUZtLCfPfRIavfUSGxOmemaCIPdw3jViQLfrok2vg1U63AVW 9LairBLq9ldEcN3apPksObcNgb55 X-Google-Smtp-Source: APXvYqwrqm+T3lcm6jTyY9WVnncm9v/fk7M3MwfjLsF811NR8MSosBRj4spivKxyJ5afuxaC3aud9g== X-Received: by 2002:adf:e544:: with SMTP id z4mr21413571wrm.6.1572357795268; Tue, 29 Oct 2019 07:03:15 -0700 (PDT) Received: from localhost (p2E5BE2CE.dip0.t-ipconnect.de. [46.91.226.206]) by smtp.gmail.com with ESMTPSA id a23sm2829416wmj.2.2019.10.29.07.03.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Oct 2019 07:03:14 -0700 (PDT) From: Thierry Reding To: dri-devel@lists.freedesktop.org Subject: [RESEND PATCH] drm/dp: Increase link status size Date: Tue, 29 Oct 2019 15:03:12 +0100 Message-Id: <20191029140312.516266-1-thierry.reding@gmail.com> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=m0UAArgOQwklEDlIPd4FtLzQeSJWVWCAKXO/HPSaE6U=; b=ZFHKdMJFJcJJmuyB+5GJ4mcpPbU6L8++W78c0u+hIRJBGON/IgB0YcPKfHRgBTrJNs 5PKjLqbezxB2Gy49TVQKE/5BM2E4b0aS/5wYY5zaLwXCT0zOi5sQLF1HoJbnXQWh8wJw kNLgUSJ+edmqm526rSMNJ9MGUTNxfT3kUj4UswxFD9Onnb1cCfXyrfbu9BqOQyAKd61l D26BljaXIQ03L+jxDlXSL0H/nAj7YsyubGkbO3x504BDhnXpWni13xQ64iAym5HY6M/5 OyVyo5M1Xerni22T0qrmmnsYFmUxAMA6YCfni/k9Jqfuq0waN5sSqIbm6Sat7dZ46+cL RmOQ== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: intel-gfx@lists.freedesktop.org, coverity-bot Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Thierry Reding The current link status contains bytes 0x202 through 0x207, but we also want to make sure to include the DP_ADJUST_REQUEST_POST_CURSOR2 (0x20c) so that the post-cursor adjustment can be queried during link training. Reported-by: coverity-bot Addresses-Coverity-ID: 1487366 ("Memory - corruptions") Fixes: 79465e0ffeb9 ("drm/dp: Add helper to get post-cursor adjustments") Signed-off-by: Thierry Reding Reviewed-by: Lyude Paul --- include/drm/drm_dp_helper.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/drm/drm_dp_helper.h b/include/drm/drm_dp_helper.h index 51ecb5112ef8..9581dec900ba 100644 --- a/include/drm/drm_dp_helper.h +++ b/include/drm/drm_dp_helper.h @@ -1121,7 +1121,7 @@ #define DP_MST_PHYSICAL_PORT_0 0 #define DP_MST_LOGICAL_PORT_0 8 -#define DP_LINK_STATUS_SIZE 6 +#define DP_LINK_STATUS_SIZE 11 bool drm_dp_channel_eq_ok(const u8 link_status[DP_LINK_STATUS_SIZE], int lane_count); bool drm_dp_clock_recovery_ok(const u8 link_status[DP_LINK_STATUS_SIZE],