Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp204889pxv; Thu, 8 Jul 2021 00:16:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxTP8AQPBnG134wingceGrKd/FAiBeQS8/cDjt+Ef65n5+lfqERK/wNIcvm3sh+jgtbwshT X-Received: by 2002:a17:907:3e0b:: with SMTP id hp11mr29811370ejc.523.1625728617431; Thu, 08 Jul 2021 00:16:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625728617; cv=none; d=google.com; s=arc-20160816; b=dbQLzgOyAbLk1GmlfleKd3W8ROpgUELgzZGoSC8GuqzReesGmIbIT1xMrQNhK9yilp NbXBhmNS03d6kw6766MweUZJ/+ZLbs++qCrVjfPRsq+AJKcqywXGMeYHsF+i7tTuqL+h hmuIBt0uuASEvGdVXbNjd0d12rXjcrIl8GiVXvFKYsb4QWT2FfcdxRNvSsZwCuDM5b+4 kgjWaRZagxtB5Ty/l4EYfq9SDUF7HN6seRZxSODxsVW9J70zFsBCFfWiC0k/v/L14VjA jGTEIy8o7mwBz1v05vZLH/STNWQTUz1EkwDA4lgLVt80nhtk143zaLM1upvK46qGUnho 0iqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:user-agent:from :references:in-reply-to:mime-version:dkim-signature; bh=EExaHI1thjef0RoUFOMDogl2sDpmm35wAYmQrG+YsrQ=; b=cso6v8llswu6F2NOpNd43UXypnwGm32HkW1Py7DC+gXmvJt+9SbAtJbft9fviEoRP1 vy7KzDK0/99oL+Uoisvk33EwJyx7debNpXzOKwohgO1+oFaA6vGSnNWo98vkNPAF2WtT 9rAjtUIZraQKqygGChJ0NSN55yIm9L1BnyB1IUj8239eZMdyXosrDn3SNsmGZoR3d9YT B0/wY2czuqTsQgiGIYvbgkh1fhwCaQzFL61lfKK6qKhTOFgb42eIYFWuZ7oqhQm7700g 6j3kil+EbkCPa1pGGm9zDkcAiLdJzUGcIUO6nXrxiFV4/roTA1s1Q+sIQINDWI3Bg6Qw xhmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=dxC2cDjR; 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=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t17si1869195edd.259.2021.07.08.00.16.18; Thu, 08 Jul 2021 00:16:57 -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=@chromium.org header.s=google header.b=dxC2cDjR; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229843AbhGHHRO (ORCPT + 99 others); Thu, 8 Jul 2021 03:17:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36646 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229866AbhGHHRN (ORCPT ); Thu, 8 Jul 2021 03:17:13 -0400 Received: from mail-ot1-x333.google.com (mail-ot1-x333.google.com [IPv6:2607:f8b0:4864:20::333]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6D84EC06175F for ; Thu, 8 Jul 2021 00:14:32 -0700 (PDT) Received: by mail-ot1-x333.google.com with SMTP id w8-20020a0568304108b02904b3da3d49e5so905493ott.1 for ; Thu, 08 Jul 2021 00:14:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:in-reply-to:references:from:user-agent:date:message-id :subject:to:cc; bh=EExaHI1thjef0RoUFOMDogl2sDpmm35wAYmQrG+YsrQ=; b=dxC2cDjRWk8y0DcKuvUIf6RY4Um7IgIWF4hpiAr6MhIyIw3kZ7WnFuPA6CoD1tgorB vwcBXRWBk0O+IzOMw03wYyvVRfLIe63zsI7ljfvMFzfylTasJNEdDzKa29/IKCFsSzY0 vPZ/leRChW2En9Nfbw4ZSh9DSaua+jT75xtxs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from :user-agent:date:message-id:subject:to:cc; bh=EExaHI1thjef0RoUFOMDogl2sDpmm35wAYmQrG+YsrQ=; b=DOG/YsT2lCpshnm1yFRu8JgkBNXuKed83Fk6idHzBAnB0Ca9RkuN0r+U0dntbcTofg xMc0xJ7wexTHn/zLjUDNoOChBr2+CwCynZWSPBgKsxFb8qYruIggeCwmY+o0gVSqxi9s PqvU+3JeY9kBdhMC0A/OMW17+RfBcUhu+46zrLpHF4gRudhh8reigQp8LrBTrA4fq6xv rgFYtZtGIpo9Yy8QLdbIvJX5A+Q36JTtn5hMhTIbR0rd4nbSaa1ntxsh8ty8VBW2/5/q /mAE+slH6AwPHSj/wyGqx7wEH22siV1jw72XQ3vmmzO+rwD0N6TNLr/hQ+KoJAaQVL0O 3FjQ== X-Gm-Message-State: AOAM530OJDG054DCEbvcHRyrwKdLkGS2s2QXjbxtyHueRIj5t99I8G5I ghaZHXXUxk/x0CX6913EMJIq6nO0j8KgJo+lR2iPIw== X-Received: by 2002:a9d:2781:: with SMTP id c1mr22131987otb.34.1625728471826; Thu, 08 Jul 2021 00:14:31 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Thu, 8 Jul 2021 07:14:31 +0000 MIME-Version: 1.0 In-Reply-To: <1625592020-22658-6-git-send-email-khsieh@codeaurora.org> References: <1625592020-22658-1-git-send-email-khsieh@codeaurora.org> <1625592020-22658-6-git-send-email-khsieh@codeaurora.org> From: Stephen Boyd User-Agent: alot/0.9.1 Date: Thu, 8 Jul 2021 07:14:31 +0000 Message-ID: Subject: Re: [PATCH 5/7] drm/msm/dp: return correct edid checksum after corrupted edid checksum read To: Kuogee Hsieh , dri-devel@lists.freedesktop.org, robdclark@gmail.com, sean@poorly.run Cc: abhinavk@codeaurora.org, aravindh@codeaurora.org, airlied@linux.ie, daniel@ffwll.ch, bjorn.andersson@linaro.org, linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Kuogee Hsieh (2021-07-06 10:20:18) > 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 > --- > 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 88196f7..0fdb551 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); It looks like this can be drm_dp_send_real_edid_checksum()? Then we don't have to look at the connector internals sometimes and can drop dp_panel_get_edid_checksum() entirely? > dp_link_send_test_response(panel->link);