Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp7506955rwi; Mon, 24 Oct 2022 15:59:05 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6gTafyuk1nVF1DvPLYZXByxoK2F6VJduAc0RFKAEcK6gtSGVO6iLWFyK0BeeRDfi/x1D1I X-Received: by 2002:aa7:8210:0:b0:56b:8b4b:e5e with SMTP id k16-20020aa78210000000b0056b8b4b0e5emr13617553pfi.58.1666652345042; Mon, 24 Oct 2022 15:59:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666652345; cv=none; d=google.com; s=arc-20160816; b=SaJUgAKPpU42DJ2QXN92J4532poTV33zKdj7N3sUUegQN09nmdq7TZPKyvNNCJu66v YK9kr4Ek+iHpC/+amSpK8X/ezgr7qBiE+Y2yzpBV3blUtOFIhXRwnB219OOzDMWBYpft gHfOqGNBSm9G0rpytI834797FwoqQgyfEonXF+Q/Ryx8f4gENTXJAgaBojybK+dWiYsL AoE8F6/rWK6oXwmEJSEU4OvyciX8/tRW9iWEsX41juQosIiGciYAFxTKYOOCjS9WrETv 46cyqTqdqDMB6CN2anYmd3tjsD2iv3Ev53QKIYOKY0UvCKBfBgb7//BlwYC6ivb+Cq45 iT/g== 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:from:in-reply-to :references:mime-version:dkim-signature; bh=FXgFJbS2a63KBWIYrk1JkOqFCuXa2BXSDEikjukgc/I=; b=KeaoNFgAwjblKBvb6azcQtu//hjU/av37G2838RLExXi87Ve1GqnVDad09txHahJkS diVltH2ksQ/fIA3x0cL66XZxE+zfXE9L2NODLyGT9qQZLpw6t7rvHSSpfmBUSf/ZOVwJ fIFJTgpyQn018vRn04nHbhtFUMx463LEoXX4pnzw75Fc/MTAbAB/OmZQ6UM4UvwxHJ2h ZGbl/VP7sIZvNzY3LbBHVKwZ9WkRYjtbJfce7W7sRzk+WY3OmSBmHJ4x4+/VoOABjdOk fiDhBHe21jvo611fYXwx6miuB0GemegjIOJvacpOFdGqeOkwIU+JxEVRBgqtNUuRZQhf rJFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=a23igI6x; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t15-20020a17090340cf00b001780ba83636si819829pld.612.2022.10.24.15.58.52; Mon, 24 Oct 2022 15:59:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=a23igI6x; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S231926AbiJXWxa (ORCPT + 99 others); Mon, 24 Oct 2022 18:53:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34764 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231878AbiJXWw4 (ORCPT ); Mon, 24 Oct 2022 18:52:56 -0400 Received: from mail-lj1-x232.google.com (mail-lj1-x232.google.com [IPv6:2a00:1450:4864:20::232]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7FB039E6A3 for ; Mon, 24 Oct 2022 14:14:49 -0700 (PDT) Received: by mail-lj1-x232.google.com with SMTP id z24so4370561ljn.4 for ; Mon, 24 Oct 2022 14:14:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=FXgFJbS2a63KBWIYrk1JkOqFCuXa2BXSDEikjukgc/I=; b=a23igI6xFUkOVmrwWcYqJt/zrTqVWiDSUSusTeW1jwopdesRRdT8n6XfnDDeDLn/AL Bs14Yi6j6xJlpkkbsvxdFjZGU0B4I9nGF5b+LNvwUuLMAz038OKN1V+NN/1Bn3TcRIXX z03BE1QBny7+Oz1nv/l/M4Iyn0MKVmnZQlFHA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=FXgFJbS2a63KBWIYrk1JkOqFCuXa2BXSDEikjukgc/I=; b=ntjPBKykXBP/vUxRRNUv8dHQH+vEY+nvOIRxSVakuUPV/FowJnB3P3hdxooebqUEcs eKIljPq5WSAVEfUbpVjQT1wX3ktZROA+jDTrHJ115fJ+gPfuZxfsCD4N1TvpnjgbRkah BOh4c9TqdiVhyu0+fxk8j3GXC7eiQq1m8oq+0Ba2sBUmLs42YDz3M+oUBC9Po6v/bHZN cQ1JoQFnZnMmv6/IjMBMD65CzgEN4ahpluyxUDB3xtPAU5TCCnUez2i8tRO4raIUXZUM F0aEj9myk08dzcNvX1z1X3WS1M1DJgAD5DWSNFhl01QzpRzOkjHqdVI2Is2S8S2miPmN unIQ== X-Gm-Message-State: ACrzQf2CRbpe+oY4E8BHhLyaTHTOSrwWWr4M7KDeZ5mc3Aqyj8aAYLTu itq9wb/jBhLRS/FdceZt7LG/rBWzP9JwmuJP X-Received: by 2002:a17:907:2bf9:b0:7a4:bbce:dd98 with SMTP id gv57-20020a1709072bf900b007a4bbcedd98mr8913015ejc.669.1666643319517; Mon, 24 Oct 2022 13:28:39 -0700 (PDT) Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com. [209.85.128.50]) by smtp.gmail.com with ESMTPSA id n3-20020a170906724300b007a7f9b6318asm346570ejk.50.2022.10.24.13.28.37 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 24 Oct 2022 13:28:37 -0700 (PDT) Received: by mail-wm1-f50.google.com with SMTP id b20-20020a05600c4e1400b003cc28585e2fso3979201wmq.1 for ; Mon, 24 Oct 2022 13:28:37 -0700 (PDT) X-Received: by 2002:a05:600c:5493:b0:3c9:c18:87d5 with SMTP id iv19-20020a05600c549300b003c90c1887d5mr9525360wmb.188.1666643316677; Mon, 24 Oct 2022 13:28:36 -0700 (PDT) MIME-Version: 1.0 References: <20221021130637.1.I8c2de0954a4e54e0c59a72938268e2ead91daa98@changeid> In-Reply-To: From: Doug Anderson Date: Mon, 24 Oct 2022 13:28:24 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] drm/edid: Dump the EDID when drm_edid_get_panel_id() has an error To: Abhinav Kumar Cc: dri-devel@lists.freedesktop.org, Kuogee Hsieh , Stephen Boyd , Daniel Vetter , David Airlie , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Fri, Oct 21, 2022 at 2:18 PM Abhinav Kumar wrote: > > Hi Doug > > On 10/21/2022 1:07 PM, Douglas Anderson wrote: > > If we fail to get a valid panel ID in drm_edid_get_panel_id() we'd > > like to see the EDID that was read so we have a chance of > > understanding what's wrong. There's already a function for that, so > > let's call it in the error case. > > > > NOTE: edid_block_read() has a retry loop in it, so actually we'll only > > print the block read back from the final attempt. This still seems > > better than nothing. > > > > Signed-off-by: Douglas Anderson > > Instead of checkinf for edid_block_status_valid() on the base_block, do > you want to use drm_edid_block_valid() instead? > > That way you get the edid_block_dump() for free if it was invalid. I can... ...but it feels a bit awkward and maybe not quite how the functions were intended to work together? One thing I notice is that if I call drm_edid_block_valid() I'm doing a bunch of duplicate work that already happened in edid_block_read(), which already calls edid_block_check() and handles fixing headers. I guess also if I call drm_edid_block_valid() then I should ignore the "status" return value of edid_block_read() because we don't need to pass it anywhere (because the work is re-done in drm_edid_block_valid()). So I guess I'm happy to do a v2 like that if everyone likes it better, but to me it feels a little weird. -Doug