From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 02677C3A59D for ; Fri, 21 Oct 2022 21:19:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230248AbiJUVT4 (ORCPT ); Fri, 21 Oct 2022 17:19:56 -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 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); >