From patchwork Fri Apr 21 20:53:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marijn Suijten X-Patchwork-Id: 8549 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1337293vqo; Fri, 21 Apr 2023 13:57:56 -0700 (PDT) X-Google-Smtp-Source: AKy350Zgmie9WXh5kSJ4wRl3jSDaFKC3XfJwiQLvXdcSfNed3qP3PWl3+GhEhxG6/HNfff2XwYLX X-Received: by 2002:a05:6a00:1396:b0:63d:24d0:2c32 with SMTP id t22-20020a056a00139600b0063d24d02c32mr8574682pfg.33.1682110675993; Fri, 21 Apr 2023 13:57:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682110675; cv=none; d=google.com; s=arc-20160816; b=Fzq07jB3YUPus+Vz5m4aEdDZ5px5hSzKDFVrLbQ+XoLhyNJ4hce3j/mqqSxS9xUn87 +5LyLEoLK98MmU2i2Q5q5CKSonmcu1UVhShZCUBt2p9uAk6jHAdZ90qPchquigBLCtp/ ilh9Ua/OSkIXmhWU9IWMbR6FR6IIDc7f8HuXkPYhZy76Jnfn/fMUSgW8+44u4EhIx+3+ EqKgCF2YO2giy75JF49T7l0OM8c1q9C7T/AQdmyxa9JdsZSoKM3ZtXa9g0sRQV4d6Ryu VpAG+th7t6mNCEek9ijy936tZe4Ubq5ZiybnryC5rKE+Jx6SZD4x0dk+/NnyxoVL8Cos E0NA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:content-transfer-encoding:mime-version :message-id:date:subject:from; bh=kH8ToK2h2J45tDTasj80cCOFerLaD/WgYhUPBIh3NkM=; b=sACb1q+dTci6yl7ld277zvg8qq88t9KScHMQu+pNjj8D01fYec849OAq6S0fJyiFSn 9uuaxweO+vPez0f8WADmD+zsEWUyStKIe2kxSm49/W0CM1+fNFOrkOLssUWSfAbJvTy2 ML9qcGr2cTU+CVdMeykWntNySkSqm4du8sDlrXNcKMlUTP6JZ5ObT4QrfXGhLlbwLrT0 B5YkNIiNTErBAKRl5/PNYr9skjk0J1OKl7sW0DUlyozKvODi+XBdp8WLKsWVZsrgMtLr VCibr0DHDn1q+nRUEz5LqSSycYIItqwNGGa/4rhAMKhDCDctoGyfh0c0y+Ls6sPkKsdb 4pew== ARC-Authentication-Results: i=1; mx.google.com; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g20-20020aa796b4000000b0063b509f1261si5471027pfk.98.2023.04.21.13.57.43; Fri, 21 Apr 2023 13:57:55 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232225AbjDUUyH (ORCPT + 99 others); Fri, 21 Apr 2023 16:54:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43396 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229543AbjDUUyG (ORCPT ); Fri, 21 Apr 2023 16:54:06 -0400 Received: from relay06.th.seeweb.it (relay06.th.seeweb.it [5.144.164.167]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E26071723 for ; Fri, 21 Apr 2023 13:54:03 -0700 (PDT) Received: from Marijn-Arch-PC.localdomain (94-211-6-86.cable.dynamic.v4.ziggo.nl [94.211.6.86]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by m-r2.th.seeweb.it (Postfix) with ESMTPSA id C8C083F5AC; Fri, 21 Apr 2023 22:53:59 +0200 (CEST) From: Marijn Suijten Subject: [PATCH v2 0/3] drm/msm/dpu: Drop useless for-loop HW block lookup Date: Fri, 21 Apr 2023 22:53:50 +0200 Message-Id: <20230418-dpu-drop-useless-for-lookup-v2-0-acb08e82ef19@somainline.org> MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIAN73QmQC/42OTQ6CMBBGr0K6dkz5CRRX3sOwKGWAxto2M5ZoC He3egKX7y2+9+2CkSyyuBS7INws2+AzVKdCmFX7BcFOmUUlq1o2pYIpJpgoREiMDplhDgQuhHu K0CjVSWk63bS9yAujZoSRtDdr3vDJuSwj4Wxfv+RtyLxafgZ6/x5s5df+F9tKkDD2qu8Mju1c4 5XDQ1vvrMdzoEUMx3F8AIjXsnLgAAAA To: Rob Clark , Abhinav Kumar , Dmitry Baryshkov , Sean Paul , David Airlie , Daniel Vetter Cc: ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno , Konrad Dybcio , Martin Botka , Jami Kettunen , Jordan Crouse , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org, Marijn Suijten X-Mailer: b4 0.12.2 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1763820884323350669?= X-GMAIL-MSGID: =?utf-8?q?1763820884323350669?= Doing a for loop in every DPU HW block driver init to find a catalog entry matching the given ID is rather useless if the init function called by RM already has that catalog entry pointer, and uses exactly its ID to drive this init and for loop. Remove all that machinery to drop quite some lines of unnecessarily-complicated code, and the fallibility that comes with it, by simply giving _init() the catalog entry pointers straight away. Also clean up some unused struct members, and assign a log_mask for WB. --- Changes in v2: - Replace "sysfs" with "debugfs" in patch 2/3 description; - Reorder WB log_mask fix as patch 1; - Drop Fixes: tags from "unused struct members removal"; - Replace dpu_mdss_cfg parameter in dpu_hw_sspp_init() with immediate dpu_ubwc_cfg pointer; - Replace dpu_mdss_cfg parameter in dpu_hw_ctl_init() with immediate dpu_lm_cfg array pointer. v1: https://lore.kernel.org/r/20230418-dpu-drop-useless-for-lookup-v1-0-b9897ceb6f3e@somainline.org --- Marijn Suijten (3): drm/msm/dpu: Assign missing writeback log_mask drm/msm/dpu: Drop unused members from HW structs drm/msm/dpu: Pass catalog pointers directly from RM instead of IDs drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c | 37 +++++--------------- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.h | 14 ++++---- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dsc.c | 32 +++--------------- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dsc.h | 11 +++--- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dspp.c | 38 ++++----------------- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dspp.h | 12 +++---- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.h | 2 +- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.c | 41 ++++++----------------- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.h | 13 +++---- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.c | 38 ++++----------------- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.h | 10 +++--- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_merge3d.c | 33 +++--------------- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_merge3d.h | 14 ++++---- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.c | 33 +++--------------- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.h | 14 ++++---- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c | 40 ++++------------------ drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.h | 14 ++++---- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_vbif.c | 33 +++--------------- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_vbif.h | 11 +++--- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_wb.c | 33 ++++-------------- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_wb.h | 16 +++------ drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 17 +++++----- drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c | 18 +++++----- 23 files changed, 139 insertions(+), 385 deletions(-) --- base-commit: 44bf136283e567b2b62653be7630e7511da41da2 change-id: 20230418-dpu-drop-useless-for-lookup-488700c7a469 Best regards,