From patchwork Wed Jan 5 23:26:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 530178 Delivered-To: patch@linaro.org Received: by 2002:ad5:544f:0:0:0:0:0 with SMTP id a15csp708545imp; Wed, 5 Jan 2022 15:27:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJwQs4xUddQCUo8/CnnqG1CKiwKtieJNGO8eOWByEBG/QcNc0A+75tO/tHoDv3ZZkCIylmn0 X-Received: by 2002:a63:69c7:: with SMTP id e190mr50580792pgc.440.1641425228365; Wed, 05 Jan 2022 15:27:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1641425228; cv=none; d=google.com; s=arc-20160816; b=gwKbJiA1tIlgqUH/KWk3Q0YHuali+LfEzsfFXwbDoODPUKFrhRqSA8sFE1Inh9CzBE MSSUoCzftws3Lqsh64PYMQeuHVKsKIjHlGmBoQzAOAsUxkR+16Upz0Fs7d8OXf1A5laf q6rUeAgLfQzOaflpyhiGSLvEuc2tDIAVZ88Skqbj976/36VvHqDKBCU6o9DoPEudKybX WuI7b+ZY0ullm4ji4XHp/DBdIC0Yg0O+LF9RbI2o0dyIsXb5vnmcsT3MnHyE6wyij3vh itOtXg6/KDkd6/43FncZym1tMNWmCNfSL8y0D35c/UzMAnRqrkR89N9tT9Lj6vppWo5b /OpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:to:from:dkim-signature :delivered-to; bh=RQh0W27z9Rv8021nYV+r9aQSz9qOZHpHoOU5e94BJ0c=; b=XYRhl+qWBeSZ6m7XYYADPr6L1+9LywiROlun7VRYbwbsnuK6UAK+i1+kdV4FQjGRcB AiAIiMz1bI+Z3sYamZAW91pc6TZF/QMYTPUMUNp4sulR/eW3xmDG80hV6cG+lXoEd0M8 zatweMazce7g7JvtK4V6JtCbKyArxYMgWEkordvfuNaP/9jpiUujra7ctx1giWkzUW9D uPho55SIPmy6jbuFtX3d48LWES3rM32P8L8KKwTfS46qmCJNsxLJkKZ00QlIMVseFt+S MRVS7tc54JzSkalf/mGQNd0C0HqbNsoKaifWepEqKouDWM/r1SS2Q6QR4dBRei58lEc2 WKqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=WmXDkjdu; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [2610:10:20:722:a800:ff:fe36:1795]) by mx.google.com with ESMTPS id j2si414742pfc.230.2022.01.05.15.27.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jan 2022 15:27:08 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) client-ip=2610:10:20:722:a800:ff:fe36:1795; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=WmXDkjdu; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7A6F810E430; Wed, 5 Jan 2022 23:27:04 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lj1-x22a.google.com (mail-lj1-x22a.google.com [IPv6:2a00:1450:4864:20::22a]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7038810E425 for ; Wed, 5 Jan 2022 23:27:03 +0000 (UTC) Received: by mail-lj1-x22a.google.com with SMTP id q8so1275413ljp.9 for ; Wed, 05 Jan 2022 15:27:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=RQh0W27z9Rv8021nYV+r9aQSz9qOZHpHoOU5e94BJ0c=; b=WmXDkjduVnMsUHg2LOv65HvhWzePdCIECoq3lazikJl7anZYZaokQ839BsCpFkGfvq 3y9hMxtHV/ytT1WK5xnTTY4V+gPY3mx02MxNLqpMneQbARuampSNif3rlS3ldokxsG1l VUwLH6bY5gMmfGetALw+MeqBjj1WEmZxb4lTr3aqk4Djru+VAWAiVs9l80VyUGcGu5UM pRV+R3Rop1CacCnsBq1s7+frZCkGRWep89Re3RDw7b0MI6ip3lZGTdYcIfOLa/etIZGO 0eLPg67lt2uX/2+yuNqfxCjkGrJ7mVK/xI9rfwq8yFwMh0q4KB+R0ab8EChvn3DONSou xnbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=RQh0W27z9Rv8021nYV+r9aQSz9qOZHpHoOU5e94BJ0c=; b=rowWT/Z0EC/csaG+WkzUJneaR0Bm86qdqhnGz7rGfYGAxUHU2lIzSuIpD0xUY6IV4B LeygCa7cpRpU2Z+RTXbQGpFSsmxtS0TGdApZVCpN4Vq1HXtwsVkFRtWCYBx0xSqqv10w XnA1lLVV3bQOtLgRUpvMT8+kmp4idv0XDgDVOGkSJ0omvIPmGA32D1gi53eWY9p5FbIs x9yG9GJ59sdNloq+octAU9/E0slWS3B/0L53DNOyXtsKvn1aKSh5/8Ot3lPCCaQo1JtO UDuBzoyJwy7tV4I2aKHSqPnhPPezjbjqi9r5V7qGd1X8HdnhsDHNgALoSqChl53QAgwZ 6uKw== X-Gm-Message-State: AOAM533Mg2MvySllKYLDFaUjkGQOzaPTtDClhNBBOp49zmD3+h+oshfR g1u97EvD7WwmdI1eoedFUJ2KHA== X-Received: by 2002:a2e:9788:: with SMTP id y8mr44792149lji.135.1641425221796; Wed, 05 Jan 2022 15:27:01 -0800 (PST) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id b29sm28730lfv.187.2022.01.05.15.27.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jan 2022 15:27:01 -0800 (PST) From: Dmitry Baryshkov To: Bjorn Andersson , Rob Clark , Sean Paul , Abhinav Kumar Subject: [PATCH v2 1/3] drm/msm: drop register logging support Date: Thu, 6 Jan 2022 02:26:58 +0300 Message-Id: <20220105232700.444170-1-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Airlie , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, Stephen Boyd , freedreno@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Register logging was used during early stages of msm driver development to compare upstream and downstream register traces. However the tool was never updated to work with mdp5 hardware. Later it was dropped completely when Rob imported freedreno tools into mesa. All this makes DRM_MSM_REGISTER_LOGGING irrelevant now, so it can be dropped. Signed-off-by: Dmitry Baryshkov Reviewed-by: Stephen Boyd --- drivers/gpu/drm/msm/Kconfig | 9 --------- drivers/gpu/drm/msm/msm_drv.c | 16 +--------------- 2 files changed, 1 insertion(+), 24 deletions(-) diff --git a/drivers/gpu/drm/msm/Kconfig b/drivers/gpu/drm/msm/Kconfig index 1eae5a9645f4..9b019598e042 100644 --- a/drivers/gpu/drm/msm/Kconfig +++ b/drivers/gpu/drm/msm/Kconfig @@ -33,15 +33,6 @@ config DRM_MSM_GPU_STATE depends on DRM_MSM && (DEBUG_FS || DEV_COREDUMP) default y -config DRM_MSM_REGISTER_LOGGING - bool "MSM DRM register logging" - depends on DRM_MSM - default n - help - Compile in support for logging register reads/writes in a format - that can be parsed by envytools demsm tool. If enabled, register - logging can be switched on via msm.reglog=y module param. - config DRM_MSM_GPU_SUDO bool "Enable SUDO flag on submits" depends on DRM_MSM && EXPERT diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c index ad35a5d94053..cfc9a0c9ec39 100644 --- a/drivers/gpu/drm/msm/msm_drv.c +++ b/drivers/gpu/drm/msm/msm_drv.c @@ -57,14 +57,6 @@ static const struct drm_mode_config_helper_funcs mode_config_helper_funcs = { .atomic_commit_tail = msm_atomic_commit_tail, }; -#ifdef CONFIG_DRM_MSM_REGISTER_LOGGING -static bool reglog; -MODULE_PARM_DESC(reglog, "Enable register read/write logging"); -module_param(reglog, bool, 0600); -#else -#define reglog 0 -#endif - #ifdef CONFIG_DRM_FBDEV_EMULATION static bool fbdev = true; MODULE_PARM_DESC(fbdev, "Enable fbdev compat layer"); @@ -150,9 +142,6 @@ static void __iomem *_msm_ioremap(struct platform_device *pdev, const char *name return ERR_PTR(-ENOMEM); } - if (reglog) - printk(KERN_DEBUG "IO:region %s %p %08lx\n", dbgname, ptr, size); - if (psize) *psize = size; @@ -179,16 +168,13 @@ void __iomem *msm_ioremap_size(struct platform_device *pdev, const char *name, void msm_writel(u32 data, void __iomem *addr) { - if (reglog) - printk(KERN_DEBUG "IO:W %p %08x\n", addr, data); writel(data, addr); } u32 msm_readl(const void __iomem *addr) { u32 val = readl(addr); - if (reglog) - pr_err("IO:R %p %08x\n", addr, val); + return val; } From patchwork Wed Jan 5 23:26:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 530179 Delivered-To: patch@linaro.org Received: by 2002:ad5:544f:0:0:0:0:0 with SMTP id a15csp708591imp; Wed, 5 Jan 2022 15:27:12 -0800 (PST) X-Google-Smtp-Source: ABdhPJwxFPssydEQ4pIN/wcQT6tp594SREh+tdiKiCWqFWz6f4kRCIEMHoUNxx37CPPSOVgGYzgz X-Received: by 2002:a17:903:31c8:b0:149:a463:ad38 with SMTP id v8-20020a17090331c800b00149a463ad38mr29150216ple.76.1641425232292; Wed, 05 Jan 2022 15:27:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1641425232; cv=none; d=google.com; s=arc-20160816; b=owCZ/f4VoxR70eHFhpMWModjbv8Rt6dWxs4cTV7bsi2QOKkr3+2adXHdk/TwAmy22A N+PEYnUf6ELeRyoL/RcZkHXyMVGpqXTfsKKVHsE/UNdcrtTcVcRZjZakAG/ylonYiu0G J/022DcvIZa2U2wL4+ifsvuvd7hmvyPGK/jqoD1t0T80rZw7JTjZHF8qC94msnmA4iqJ FmSN3RT/SwAhRYiKUqgKCw+/TH+rqNgzCNSLZV+uQxszgdpA1IqjFoWZme3GTJ/5LNBr ksjjAYLI4bCFWrMhDUEu6Ayr+BqxmgcE1vW8rEorDZgJb7dcKKXpb8FW30HHeqC1SBwr YnGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature:delivered-to; bh=Q/lNQpO8J6HtzO50Tnj82DDUqvCBIgebMnS3uAWMrpY=; b=k6WL06b427M/PY8TuW36otLFhikmgxl/OwybVXcT+YRNksh4jkixR1jVQcMpdAPZ3B 1Rt5w5NCGnsTxqoA9oYlDDHnkD/OoWXpTY5QDuu2yH0wc3Y7gYhWVa56isGV9sIsLeYR 8d0vsKNUt6JVGqorHkGioJAqW7lUBGyvmx9i9km4rbY5QQKoO4epcHvOQDJ3mWNa7nTV cjdPFef7ZLYwasqPf2GD2dwEVjy+qvQ+4w4g9ISekiDgDp+9SEgB6/+oU1If+cSvBmsF yAW7ixG/etVJuivh52iNRXWv68POL23NlCx5qvAXrAqGUnIMnzBvhQwZkwp2zGXJLej6 Y+EQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=zBUDU3VX; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id my7si4186386pjb.179.2022.01.05.15.27.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jan 2022 15:27:12 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=zBUDU3VX; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CEE8C10E22A; Wed, 5 Jan 2022 23:27:05 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lj1-x22c.google.com (mail-lj1-x22c.google.com [IPv6:2a00:1450:4864:20::22c]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3E7D710E425 for ; Wed, 5 Jan 2022 23:27:04 +0000 (UTC) Received: by mail-lj1-x22c.google.com with SMTP id k27so1325776ljc.4 for ; Wed, 05 Jan 2022 15:27:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Q/lNQpO8J6HtzO50Tnj82DDUqvCBIgebMnS3uAWMrpY=; b=zBUDU3VXg3r126gFkB+mpwPN1NoHk59OTwuC6ydXqHmehR71cxojVAXljLZZR2cKIL cnSZY6Oafs2f4DLbenU/NZtSyPFluefpjcGeHFaducZarElvpp2XvUcCHosDbAGqaSp5 SiaeOVDWISQn7oiiE5f1aOKnCI5Ggy46fF2h95CD2Lpv5L74zOp802FyVc2hLjcqlV4y 23Vu/D6RhxUplsNVcbHBmCl3NN4knqzUur5V3FUIuVMEwVYLmTDMmFgANOMsL+K2yPwq nP+oyD/fDSMrd+weMrVwttblB7MqwY4gHm8xjma92gVwrvpQ+H0iGCN6LAQM2HlOXumq h2Mg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Q/lNQpO8J6HtzO50Tnj82DDUqvCBIgebMnS3uAWMrpY=; b=SZHocUWd8FWHid1kd8rk+HDzyJ/LQbmyPCpDQYT13MIneySVNE4heo+lyZIaqh/ECX keh/PtDBREHAVOidYCpQvpzIYLZu9rs6+EXBfXqV0nskQjOnXEu0Lia1NPSq2TtAtUNS bwCiddEIMYYGTEPiv8/OXwRwi0hWyWxzayNp1gU9x4Yz7kEFIKPjS3d4tnvQF7FQvLxi 6rHmQHMa2Hxqk1V5CZBeDuahS5lgYRhKJqVTGrtuuH8IXK6iRlifvg/QpHijszVUTBYH Gw4tYQKE9XF8yfq1qzztqmWdelcSaeDoMcDpw7WsR836w9RySNyToFlBafzjzf3+1NOf K3jg== X-Gm-Message-State: AOAM530HQDwozYtZqcXwYE4lNVn7h5PJ5459O3VDiBMcxoBff7oj3SUq EDGdMDD3nP/qOHanWcJQ3yyjgw== X-Received: by 2002:a2e:9915:: with SMTP id v21mr38981471lji.380.1641425222509; Wed, 05 Jan 2022 15:27:02 -0800 (PST) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id b29sm28730lfv.187.2022.01.05.15.27.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jan 2022 15:27:02 -0800 (PST) From: Dmitry Baryshkov To: Bjorn Andersson , Rob Clark , Sean Paul , Abhinav Kumar Subject: [PATCH v2 2/3] drm/msm: drop dbgname argument from msm_ioremap*() Date: Thu, 6 Jan 2022 02:26:59 +0300 Message-Id: <20220105232700.444170-2-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220105232700.444170-1-dmitry.baryshkov@linaro.org> References: <20220105232700.444170-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Airlie , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, Stephen Boyd , freedreno@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" msm_ioremap() functions take additional argument dbgname which is now unused. Signed-off-by: Dmitry Baryshkov Reviewed-by: Stephen Boyd --- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 2 +- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 8 ++++---- drivers/gpu/drm/msm/disp/dpu1/dpu_mdss.c | 2 +- drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c | 2 +- drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c | 2 +- drivers/gpu/drm/msm/disp/mdp5/mdp5_mdss.c | 4 ++-- drivers/gpu/drm/msm/dsi/dsi_host.c | 2 +- drivers/gpu/drm/msm/dsi/phy/dsi_phy.c | 8 ++++---- drivers/gpu/drm/msm/hdmi/hdmi.c | 5 ++--- drivers/gpu/drm/msm/hdmi/hdmi_phy.c | 2 +- drivers/gpu/drm/msm/hdmi/hdmi_phy_8996.c | 7 +++---- drivers/gpu/drm/msm/hdmi/hdmi_pll_8960.c | 2 +- drivers/gpu/drm/msm/msm_drv.c | 16 +++++++--------- drivers/gpu/drm/msm/msm_drv.h | 8 +++----- drivers/gpu/drm/msm/msm_gpu.c | 2 +- 15 files changed, 33 insertions(+), 39 deletions(-) diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c index 51b83776951b..5750a3af126d 100644 --- a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c +++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c @@ -1506,7 +1506,7 @@ static void a6xx_llc_slices_init(struct platform_device *pdev, if (a6xx_gpu->have_mmu500) a6xx_gpu->llc_mmio = NULL; else - a6xx_gpu->llc_mmio = msm_ioremap(pdev, "cx_mem", "gpu_cx"); + a6xx_gpu->llc_mmio = msm_ioremap(pdev, "cx_mem"); a6xx_gpu->llc_slice = llcc_slice_getd(LLCC_GPU); a6xx_gpu->htw_llc_slice = llcc_slice_getd(LLCC_GPUHTW); diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c index 47fe11a84a77..201c0e3082dd 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c @@ -1043,7 +1043,7 @@ static int dpu_kms_hw_init(struct msm_kms *kms) atomic_set(&dpu_kms->bandwidth_ref, 0); - dpu_kms->mmio = msm_ioremap(dpu_kms->pdev, "mdp", "mdp"); + dpu_kms->mmio = msm_ioremap(dpu_kms->pdev, "mdp"); if (IS_ERR(dpu_kms->mmio)) { rc = PTR_ERR(dpu_kms->mmio); DPU_ERROR("mdp register memory map failed: %d\n", rc); @@ -1052,20 +1052,20 @@ static int dpu_kms_hw_init(struct msm_kms *kms) } DRM_DEBUG("mapped dpu address space @%pK\n", dpu_kms->mmio); - dpu_kms->vbif[VBIF_RT] = msm_ioremap(dpu_kms->pdev, "vbif", "vbif"); + dpu_kms->vbif[VBIF_RT] = msm_ioremap(dpu_kms->pdev, "vbif"); if (IS_ERR(dpu_kms->vbif[VBIF_RT])) { rc = PTR_ERR(dpu_kms->vbif[VBIF_RT]); DPU_ERROR("vbif register memory map failed: %d\n", rc); dpu_kms->vbif[VBIF_RT] = NULL; goto error; } - dpu_kms->vbif[VBIF_NRT] = msm_ioremap_quiet(dpu_kms->pdev, "vbif_nrt", "vbif_nrt"); + dpu_kms->vbif[VBIF_NRT] = msm_ioremap_quiet(dpu_kms->pdev, "vbif_nrt"); if (IS_ERR(dpu_kms->vbif[VBIF_NRT])) { dpu_kms->vbif[VBIF_NRT] = NULL; DPU_DEBUG("VBIF NRT is not defined"); } - dpu_kms->reg_dma = msm_ioremap_quiet(dpu_kms->pdev, "regdma", "regdma"); + dpu_kms->reg_dma = msm_ioremap_quiet(dpu_kms->pdev, "regdma"); if (IS_ERR(dpu_kms->reg_dma)) { dpu_kms->reg_dma = NULL; DPU_DEBUG("REG_DMA is not defined"); diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_mdss.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_mdss.c index 131c1f1a869c..5bdb1504035c 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_mdss.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_mdss.c @@ -222,7 +222,7 @@ int dpu_mdss_init(struct platform_device *pdev) if (!dpu_mdss) return -ENOMEM; - dpu_mdss->mmio = msm_ioremap(pdev, "mdss", "mdss"); + dpu_mdss->mmio = msm_ioremap(pdev, "mdss"); if (IS_ERR(dpu_mdss->mmio)) return PTR_ERR(dpu_mdss->mmio); diff --git a/drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c b/drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c index 5a33bb148e9e..3cf476c55158 100644 --- a/drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c +++ b/drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c @@ -418,7 +418,7 @@ struct msm_kms *mdp4_kms_init(struct drm_device *dev) mdp4_kms->dev = dev; - mdp4_kms->mmio = msm_ioremap(pdev, NULL, "MDP4"); + mdp4_kms->mmio = msm_ioremap(pdev, NULL); if (IS_ERR(mdp4_kms->mmio)) { ret = PTR_ERR(mdp4_kms->mmio); goto fail; diff --git a/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c b/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c index 12a5f81e402b..81bd434980cf 100644 --- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c +++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c @@ -827,7 +827,7 @@ static int mdp5_init(struct platform_device *pdev, struct drm_device *dev) if (ret) goto fail; - mdp5_kms->mmio = msm_ioremap(pdev, "mdp_phys", "MDP5"); + mdp5_kms->mmio = msm_ioremap(pdev, "mdp_phys"); if (IS_ERR(mdp5_kms->mmio)) { ret = PTR_ERR(mdp5_kms->mmio); goto fail; diff --git a/drivers/gpu/drm/msm/disp/mdp5/mdp5_mdss.c b/drivers/gpu/drm/msm/disp/mdp5/mdp5_mdss.c index b3f79c2277e9..049c6784a531 100644 --- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_mdss.c +++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_mdss.c @@ -210,13 +210,13 @@ int mdp5_mdss_init(struct platform_device *pdev) mdp5_mdss->base.dev = &pdev->dev; - mdp5_mdss->mmio = msm_ioremap(pdev, "mdss_phys", "MDSS"); + mdp5_mdss->mmio = msm_ioremap(pdev, "mdss_phys"); if (IS_ERR(mdp5_mdss->mmio)) { ret = PTR_ERR(mdp5_mdss->mmio); goto fail; } - mdp5_mdss->vbif = msm_ioremap(pdev, "vbif_phys", "VBIF"); + mdp5_mdss->vbif = msm_ioremap(pdev, "vbif_phys"); if (IS_ERR(mdp5_mdss->vbif)) { ret = PTR_ERR(mdp5_mdss->vbif); goto fail; diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c index 6b3ced4aaaf5..8b15280261b8 100644 --- a/drivers/gpu/drm/msm/dsi/dsi_host.c +++ b/drivers/gpu/drm/msm/dsi/dsi_host.c @@ -1813,7 +1813,7 @@ int msm_dsi_host_init(struct msm_dsi *msm_dsi) goto fail; } - msm_host->ctrl_base = msm_ioremap_size(pdev, "dsi_ctrl", "DSI CTRL", &msm_host->ctrl_size); + msm_host->ctrl_base = msm_ioremap_size(pdev, "dsi_ctrl", &msm_host->ctrl_size); if (IS_ERR(msm_host->ctrl_base)) { pr_err("%s: unable to map Dsi ctrl base\n", __func__); ret = PTR_ERR(msm_host->ctrl_base); diff --git a/drivers/gpu/drm/msm/dsi/phy/dsi_phy.c b/drivers/gpu/drm/msm/dsi/phy/dsi_phy.c index c2ed177717c7..a409a9bf7d85 100644 --- a/drivers/gpu/drm/msm/dsi/phy/dsi_phy.c +++ b/drivers/gpu/drm/msm/dsi/phy/dsi_phy.c @@ -709,14 +709,14 @@ static int dsi_phy_driver_probe(struct platform_device *pdev) if (!of_property_read_u32(dev->of_node, "phy-type", &phy_type)) phy->cphy_mode = (phy_type == PHY_TYPE_CPHY); - phy->base = msm_ioremap_size(pdev, "dsi_phy", "DSI_PHY", &phy->base_size); + phy->base = msm_ioremap_size(pdev, "dsi_phy", &phy->base_size); if (IS_ERR(phy->base)) { DRM_DEV_ERROR(dev, "%s: failed to map phy base\n", __func__); ret = -ENOMEM; goto fail; } - phy->pll_base = msm_ioremap_size(pdev, "dsi_pll", "DSI_PLL", &phy->pll_size); + phy->pll_base = msm_ioremap_size(pdev, "dsi_pll", &phy->pll_size); if (IS_ERR(phy->pll_base)) { DRM_DEV_ERROR(&pdev->dev, "%s: failed to map pll base\n", __func__); ret = -ENOMEM; @@ -724,7 +724,7 @@ static int dsi_phy_driver_probe(struct platform_device *pdev) } if (phy->cfg->has_phy_lane) { - phy->lane_base = msm_ioremap_size(pdev, "dsi_phy_lane", "DSI_PHY_LANE", &phy->lane_size); + phy->lane_base = msm_ioremap_size(pdev, "dsi_phy_lane", &phy->lane_size); if (IS_ERR(phy->lane_base)) { DRM_DEV_ERROR(&pdev->dev, "%s: failed to map phy lane base\n", __func__); ret = -ENOMEM; @@ -733,7 +733,7 @@ static int dsi_phy_driver_probe(struct platform_device *pdev) } if (phy->cfg->has_phy_regulator) { - phy->reg_base = msm_ioremap_size(pdev, "dsi_phy_regulator", "DSI_PHY_REG", &phy->reg_size); + phy->reg_base = msm_ioremap_size(pdev, "dsi_phy_regulator", &phy->reg_size); if (IS_ERR(phy->reg_base)) { DRM_DEV_ERROR(&pdev->dev, "%s: failed to map phy regulator base\n", __func__); ret = -ENOMEM; diff --git a/drivers/gpu/drm/msm/hdmi/hdmi.c b/drivers/gpu/drm/msm/hdmi/hdmi.c index 3acdeae25caf..3eb45cde0330 100644 --- a/drivers/gpu/drm/msm/hdmi/hdmi.c +++ b/drivers/gpu/drm/msm/hdmi/hdmi.c @@ -128,7 +128,7 @@ static struct hdmi *msm_hdmi_init(struct platform_device *pdev) hdmi->config = config; spin_lock_init(&hdmi->reg_lock); - hdmi->mmio = msm_ioremap(pdev, config->mmio_name, "HDMI"); + hdmi->mmio = msm_ioremap(pdev, config->mmio_name); if (IS_ERR(hdmi->mmio)) { ret = PTR_ERR(hdmi->mmio); goto fail; @@ -139,8 +139,7 @@ static struct hdmi *msm_hdmi_init(struct platform_device *pdev) config->mmio_name); hdmi->mmio_phy_addr = res->start; - hdmi->qfprom_mmio = msm_ioremap(pdev, - config->qfprom_mmio_name, "HDMI_QFPROM"); + hdmi->qfprom_mmio = msm_ioremap(pdev, config->qfprom_mmio_name); if (IS_ERR(hdmi->qfprom_mmio)) { DRM_DEV_INFO(&pdev->dev, "can't find qfprom resource\n"); hdmi->qfprom_mmio = NULL; diff --git a/drivers/gpu/drm/msm/hdmi/hdmi_phy.c b/drivers/gpu/drm/msm/hdmi/hdmi_phy.c index 16b0e8836d27..9780107e1cc9 100644 --- a/drivers/gpu/drm/msm/hdmi/hdmi_phy.c +++ b/drivers/gpu/drm/msm/hdmi/hdmi_phy.c @@ -144,7 +144,7 @@ static int msm_hdmi_phy_probe(struct platform_device *pdev) if (!phy->cfg) return -ENODEV; - phy->mmio = msm_ioremap(pdev, "hdmi_phy", "HDMI_PHY"); + phy->mmio = msm_ioremap(pdev, "hdmi_phy"); if (IS_ERR(phy->mmio)) { DRM_DEV_ERROR(dev, "%s: failed to map phy base\n", __func__); return -ENOMEM; diff --git a/drivers/gpu/drm/msm/hdmi/hdmi_phy_8996.c b/drivers/gpu/drm/msm/hdmi/hdmi_phy_8996.c index 99c7853353fd..b06d9d25a189 100644 --- a/drivers/gpu/drm/msm/hdmi/hdmi_phy_8996.c +++ b/drivers/gpu/drm/msm/hdmi/hdmi_phy_8996.c @@ -716,19 +716,18 @@ int msm_hdmi_pll_8996_init(struct platform_device *pdev) pll->pdev = pdev; - pll->mmio_qserdes_com = msm_ioremap(pdev, "hdmi_pll", "HDMI_PLL"); + pll->mmio_qserdes_com = msm_ioremap(pdev, "hdmi_pll"); if (IS_ERR(pll->mmio_qserdes_com)) { DRM_DEV_ERROR(dev, "failed to map pll base\n"); return -ENOMEM; } for (i = 0; i < HDMI_NUM_TX_CHANNEL; i++) { - char name[32], label[32]; + char name[32]; snprintf(name, sizeof(name), "hdmi_tx_l%d", i); - snprintf(label, sizeof(label), "HDMI_TX_L%d", i); - pll->mmio_qserdes_tx[i] = msm_ioremap(pdev, name, label); + pll->mmio_qserdes_tx[i] = msm_ioremap(pdev, name); if (IS_ERR(pll->mmio_qserdes_tx[i])) { DRM_DEV_ERROR(dev, "failed to map pll base\n"); return -ENOMEM; diff --git a/drivers/gpu/drm/msm/hdmi/hdmi_pll_8960.c b/drivers/gpu/drm/msm/hdmi/hdmi_pll_8960.c index 562dfac67792..be4b0b67e797 100644 --- a/drivers/gpu/drm/msm/hdmi/hdmi_pll_8960.c +++ b/drivers/gpu/drm/msm/hdmi/hdmi_pll_8960.c @@ -434,7 +434,7 @@ int msm_hdmi_pll_8960_init(struct platform_device *pdev) if (!pll) return -ENOMEM; - pll->mmio = msm_ioremap(pdev, "hdmi_pll", "HDMI_PLL"); + pll->mmio = msm_ioremap(pdev, "hdmi_pll"); if (IS_ERR(pll->mmio)) { DRM_DEV_ERROR(dev, "failed to map pll base\n"); return -ENOMEM; diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c index cfc9a0c9ec39..73757b7dc935 100644 --- a/drivers/gpu/drm/msm/msm_drv.c +++ b/drivers/gpu/drm/msm/msm_drv.c @@ -116,7 +116,7 @@ struct clk *msm_clk_get(struct platform_device *pdev, const char *name) } static void __iomem *_msm_ioremap(struct platform_device *pdev, const char *name, - const char *dbgname, bool quiet, phys_addr_t *psize) + bool quiet, phys_addr_t *psize) { struct resource *res; unsigned long size; @@ -148,22 +148,20 @@ static void __iomem *_msm_ioremap(struct platform_device *pdev, const char *name return ptr; } -void __iomem *msm_ioremap(struct platform_device *pdev, const char *name, - const char *dbgname) +void __iomem *msm_ioremap(struct platform_device *pdev, const char *name) { - return _msm_ioremap(pdev, name, dbgname, false, NULL); + return _msm_ioremap(pdev, name, false, NULL); } -void __iomem *msm_ioremap_quiet(struct platform_device *pdev, const char *name, - const char *dbgname) +void __iomem *msm_ioremap_quiet(struct platform_device *pdev, const char *name) { - return _msm_ioremap(pdev, name, dbgname, true, NULL); + return _msm_ioremap(pdev, name, true, NULL); } void __iomem *msm_ioremap_size(struct platform_device *pdev, const char *name, - const char *dbgname, phys_addr_t *psize) + phys_addr_t *psize) { - return _msm_ioremap(pdev, name, dbgname, false, psize); + return _msm_ioremap(pdev, name, false, psize); } void msm_writel(u32 data, void __iomem *addr) diff --git a/drivers/gpu/drm/msm/msm_drv.h b/drivers/gpu/drm/msm/msm_drv.h index d7574e6bd4e4..56d1242efcc1 100644 --- a/drivers/gpu/drm/msm/msm_drv.h +++ b/drivers/gpu/drm/msm/msm_drv.h @@ -480,12 +480,10 @@ struct clk *msm_clk_get(struct platform_device *pdev, const char *name); struct clk *msm_clk_bulk_get_clock(struct clk_bulk_data *bulk, int count, const char *name); -void __iomem *msm_ioremap(struct platform_device *pdev, const char *name, - const char *dbgname); +void __iomem *msm_ioremap(struct platform_device *pdev, const char *name); void __iomem *msm_ioremap_size(struct platform_device *pdev, const char *name, - const char *dbgname, phys_addr_t *size); -void __iomem *msm_ioremap_quiet(struct platform_device *pdev, const char *name, - const char *dbgname); + phys_addr_t *size); +void __iomem *msm_ioremap_quiet(struct platform_device *pdev, const char *name); void msm_writel(u32 data, void __iomem *addr); u32 msm_readl(const void __iomem *addr); void msm_rmw(void __iomem *addr, u32 mask, u32 or); diff --git a/drivers/gpu/drm/msm/msm_gpu.c b/drivers/gpu/drm/msm/msm_gpu.c index 0f78c2615272..c4debc8ea3ba 100644 --- a/drivers/gpu/drm/msm/msm_gpu.c +++ b/drivers/gpu/drm/msm/msm_gpu.c @@ -858,7 +858,7 @@ int msm_gpu_init(struct drm_device *drm, struct platform_device *pdev, /* Map registers: */ - gpu->mmio = msm_ioremap(pdev, config->ioname, name); + gpu->mmio = msm_ioremap(pdev, config->ioname); if (IS_ERR(gpu->mmio)) { ret = PTR_ERR(gpu->mmio); goto fail; From patchwork Wed Jan 5 23:27:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 530180 Delivered-To: patch@linaro.org Received: by 2002:ad5:544f:0:0:0:0:0 with SMTP id a15csp708614imp; Wed, 5 Jan 2022 15:27:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJxYtw40swjRFS2CRtu0zbxIOKSwZSEafNNv943rEfrFVAVWHM2rFvatDL0fp5HSMgPDJCDE X-Received: by 2002:a63:894a:: with SMTP id v71mr49153391pgd.29.1641425234787; Wed, 05 Jan 2022 15:27:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1641425234; cv=none; d=google.com; s=arc-20160816; b=mycFSZYKJa8QbUCU9LiNna0ASzJOvXatj5TBeMwQpW0bOtxMr5rArg+j7irSU+S9qE m6/UrhKnW4TF5mNCr5YfY7Rnmv1bSt8lti7wIqvWUyZACEbGhUUNLX5pXEGAsuUGIQQh qto6YwRFqco2jtpK8dyVq2+n2zVGqr0XgVAVmAa8oxOjiudxOyBpFKGAmm83qaCGyDTg JCEySH95WZEyHr6jHNyUeQlBpR7V0KvhHz5GXgHwne3WCJfa9xtmuUYuJi3itZk0iq/C 5jV13HXOsGi4XYovezH3m2lxIFgUxX/djIYncZ6n4Inb/OdYKpyeENFrZHJ7IoCIcvqi bkZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature:delivered-to; bh=58QAv1zSqapbnHsZYOklL7IQDyaDq+jkAqsKjvZ/E/Y=; b=R/QOzQ1eND+1WI3aFN5T+o2F7orp9zk/ge0O/Bg+FJzJYjhQDmWf2l49f4v2gPRIgA TbVUhz3K8Vr1qGLaY/dqzURbk50rzY0QYp+Gy5K2GELod4G87C+fCn9C+TIY0htmgrZ0 zCoFnDqvPluSPaFz4dih4hOtTFSdoibV9Ig7WuTALylGHFpLzo50VQJ96MZSh0txSG7o 6CiNcLjLU1l7SlZHxNXTrqFB7jwU5YZbDavss441eYhuMJFTmDcm0bW7D1uGJx2e8eUo h5/caVOjVrSG3ok98NU2q5WH+P1VYPo0UfmM/6LMGTHo64aoegSUwEvC2uk7p+P4SE47 y4Ww== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Kjo4mVSx; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [2610:10:20:722:a800:ff:fe36:1795]) by mx.google.com with ESMTPS id g12si295212plt.121.2022.01.05.15.27.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jan 2022 15:27:14 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) client-ip=2610:10:20:722:a800:ff:fe36:1795; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Kjo4mVSx; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 43DB210E442; Wed, 5 Jan 2022 23:27:06 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lj1-x22c.google.com (mail-lj1-x22c.google.com [IPv6:2a00:1450:4864:20::22c]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0A3B610E43B for ; Wed, 5 Jan 2022 23:27:05 +0000 (UTC) Received: by mail-lj1-x22c.google.com with SMTP id q8so1275461ljp.9 for ; Wed, 05 Jan 2022 15:27:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=58QAv1zSqapbnHsZYOklL7IQDyaDq+jkAqsKjvZ/E/Y=; b=Kjo4mVSxgdH4TDW8ccNVmTg4lD4jQFmHJ5XOzqcVYOLjEKC6Zeflsn9RzSmdr90VEn 8lM/BK9c3lWY5TXLjoMjZf1kKCw7bVUFnUGFk02Q/jQ7glLeBjO0fdf9rl0ydOfdCKh0 FkEZja32ca5ytgYGMOOJKMu8Cn0FPrTT5asw+7//viYk/mWoBJNxooRn9WyzId59uVNZ JMQJJb5Ktw9s07kp45mknpnTh5e9cXkfPZE6w3KGsxs1u2leE97FqznK3oJWpn85duzg vhhWQ4U7jLFuHC0HeU0lS+bKEg6opDmwxHC3yGZW5WlAzDbhdC2APq/OE5Zf3lopuRDy t0+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=58QAv1zSqapbnHsZYOklL7IQDyaDq+jkAqsKjvZ/E/Y=; b=af0tOl2dPoYRMJQGxckVnWp9yShxWpqp0WOkzlCgmyVUZ9ENRGUaqRwiKlZzMVq0cg bC8uFTjE1tESL/P9vXtRGGsYid2dP98t1t97gPxSrOw9DW4jldsuUQN0uP4Sg5rFVe4R Bvoxe5yM1JvXNxt0+6JRCbBR8VSrz7Ir2+u4Lj+3Zni1qcXgJFUjzz5ZPFaE/48w7E1S 16g5qFau5apqhsRA0hDprinTWwJKuqCUGoUpV88igCi5KjKFQvk41FX2l7AlLjaKouRQ HCRl1pUGBOnxNmOWup2o6QsjdkG5OryHWfhgpgJFajQP+A7NIz4LU+U6eFLXPkYXq4F8 KqPg== X-Gm-Message-State: AOAM530A4q+q+l2eUwh8PehpxIsWbuIPb22rXQMAh4zEqh6hn5Esp+bU f5CjwMOFLj9LJKpouteGLTL6qA== X-Received: by 2002:a2e:9e81:: with SMTP id f1mr45680361ljk.469.1641425223435; Wed, 05 Jan 2022 15:27:03 -0800 (PST) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id b29sm28730lfv.187.2022.01.05.15.27.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jan 2022 15:27:02 -0800 (PST) From: Dmitry Baryshkov To: Bjorn Andersson , Rob Clark , Sean Paul , Abhinav Kumar Subject: [PATCH v2 3/3] drm/msm: move msm_readl/_writel to msm_drv.h Date: Thu, 6 Jan 2022 02:27:00 +0300 Message-Id: <20220105232700.444170-3-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220105232700.444170-1-dmitry.baryshkov@linaro.org> References: <20220105232700.444170-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Airlie , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, Stephen Boyd , freedreno@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" With the reglog removal, msm_readl/_writel became single line wrappers around readl/writel. Move those two wrappers and msm_rmw to msm_drv.h to remove need for extra function calls when doing register writes. Signed-off-by: Dmitry Baryshkov Reviewed-by: Stephen Boyd --- drivers/gpu/drm/msm/msm_drv.c | 20 -------------------- drivers/gpu/drm/msm/msm_drv.h | 14 +++++++++++--- 2 files changed, 11 insertions(+), 23 deletions(-) diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c index 73757b7dc935..fd62a4da14a1 100644 --- a/drivers/gpu/drm/msm/msm_drv.c +++ b/drivers/gpu/drm/msm/msm_drv.c @@ -164,26 +164,6 @@ void __iomem *msm_ioremap_size(struct platform_device *pdev, const char *name, return _msm_ioremap(pdev, name, false, psize); } -void msm_writel(u32 data, void __iomem *addr) -{ - writel(data, addr); -} - -u32 msm_readl(const void __iomem *addr) -{ - u32 val = readl(addr); - - return val; -} - -void msm_rmw(void __iomem *addr, u32 mask, u32 or) -{ - u32 val = msm_readl(addr); - - val &= ~mask; - msm_writel(val | or, addr); -} - static enum hrtimer_restart msm_hrtimer_worktimer(struct hrtimer *t) { struct msm_hrtimer_work *work = container_of(t, diff --git a/drivers/gpu/drm/msm/msm_drv.h b/drivers/gpu/drm/msm/msm_drv.h index 56d1242efcc1..3ab19775a5c3 100644 --- a/drivers/gpu/drm/msm/msm_drv.h +++ b/drivers/gpu/drm/msm/msm_drv.h @@ -484,9 +484,17 @@ void __iomem *msm_ioremap(struct platform_device *pdev, const char *name); void __iomem *msm_ioremap_size(struct platform_device *pdev, const char *name, phys_addr_t *size); void __iomem *msm_ioremap_quiet(struct platform_device *pdev, const char *name); -void msm_writel(u32 data, void __iomem *addr); -u32 msm_readl(const void __iomem *addr); -void msm_rmw(void __iomem *addr, u32 mask, u32 or); + +#define msm_writel(data, addr) writel((data), (addr)) +#define msm_readl(addr) readl((addr)) + +static inline void msm_rmw(void __iomem *addr, u32 mask, u32 or) +{ + u32 val = msm_readl(addr); + + val &= ~mask; + msm_writel(val | or, addr); +} /** * struct msm_hrtimer_work - a helper to combine an hrtimer with kthread_work