Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1538991pxb; Thu, 16 Sep 2021 09:30:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxjdzK2A1CD8DvA1C/QbEmahKppJorWGWpnDTuxZ201GQkFMbYsEB8dE5jOYZHXp6aQsPIK X-Received: by 2002:a6b:8b54:: with SMTP id n81mr5115779iod.5.1631809808132; Thu, 16 Sep 2021 09:30:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631809808; cv=none; d=google.com; s=arc-20160816; b=jjAp7lJSdIceegu8q9eAV+6qWH7fbJ7YC2NuYxLl88RYqAtoBxBMD0mT+Q+m/OHLIt 3XYJl5fbq5GG5ouD/RVDE+DkZdxeHlvv5ELffEmRm2pOCHeAcXltvCNXeDhca+qgmqLa ++QlZK6IGrMWr17xOhsgawfFdSFPNa3g4MR4WHI0a6FX73IOdNSSmRUWuPYHplM1bUCd M/0f0mUFKDPACn+weQvzKIS/d9JP+qwoHaiZSw50eY9ahFqwVgAI6xgwj2vMgpuNLE3X 0YQC41aXitWJ4lQjqr+1KS25W2FNVG22Ijmf7tnY31rO3Edn5Ktd8vGsqDbjBsBc/sWv qK3w== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=IehiR7aj1pR46lghrSZW2I6IdGmQBzXHTQHGLTLZUgk=; b=0wxzhIR36bNRsLMnBXL/eM6GVRmIhUYz5R+JRt9MD/AQ1uL3pzScPYZGTo578Q6BmE Lqr9Jg+P9re+KTkmfgT6ZVGX7jIpejrqz9/Sxmo+bcLnKDjSwGd06+rwAiUIKFajJvj+ SWz2965eN3MeCImdI/D8jwjVFGiXknQmwzOK02c244F5oPU4TgzieoZj/uQdUkijnF/v xGipkEVo0G9MBcst/Z+QaZGJgQc7oq/MIyS9gtVkb2at3dKaeNXuSZN70f/eJMRXpwfB t5TbjKnxFlqX1EFL2nM4TpfWRVQdbG6GpzUh/sXLTPS9M80ckTW1giAPh6hqx/Ea9Eut FeoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=V29ukyee; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k3si3091860ilh.176.2021.09.16.09.29.56; Thu, 16 Sep 2021 09:30:08 -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=@linuxfoundation.org header.s=korg header.b=V29ukyee; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242898AbhIPQ3q (ORCPT + 99 others); Thu, 16 Sep 2021 12:29:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:58970 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241766AbhIPQUH (ORCPT ); Thu, 16 Sep 2021 12:20:07 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id E18146124D; Thu, 16 Sep 2021 16:14:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631808866; bh=8n5C2JifXzVoWvgkUvEfDECrf5ebuw6dW59g53XDHsg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=V29ukyeeheOi31NiLHF7OXvz6G8sJMfbsurEhHW+Ym7v2nZNWZWGVCXLuB8DdERhe w3B9jjh08y3LY/XoFaSHXCQR18CGs5cezYQSOKZzw8pYBPHoVNGVkeaABcOGUC2vZX 5BycyJgl0C1p6TcZFz54V13Iah8sq8m23oaPleu4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Kuogee Hsieh , Stephen Boyd , Rob Clark , Sasha Levin Subject: [PATCH 5.10 209/306] drm/msm/dp: return correct edid checksum after corrupted edid checksum read Date: Thu, 16 Sep 2021 17:59:14 +0200 Message-Id: <20210916155801.164037317@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210916155753.903069397@linuxfoundation.org> References: <20210916155753.903069397@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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 18cec4fc5e0b..2768d1d306f0 100644 --- a/drivers/gpu/drm/msm/dp/dp_panel.c +++ b/drivers/gpu/drm/msm/dp/dp_panel.c @@ -261,7 +261,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"); @@ -293,7 +293,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