Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp9229rwr; Tue, 25 Apr 2023 16:39:29 -0700 (PDT) X-Google-Smtp-Source: AKy350ajKCRfx7k0641RStiFhrQFQ8PXOzg1XKNPWIO3V9zwSPDKUtNl1LLbmj8CEQRbx/isoJYh X-Received: by 2002:a17:90a:5890:b0:246:7040:a0a7 with SMTP id j16-20020a17090a589000b002467040a0a7mr18263947pji.47.1682465969012; Tue, 25 Apr 2023 16:39:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682465968; cv=none; d=google.com; s=arc-20160816; b=A1RAVUWeDCxdSYcUAS+Rz+OBwmZXYMgtnoeD+tBHQVn26dDkCZ28JyqyT/l8Ngc5QM qGhHVxm42uO9oqs6i0emrJZwJoBEbFJ2RHwenJqKjnNWiNVP27GIZQ2ngJ5y+nCdDpu1 AUaXSKwlcbHDanPKXCDGYyI/k6pIdlkfVsvSMrG59wbmWPCduqlFK0eOELKOj6VvLZsS 3lKqftJyRbeVj7WUbD0mzAy9eUVBAMsqCQVGJ5GwFrCN0GPkJSPj+y3lpGUWk6NmPro1 LXiEgOR83pKTsZwyBGd9ItqSZbxcTmRCi3KQavt7wctjNCNmbtTAiQAhX7gEVKztFNAz BWvw== 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=tX92E9Iyqg0J7zCEkUpAnPyHUWKi2Mm0CO/OJjj2uzM=; b=QAVIC909e4vvaIZQunf3VokLEl0JewvgppsjCAp0tiTPQG8Y0oTy5+oEeP49umBpoZ UNKlmnj/SAT24jXDvFzKw7kS2Vr1MBkLqel9t3U3w6MkHOCeCuJftu7L06dFT8TWPOeo RDyliyGF/mpIqzMQYnxAcFP8MPQsZoO/r1oC+B6G101pNql+ulcZoktMj9EmIJSu+ZRv G5l/nVqk5EWJSoaPo0bxDjpszE3SRxmPzPNcdt2wtvfNLKHgF4cpnDbgXCA7e6U8Yy2t A4CrcPJivsQYyXWcR31fhyEHLWtWPIb0gr/1nO3HBSyLcgAlYlH8mYf9XwxqHumrWvfS ne7A== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ls4-20020a17090b350400b0024988ecf25bsi19339883pjb.86.2023.04.25.16.39.15; Tue, 25 Apr 2023 16:39:28 -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 S236351AbjDYXL7 (ORCPT + 99 others); Tue, 25 Apr 2023 19:11:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41338 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232704AbjDYXL6 (ORCPT ); Tue, 25 Apr 2023 19:11:58 -0400 Received: from relay01.th.seeweb.it (relay01.th.seeweb.it [IPv6:2001:4b7a:2000:18::162]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F216817DE9 for ; Tue, 25 Apr 2023 16:11:29 -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-r1.th.seeweb.it (Postfix) with ESMTPSA id 16EA21F887; Wed, 26 Apr 2023 01:11:09 +0200 (CEST) From: Marijn Suijten Subject: [PATCH v3 0/3] drm/msm/dpu: Drop useless for-loop HW block lookup Date: Wed, 26 Apr 2023 01:11:08 +0200 Message-Id: <20230418-dpu-drop-useless-for-lookup-v3-0-e8d869eea455@somainline.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAAxeSGQC/5XOQQ6CMBQE0KuYrv2mFALFlfcwLtrygcbaNv1CN IS7W9i60eXM4s0sjDBZJHY+LCzhbMkGn0N5PDAzKj8g2C5nJrgoeVVI6OIEXQoRJkKHRNCHBC6 E+xShkrLh3DSqqluWBa0IQSflzZgNPzmXy5iwt6998nrLebT0DOm9P5iLrf1tbC6Ag25l2xjUd V/ihcJDWe+sx1NIA9vwWfwBigwqo7lEKbAv2i9wXdcPk2c08zEBAAA= 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, Jessica Zhang , Marijn Suijten X-Mailer: b4 0.12.2 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,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 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 v3: - Return NULL from dpu_hw_intf_init() on INTF_NONE, and omit identical check in dpu_rm_init(); - Retitle patch 3/3. v2: https://lore.kernel.org/r/20230418-dpu-drop-useless-for-lookup-v2-0-acb08e82ef19@somainline.org 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 in RM to replace for-loop ID lookups 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 | 22 +++++------- 23 files changed, 139 insertions(+), 389 deletions(-) --- base-commit: f600e0bbde8562a06bee31b3eb1b69d49acac4c5 change-id: 20230418-dpu-drop-useless-for-lookup-488700c7a469 Best regards, -- Marijn Suijten