From patchwork Tue Oct 29 11:10:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 11217711 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 E13CB913 for ; Tue, 29 Oct 2019 11:10:14 +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 C849F20874 for ; Tue, 29 Oct 2019 11:10:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C849F20874 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 4F3FE6E218; Tue, 29 Oct 2019 11:10:12 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4F26B6E218 for ; Tue, 29 Oct 2019 11:10:11 +0000 (UTC) Received: by mail-wm1-x334.google.com with SMTP id x5so1939475wmi.0 for ; Tue, 29 Oct 2019 04:10:11 -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=6yXYGEaODJbeKbSOHFM3xoxL2a4me4Eamz1v3QkQLIQ=; b=ZFbamBy7MqAwKdVNhUZlj94ZpHAdvEsjlwdTPIGUPL3AtvLpZxNoTxfLtrQHIhjScE tH2Ejkqr8nOc3MlwAOcu3rMIB+IUAhlPChc+6XRql/kufuQonNfN5V1jvmYKyuMBdHqk Lc5xKqULCh6FjQIduI8dsNBurfdBs2fXv7WMsrfKWnICcMQU5Fb5mXhDtbMU4D3wztGc NwcHs9CSi647/4MBTvFMtqExOb09QypkqvIMlYQyb8rK/fvAFunhVTLCXYCH9e1y2DF7 M0O/nkMN5eJygaRWjYxzyujlq/4Swr5oKGzE2MVhlXj9vVdYWiSXR9mWpUwyiU6pFCnm 0vcA== X-Gm-Message-State: APjAAAU0l0+iPfAJ1Kv/gjuLy1E9Yju2zI08praG5vo/B9EBHbG0aaRQ xEp7oRVkHhYSEJaZHeSIMqmGHH6s X-Google-Smtp-Source: APXvYqyOS42+L0bMNQAQXlvHEbJYli0U3ewrtUqvJU1G+Lm/1dpj10dPtk1LwZyuToGK2UJ3jzQrjg== X-Received: by 2002:a1c:544e:: with SMTP id p14mr3438089wmi.17.1572347409466; Tue, 29 Oct 2019 04:10:09 -0700 (PDT) Received: from localhost (p2E5BE2CE.dip0.t-ipconnect.de. [46.91.226.206]) by smtp.gmail.com with ESMTPSA id 65sm25826288wrs.9.2019.10.29.04.10.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Oct 2019 04:10:08 -0700 (PDT) From: Thierry Reding To: dri-devel@lists.freedesktop.org Subject: [PATCH] drm/dp: Increase link status size Date: Tue, 29 Oct 2019 12:10:06 +0100 Message-Id: <20191029111006.358963-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=6yXYGEaODJbeKbSOHFM3xoxL2a4me4Eamz1v3QkQLIQ=; b=l8d+fwoQFguerlEV+yKzgT/bIXWLDrwaXrAFgRdpaGhT3AhxxeKmKV+MuavwSro1Oq mUOZINsxvUmVTI1gG9TjcXyYshwmcwhXde6VjriX8KVfxOiV6UIJkXexIq3hIPtkKMgJ 8CMOtnX9DbqGL6oCjFkTjxlirm7uu8B21mE/YAeYA4Nm51fF3sKqaiRDxMZow11MvZaz V5gL2DgMujoJomfkIH96W8S8J13Fsrm+t14q6ZlaG8K+12Ogy2vgHJfuX15guZRQ5Gri 6d6O6TxpuxASl5pqN13D4ib5JVyi4UDxa05C4qNBhyBQSrGpXAC6mMM1kPGeYAZvLMzQ gYlA== 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: 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: Jani Nikula Reviewed-by: Lyude Paul --- I vaguely recall once carrying a patch to do this, but I can't find any trace of it. 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],