Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp451776pxb; Thu, 9 Sep 2021 04:55:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJytKvVbCuI/CZZp2grESUwNaDC+SvC1YpfUHssI5cXsXZOVRX42YfZM92lfG/QZGJWg1ly3 X-Received: by 2002:a05:6e02:1be7:: with SMTP id y7mr436847ilv.15.1631188551171; Thu, 09 Sep 2021 04:55:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631188551; cv=none; d=google.com; s=arc-20160816; b=Gz9ndGchuJkszVaRac7OEPu2jb6rBYSDQampIn3LLtWy8e5Jc130nsQgJOE7Um+t8y H5H4+JNG9D6uCRGtBRAkulvIzMnw1htuji/A7ls0GWmkgBKbwtkOVYJNYNDgcT/OY/PX UJVIgjHWXtnw3ZuPFcLAIJbqldTYI39Zr1wevIpc2HTrsWeL2H7Hg29wVVY19SquDscY kjvRzYZ4Plw56PNccgqDXQJF/QF/irTXxfVH+dXQaTmLh9LVSu8kgdVVwT/vguhW6bbM KRy5Vg48s22dTtf+kgOO1n8zLy4dpCrmTWYRll3Re4sH5u5YWEl7elopOEdmmgx4HcBg TiBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=TeL6rTnH2Zc2EJERb2AFBqS0diEewQdavJn8SCWPBvg=; b=MBrnQJAJvnrn2EL9KW68t8Y+zsXyuFKHDZ2aTjnLV6aXdn14n/wlQDXDx4SzwMr9dC 5J5S/LEPEhDojWY63kn5pm8R68trJZSf6KnnnQksydOgblyjeSteS8xMDgBDS/wfvm03 GWnq55DueJF8iAOvx9fVhh673jSqRe8Urt5XXJ9YOtu9yEv9L7y0K28yshabCr5+XPNG jL6DBz8Kebfn41Pt5xkJ4UVG05L8nHE/2I53vB/5RCbd0CnQnORsTOAndHYrtkEyiSZg Rqe0B9eHL5rDdtpHbHjC/ckxGS+jfQOB2ObKix2rUn83GykcEnBph31nW9scfc2KbvBd QjPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=G876cbTM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a10si1419530jaa.15.2021.09.09.04.55.39; Thu, 09 Sep 2021 04:55:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=G876cbTM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243692AbhIILyW (ORCPT + 99 others); Thu, 9 Sep 2021 07:54:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:53688 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239526AbhIILvh (ORCPT ); Thu, 9 Sep 2021 07:51:37 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 89B4B6120F; Thu, 9 Sep 2021 11:44:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1631187854; bh=NBZ3JN46V0IjrFhuFn+RcDf9fW23nxajn0eDeMrhbLI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=G876cbTMac4td+loziqYQyBd1bK0BwwlSgw53ZRuWCsBiQrnKZZa/K+JCJAV+rg/w SFn6Kzgl1Ax5C6I6Oru6hn1hcVaMPRJ2oYIhc9YX3a3FSqkPQEr1H9bFjqCo33U2GO ElKmzh0kV8Jx0awmsCIGS8rMYD7uvW8FhFBrDnzpILyJk4PGH6LTo1MB5kGzWbqbNj UItytxLqUqcDJ6o+Lkiii/UVUcYlO7pPvSgUa8+T3f4euEE5bivUhaZGLxQbEFP8fC XIX7lgkEM1BehJgmjucPfmJm5wuUnjpHO3RbeZ78WL46cIq/bIhhk+DojoAKTAJ6zs gv8NCh1+rQh1A== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Kuogee Hsieh , Stephen Boyd , Rob Clark , Sasha Levin , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org Subject: [PATCH AUTOSEL 5.14 144/252] drm/msm/dp: return correct edid checksum after corrupted edid checksum read Date: Thu, 9 Sep 2021 07:39:18 -0400 Message-Id: <20210909114106.141462-144-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210909114106.141462-1-sashal@kernel.org> References: <20210909114106.141462-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Kuogee Hsieh [ Upstream commit 7948fe12d47a946fb8025a0534c900e3dd4b5839 ] Response with correct edid checksum saved at connector after corrupted edid checksum read. This fixes Link Layer CTS cases 4.2.2.3, 4.2.2.6. Signed-off-by: Kuogee Hsieh Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/1628196295-7382-6-git-send-email-khsieh@codeaurora.org Signed-off-by: Rob Clark Signed-off-by: Sasha Levin --- drivers/gpu/drm/msm/dp/dp_panel.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/msm/dp/dp_panel.c b/drivers/gpu/drm/msm/dp/dp_panel.c index 440b32753430..2181b60e1d1d 100644 --- a/drivers/gpu/drm/msm/dp/dp_panel.c +++ b/drivers/gpu/drm/msm/dp/dp_panel.c @@ -271,7 +271,7 @@ static u8 dp_panel_get_edid_checksum(struct edid *edid) { struct edid *last_block; u8 *raw_edid; - bool is_edid_corrupt; + bool is_edid_corrupt = false; if (!edid) { DRM_ERROR("invalid edid input\n"); @@ -303,7 +303,12 @@ void dp_panel_handle_sink_request(struct dp_panel *dp_panel) panel = container_of(dp_panel, struct dp_panel_private, dp_panel); if (panel->link->sink_request & DP_TEST_LINK_EDID_READ) { - u8 checksum = dp_panel_get_edid_checksum(dp_panel->edid); + u8 checksum; + + if (dp_panel->edid) + checksum = dp_panel_get_edid_checksum(dp_panel->edid); + else + checksum = dp_panel->connector->real_edid_checksum; dp_link_send_edid_checksum(panel->link, checksum); dp_link_send_test_response(panel->link); -- 2.30.2