Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp5294608rwb; Mon, 14 Nov 2022 02:19:11 -0800 (PST) X-Google-Smtp-Source: AA0mqf5kJStLTB5WjZpYpFyOqBlinLICKI/oMVdpDYp78v44NeeUfkTIbbS4xN2fz0FF+NArwPiA X-Received: by 2002:a17:907:3101:b0:7ad:cda3:93c7 with SMTP id wl1-20020a170907310100b007adcda393c7mr10114969ejb.500.1668421150942; Mon, 14 Nov 2022 02:19:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668421150; cv=none; d=google.com; s=arc-20160816; b=R9NfaAWbjFP13qA9Sotia+BdkQ2WTrs18n0zDM2KEYKbrgH7/OR+3GKxD65ZD/xbbP Qekd18/TOVDfUMA3g3ih+365k69j66n34SZxE2vgZA/SIq0nHgKskty6mrQLdSaQZaWy MGLRjhGhE839H8CWhdSLHI8Ha7nTuVhcWVT3dLR2CIkkJjHd10bhYghfQIfzTVvMLw2y edCA6fxn4qgvGoGEibfrbrE0Vt/1VVi9CifbkPriIqmQarx99GjqZfYQTvOYNTDENCxJ zqIKQcIZw+GykZ10kIt5pbwGgKtjdxrY21M7LKiSMPH5cOoW+BQOVeucgj0mxHeEhXkY aZjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :organization:in-reply-to:subject:cc:to:from:dkim-signature; bh=opMDOUyS5hCnpdPNbbx2TdlgE0GetHRyMV5jm8LPHRw=; b=Duw82QpWR09faxgdcclRDxPnMHcWf+vYfaV50PvU/jR9aaMZ2NB25DL8PoWSSkkKA6 QT+2MjOL7tsJ4WcqetCT3kAxKmz8KoxzBpZGBjNtAJvOLgASceqZ3dsH0u64FbJgLyqa BScd3nbY8eYz+2Z9tbDJszE1WZAV2oEYR+wLfgSRAPsowNPwQJFEUxnByNy7wIRlw8CL JEvzG1NlDaNSiwhjqf6MCDxE5iNV/n89cIo/rjvsFjgOlyiHeMMVr0aVzOvA6XSp4lCt FPsfyTGVY3CuA/WqdmPfgLjfPBXKwVriOUlP3Jw1jWQcefqso8NjTWGt+LDUJ+kVStM9 upjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=FI4G7QoS; 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=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cd23-20020a170906b35700b007aac98ec3dfsi6061248ejb.303.2022.11.14.02.18.45; Mon, 14 Nov 2022 02:19:10 -0800 (PST) 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=@intel.com header.s=Intel header.b=FI4G7QoS; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236656AbiKNKFd (ORCPT + 88 others); Mon, 14 Nov 2022 05:05:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40092 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236730AbiKNKFD (ORCPT ); Mon, 14 Nov 2022 05:05:03 -0500 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D11B81F9D3 for ; Mon, 14 Nov 2022 02:02:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1668420163; x=1699956163; h=from:to:cc:subject:in-reply-to:references:date: message-id:mime-version; bh=ZpphfstUP7oMJ91iN9xXMmrOJnu/uu6RmVG1mEwLx1g=; b=FI4G7QoSAwRv1NK19Rg2p0/CcbrlZJAXxdTB4egNh+jLF+eE43qrcnxN BpZY96IYbhgqw9sJaMwYjSYPcgkAC/c34MOuaD4taHjild8A1f72CLNx7 Xt7CyfxwPVbitismVKGBXhys3ifUMMlLf5X7/GmUV924jw2CnbYxOWKuq ZLm9ZgWznJK+brhGzrY5oaVMedNbSZvGTnQ0Rvvb1TBqWDgEz3vKb7Orf ZsldV1YHR1t8CGTDeveVgUG14J1Pqt4q1FbkN2HAPVAyt2z4e5P/7dcZa eR56RRytJhoHoj15LCelzCAjAaJz/36mcHcYfYKfHRPEjw9EBhwR7lf/8 A==; X-IronPort-AV: E=McAfee;i="6500,9779,10530"; a="292329711" X-IronPort-AV: E=Sophos;i="5.96,161,1665471600"; d="scan'208";a="292329711" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Nov 2022 02:02:33 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10530"; a="763420378" X-IronPort-AV: E=Sophos;i="5.96,161,1665471600"; d="scan'208";a="763420378" Received: from dsmahang-mobl.ger.corp.intel.com (HELO localhost) ([10.252.59.240]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Nov 2022 02:02:31 -0800 From: Jani Nikula To: Doug Anderson , Abhinav Kumar Cc: Thomas Zimmermann , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Stephen Boyd , Kuogee Hsieh Subject: Re: [PATCH] drm/edid: Dump the EDID when drm_edid_get_panel_id() has an error In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo References: <20221021130637.1.I8c2de0954a4e54e0c59a72938268e2ead91daa98@changeid> <956de566-d60a-f257-edff-85a2eac06d99@quicinc.com> Date: Mon, 14 Nov 2022 12:02:28 +0200 Message-ID: <87iljh4zwr.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE 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 On Fri, 11 Nov 2022, Doug Anderson wrote: > Hi, > > On Tue, Oct 25, 2022 at 1:39 PM Abhinav Kumar wrote: >> >> Hi Doug >> >> On 10/24/2022 1:28 PM, Doug Anderson wrote: >> > 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 >> >> Alright, agreed. There is some duplication of code happening if we use >> drm_edid_block_valid(). I had suggested that because it has inherent >> support for dumping the bad EDID. >> >> In that case, this change LGTM, because in principle you are doing the >> same thing as _drm_do_get_edid() (with the only difference being here we >> read only the base block as opposed to the full EDID there). >> >> Hence, >> >> Reviewed-by: Abhinav Kumar > > I've given this patch a bunch of time because it wasn't urgent, but > seems like it could be about time to land. I'll plan to land it next > Monday or Tuesday unless anyone has any other comments. Ack, it's benign enough. BR, Jani. > > Thanks! > > -Doug -- Jani Nikula, Intel Open Source Graphics Center