Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp3292097rwi; Fri, 21 Oct 2022 14:23:09 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6fPjz62NVKJ5ja3jm3Kb6Hna8Iny45lzNfU8ApwhYcyMVfxaSjNyrI1A4W39HYtnKY+sEJ X-Received: by 2002:a05:6402:2211:b0:461:5d0a:6678 with SMTP id cq17-20020a056402221100b004615d0a6678mr2891830edb.378.1666387388730; Fri, 21 Oct 2022 14:23:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666387388; cv=none; d=google.com; s=arc-20160816; b=wNOMGqPnCzr4PvZy1ck7qKnYkANc0XE1+j8w2vPkC/eNKDY+adpwpjeZwWaCN/qcsq WLuHcSsu8hMMwMY9KwhDK3PPlKICUX//6sPXCKJS1PaLKTQEEk88361AG+JyPZgVjpnq 8We0KQ7LrzHDiABee2KbZ3YILTUaC17GCNBvK8sJAL+y6+iHL2lfCcl6RDF+uRMRTPUn jv7A65UuTU0RwlacLIHkgIxzT5KWtonvzjz5XB02yPHSlumFcfn1EUebipGuTuij0YT9 g99Q+Esf9a2t/Z2AOu/kFnWZJSDjOd3+pxarqBoVwVHTCj+PClXkL8Rr6x2iFTGfvRne XJLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=iSfB6CFrLnDJogdTTq89EiJJa3m0+y1c9gv1TDJFjvg=; b=BnkObWBm94T1lUFdFQZ1iS/u688bCR8JqkR37o09b+ccTz4tYlG0ZUWOlRdHy6e5bi goCO/t29S/XGIIdn9i4tiTFBg0fte+NjKm+J8yqZBWj4aIksQTIDhAMHK/5tewCgH68m 2NMn8b7nTlfcD4pHbAqesODtdb/C0Bg++M6hy7ubtWegMSyMDjTaXQfb8WiX3kakPVn1 2wwvbQoTgYrANQdUMHMn3l0ysaZtzlq+Bj+dZKiJP5Fng/XLmqSs5RKa9x+ET5+Riva1 X05VNvbJqR6Se62UCpTWig/d/XnGQlkdYZQfgX206pNLnAiJYmanitT7cXcY9erFzVUt 0XPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=JHDyZb31; 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=quicinc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ji3-20020a170907980300b0078e254ae419si24677728ejc.643.2022.10.21.14.22.40; Fri, 21 Oct 2022 14:23:08 -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=@quicinc.com header.s=qcppdkim1 header.b=JHDyZb31; 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=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230245AbiJUVTy (ORCPT + 99 others); Fri, 21 Oct 2022 17:19:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230220AbiJUVT3 (ORCPT ); Fri, 21 Oct 2022 17:19:29 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 111CE2A4E1A for ; Fri, 21 Oct 2022 14:18:56 -0700 (PDT) Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 29LIiS0M031107; Fri, 21 Oct 2022 21:18:22 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=qcppdkim1; bh=iSfB6CFrLnDJogdTTq89EiJJa3m0+y1c9gv1TDJFjvg=; b=JHDyZb31TRFwJzdoXbQXrP1FzKU9SGL3XasmDj1LWEohW/gxyx8D9GhpTMN6zp/a+BS4 qiUnClpQR2mGie5UHapHJPnRu6OgapmswPbm5WFYVXAqV9hRLwDqL+qEO+4LLMXuP1RT l0lrJp3wlW64mkZF0stWOCe8A6lMxNPxpeOUnJ04j1j+2L+ujeTf7QxwI9zBxHoA0HD6 yL4/pcytlnd0RsweU1HnV9w7LXoqg/jh1xcLqqESWa4ZJITfvN2RgCN1jteMWjgsYjt9 HpFXb2Kv3TuHZ1PqI8sNpCnFDVscPvriW8VBYg15Jh0YqNQoe0iar0J3QpmTw9/zBN2j bA== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3kb2c653y8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 21 Oct 2022 21:18:22 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 29LLIKKt012378 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 21 Oct 2022 21:18:20 GMT Received: from [10.111.175.17] (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.29; Fri, 21 Oct 2022 14:18:18 -0700 Message-ID: Date: Fri, 21 Oct 2022 14:18:16 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.2 Subject: Re: [PATCH] drm/edid: Dump the EDID when drm_edid_get_panel_id() has an error Content-Language: en-US To: Douglas Anderson , CC: Kuogee Hsieh , Stephen Boyd , Daniel Vetter , David Airlie , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , References: <20221021130637.1.I8c2de0954a4e54e0c59a72938268e2ead91daa98@changeid> From: Abhinav Kumar In-Reply-To: <20221021130637.1.I8c2de0954a4e54e0c59a72938268e2ead91daa98@changeid> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: sHNLh55rX_DR4gs-fYbux6RV15qG-tpi X-Proofpoint-ORIG-GUID: sHNLh55rX_DR4gs-fYbux6RV15qG-tpi X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-10-21_04,2022-10-21_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 adultscore=0 clxscore=1011 impostorscore=0 bulkscore=0 malwarescore=0 lowpriorityscore=0 spamscore=0 priorityscore=1501 mlxlogscore=729 phishscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2209130000 definitions=main-2210210124 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 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. > --- > > drivers/gpu/drm/drm_edid.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c > index 47465b9765f1..d63e26ec88b1 100644 > --- a/drivers/gpu/drm/drm_edid.c > +++ b/drivers/gpu/drm/drm_edid.c > @@ -2721,6 +2721,8 @@ u32 drm_edid_get_panel_id(struct i2c_adapter *adapter) > > if (edid_block_status_valid(status, edid_block_tag(base_block))) > panel_id = edid_extract_panel_id(base_block); > + else > + edid_block_dump(KERN_NOTICE, base_block, 0); > > kfree(base_block); >