Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp31198418rwd; Thu, 6 Jul 2023 17:44:42 -0700 (PDT) X-Google-Smtp-Source: APBJJlE/LMb0GHkSAEo1aK/I6UE7Lxe/PQKdOiEsxD11tJDT3JLOHDKIk1D+bTddvjxYY9b7V/aE X-Received: by 2002:a92:c083:0:b0:345:ba42:ca4d with SMTP id h3-20020a92c083000000b00345ba42ca4dmr3721686ile.15.1688690682249; Thu, 06 Jul 2023 17:44:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688690682; cv=none; d=google.com; s=arc-20160816; b=oKMKUjgwxv7BEdJgNo1Mr5+9+QKF6oR4WKzqr7JEFUW9rLmO9pVNik4ege0iAyhcW8 aFvM7Pw3/KICGgyt2HVyPU7hhG8/BCHWk8jtN1fAVZQd/RCehSe8ppGfReJWbbt85Wdb QxK8cUis4uQ26B9plWT92whcMPcN79XeYRHM5XT6Oa8vQLiQlhTjoifu9zZrKbua87A0 QrEF7O2KvQl9P7rD3Gfr6C2saEsrdpUCFUO+QFmWsfLnMTYMZOsdyKJHahJjUBem9B65 /ZB86ybCkVUuOT8+Mt345DRrMWAulyCssjaljnWT4Nqb006fFxwT1Q2/6FPitdfCeV9c 1bmg== 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=kxvgPzsFvGX8avhPmRuzYJwFbJe7rjLQqPu0thkKOHc=; fh=2d+G/g3iWYcWRkwjwDqGUN7IXUINX0tMGr+Zvr48fEg=; b=vSTLOa/KtaNoME5StXWJ7xPvAF4FEFH/E8mqmUf04HGbcJya/aOXLBIJYw5TPG+lDk TVVkhp/VHrIYU0170nIVmfla0SxRMuMO3x/VDBDiUZbKgjqjyPdMOox1teHGrqchW7wo oJ4lirGwYV1S0W2gOgKoQw7mfhP09p+s7XzGJ/HwZFLL+zsB3PidqRQAGHGNz3ksbh54 0MgltHx22WIv38GEEkime1pSRzO/ojAC+4iEZC7kmERdpmR3xNg++K4USxWtdg1Q77lY evMZR8oLKRbhVpf6uZjRibWyHvV1L4mlxhIu7DdIEmw0Oh/o2IB+7FR8zj2CCjRa/FDT /B6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="dpC/ryUw"; 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 a21-20020a63e855000000b00543cba6043asi2593919pgk.151.2023.07.06.17.44.29; Thu, 06 Jul 2023 17:44:42 -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="dpC/ryUw"; 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 S230079AbjGGARM (ORCPT + 99 others); Thu, 6 Jul 2023 20:17:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53118 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229506AbjGGARL (ORCPT ); Thu, 6 Jul 2023 20:17:11 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA96E1737; Thu, 6 Jul 2023 17:17:09 -0700 (PDT) Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 366NJv67004004; Fri, 7 Jul 2023 00:16:58 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=kxvgPzsFvGX8avhPmRuzYJwFbJe7rjLQqPu0thkKOHc=; b=dpC/ryUwQEzh5c+antJ4jl6oci5GhWDbzDvon8W3hy9f3QUmWf0hd6h+XaRzqyTkONM0 AdZFQHdOpwEnACsDYxMkDziQ1DzFyCzEAx5AP5RVBdicnLcwtBfJi0Z+d8IWhSE1hsBf L6UA3ARD3u+iKMoGRo6R2IDRuJG5+xTPZAkqhvCSeo+e62j/wvxZJL9fw3cLCH4gL1PT UOOdtRBnHDMDX+l2ErLro/197kJDuLdp8dfbd4qYDwjsUPF0KNX3TFmRKHREFBHHq61g gIm4Koupavtr+qMve+jp97kkrlY/YznhRCyiJwF1bq0kGM7DVunuSwmZP+5TRFCGeu4A Nw== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3rp71y82t9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 07 Jul 2023 00:16:58 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 3670GvvN009841 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 7 Jul 2023 00:16:57 GMT Received: from [10.134.70.142] (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.1118.30; Thu, 6 Jul 2023 17:16:57 -0700 Message-ID: Date: Thu, 6 Jul 2023 17:16:56 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH v4 5/6] drm/msm/dpu: Refactor printing of main blocks in device core dump Content-Language: en-US To: Dmitry Baryshkov , Ryan McCann , Rob Clark , Sean Paul , Marijn Suijten , "David Airlie" , Daniel Vetter CC: Rob Clark , , , , , References: <20230622-devcoredump_patch-v4-0-e304ddbe9648@quicinc.com> <20230622-devcoredump_patch-v4-5-e304ddbe9648@quicinc.com> From: Abhinav Kumar In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) 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: _f1rCvP1-NuH3z7q7uLgIzNaXOa3cVxG X-Proofpoint-ORIG-GUID: _f1rCvP1-NuH3z7q7uLgIzNaXOa3cVxG X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-07-06_17,2023-07-06_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 suspectscore=0 bulkscore=0 mlxlogscore=999 clxscore=1015 malwarescore=0 lowpriorityscore=0 phishscore=0 impostorscore=0 priorityscore=1501 spamscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2305260000 definitions=main-2307070000 X-Spam-Status: No, score=-2.9 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,T_SCC_BODY_TEXT_LINE,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 On 7/6/2023 5:07 PM, Dmitry Baryshkov wrote: > On 06/07/2023 23:48, Ryan McCann wrote: >> Currently, the names of main blocks are hardcoded into the >> msm_disp_snapshot_add_block function rather than using the name that >> already exists in the catalog. Change this to take the name directly from >> the catalog instead of hardcoding it. >> >> Signed-off-by: Ryan McCann >> --- >>   drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 32 >> ++++++++++++++++---------------- >>   1 file changed, 16 insertions(+), 16 deletions(-) >> >> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c >> b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c >> index aa8499de1b9f..70dbb1204e6c 100644 >> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c >> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c >> @@ -899,38 +899,38 @@ static void dpu_kms_mdp_snapshot(struct >> msm_disp_state *disp_state, struct msm_k >>       /* dump CTL sub-blocks HW regs info */ >>       for (i = 0; i < cat->ctl_count; i++) >> -        msm_disp_snapshot_add_block(disp_state, cat->ctl[i].len, >> -                dpu_kms->mmio + cat->ctl[i].base, "ctl_%d", i); >> +        msm_disp_snapshot_add_block(disp_state, cat->ctl[i].len, >> dpu_kms->mmio + >> +                        cat->ctl[i].base, cat->ctl[i].name); > > Splitting on the `+' sign is a bad idea. It makes it harder to read the > code. Please keep the first line as is, it is perfectly fine on its own, > and do just what you have stated in the commit message: change printed > block name. > Actually, I asked Ryan to fix the indent here in the same patch as he was touching this code anyway. So you would prefer thats left untouched? >>       /* dump DSPP sub-blocks HW regs info */ >>       for (i = 0; i < cat->dspp_count; i++) >> -        msm_disp_snapshot_add_block(disp_state, cat->dspp[i].len, >> -                dpu_kms->mmio + cat->dspp[i].base, "dspp_%d", i); >> +        msm_disp_snapshot_add_block(disp_state, cat->dspp[i].len, >> dpu_kms->mmio + >> +                        cat->dspp[i].base, cat->dspp[i].name); >>       /* dump INTF sub-blocks HW regs info */ >>       for (i = 0; i < cat->intf_count; i++) >> -        msm_disp_snapshot_add_block(disp_state, cat->intf[i].len, >> -                dpu_kms->mmio + cat->intf[i].base, "intf_%d", i); >> +        msm_disp_snapshot_add_block(disp_state, cat->intf[i].len, >> dpu_kms->mmio + >> +                        cat->intf[i].base, cat->intf[i].name); >>       /* dump PP sub-blocks HW regs info */ >>       for (i = 0; i < cat->pingpong_count; i++) >> -        msm_disp_snapshot_add_block(disp_state, cat->pingpong[i].len, >> -                dpu_kms->mmio + cat->pingpong[i].base, "pingpong_%d", >> i); >> +        msm_disp_snapshot_add_block(disp_state, cat->pingpong[i].len, >> dpu_kms->mmio + >> +                        cat->pingpong[i].base, cat->pingpong[i].name); >>       /* dump SSPP sub-blocks HW regs info */ >>       for (i = 0; i < cat->sspp_count; i++) >> -        msm_disp_snapshot_add_block(disp_state, cat->sspp[i].len, >> -                dpu_kms->mmio + cat->sspp[i].base, "sspp_%d", i); >> +        msm_disp_snapshot_add_block(disp_state, cat->sspp[i].len, >> dpu_kms->mmio + >> +                        cat->sspp[i].base, cat->sspp[i].name); >>       /* dump LM sub-blocks HW regs info */ >>       for (i = 0; i < cat->mixer_count; i++) >> -        msm_disp_snapshot_add_block(disp_state, cat->mixer[i].len, >> -                dpu_kms->mmio + cat->mixer[i].base, "lm_%d", i); >> +        msm_disp_snapshot_add_block(disp_state, cat->mixer[i].len, >> dpu_kms->mmio + >> +                        cat->mixer[i].base, cat->mixer[i].name); >>       /* dump WB sub-blocks HW regs info */ >>       for (i = 0; i < cat->wb_count; i++) >> -        msm_disp_snapshot_add_block(disp_state, cat->wb[i].len, >> -                dpu_kms->mmio + cat->wb[i].base, "wb_%d", i); >> +        msm_disp_snapshot_add_block(disp_state, cat->wb[i].len, >> dpu_kms->mmio + >> +                        cat->wb[i].base, cat->wb[i].name); >>       if (cat->mdp[0].features & BIT(DPU_MDP_PERIPH_0_REMOVED)) { >>           msm_disp_snapshot_add_block(disp_state, MDP_PERIPH_TOP0, >> @@ -944,8 +944,8 @@ static void dpu_kms_mdp_snapshot(struct >> msm_disp_state *disp_state, struct msm_k >>       /* dump DSC sub-blocks HW regs info */ >>       for (i = 0; i < cat->dsc_count; i++) >> -        msm_disp_snapshot_add_block(disp_state, cat->dsc[i].len, >> -                dpu_kms->mmio + cat->dsc[i].base, "dsc_%d", i); >> +        msm_disp_snapshot_add_block(disp_state, cat->dsc[i].len, >> dpu_kms->mmio + >> +                        cat->dsc[i].base, cat->dsc[i].name); >>       pm_runtime_put_sync(&dpu_kms->pdev->dev); >>   } >> >