From patchwork Wed Dec 1 22:26:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 519741 Delivered-To: patch@linaro.org Received: by 2002:a05:6e04:2287:0:0:0:0 with SMTP id bl7csp901563imb; Wed, 1 Dec 2021 14:27:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJzRpVOZrQDZ2Zsg9wfyTLckByOjWFn+EAQMU25Ca8+x9PTRphpuTuijI3yqKGCPXxUJi85E X-Received: by 2002:a17:90a:fcc:: with SMTP id 70mr1233387pjz.189.1638397621244; Wed, 01 Dec 2021 14:27:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1638397621; cv=none; d=google.com; s=arc-20160816; b=CdPg+JBlhf8Y/1W1YmdDZkiwdFD1mCdGQQ8Nu84A8l2ImysHNePwJ6UbPVI40yAJke bMQMr4g0ntKtz2M1xMJomr8uT3GfW2pyCMXRaA5JzYejLuIh0jr5CW4QNmsjAe0OMODz Mn/gbsmAw5YKDoaJLW7s50yZfTV4ejdWe0rY6Ip+1D8TfutNZofx/WSPOIa1xTtua2Wb RJs8uMUcFjh2KLBvtu7rN3+SE2GqKjFiswPV8ULyIwVJp1nif93t/ih9URnPEOfvEKRP xhDyijLJ3y4NlmNGeARmwphHmCRHS/P1SMrDbefDAQhYTHDLGaTSpguPS0AiqyReu6rD zcZw== 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=IPVLDgnWhiffGg+ltlm6jFDDP7VKjhpJAJFiDVdO8N0=; b=MQckGt2HmYuruD6BXRjDklagx9sw6c5fyIWE9pzRhWWj4vk60nOVKKLsyJ7LwIU2Zl ia1LvJlmcpk5V4RJvllUV50gYSe0GRX0pIN3uvZtOPnomFQU70iAH/V769sMUVXvJltl KOoJgQ6lCcOqPZ0n8RytdHMDCEws5OrSYOi3ipK1/ccKmseLOOQPpeRv52RuB+MBUecS /J3GosiDDlLgIb3k410isge6qUxG3IxSZlUJYQtuhruszYGO831Jij3nWTbUAscyvrEM QUlPd5myxqjkYJ3cILaRiY2I4R85qPzjGTdnpbpR9xp81bECiDPiOrK0jjaU2yicMjmP X40A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ffxswi7e; 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 h10si1228376pls.321.2021.12.01.14.27.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Dec 2021 14:27:01 -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=ffxswi7e; 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 10BEA6E5A1; Wed, 1 Dec 2021 22:26:44 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lj1-x229.google.com (mail-lj1-x229.google.com [IPv6:2a00:1450:4864:20::229]) by gabe.freedesktop.org (Postfix) with ESMTPS id C31776E5A1 for ; Wed, 1 Dec 2021 22:26:41 +0000 (UTC) Received: by mail-lj1-x229.google.com with SMTP id z8so51100623ljz.9 for ; Wed, 01 Dec 2021 14:26:41 -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=IPVLDgnWhiffGg+ltlm6jFDDP7VKjhpJAJFiDVdO8N0=; b=ffxswi7e6qVsGwiUetlg2L9vL1KHpzBwwSPSnXcaqR0F41NLuoj5+MLMxsYH137iwu 3k8xqvbXPdWJQ8PFyzOYbJCJlYh7SowrTTwNYar2gKU0n6dAyms1UvLqmLhT3gmpx9iV gHqDa9L28bygXdk0YVphcmvvFrHgtVGRELM61CsjhwjaBu+Ht1AtJymz0E2Gyev57xgu romX3Q6yJu6sGu08xTeu4qDo1L4OfvS7bA5X3uSmfSlnJu0L4wNz814JQWpazv7mxM0J MsLCAp3/HB9+X86Jj4suguB9WlIS4zqZXFrpPWzvF5BwZBL4Z/tv3jGNcJSGZZ64bH5x uhCA== 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=IPVLDgnWhiffGg+ltlm6jFDDP7VKjhpJAJFiDVdO8N0=; b=g7LK2FM8ITe1ApydfralqzKgBLpdFSUQ4bbNavgG1xA3cotJYAthHPuNcVHOdEuqsk sjxF+nga02m0QufTLquiN38QGbtie3Q2vo9uJ9jsiZrvrO5a/bOpWMFlFQ5rv2363FQe +Ae3UAdbrXPBivpe5eH7RMDjTCzWCVoDjvAyIwf1PAvAgyt6/w9bV52DE8iamQF9OHn4 7DesUoRHZt5Y0bO3lO4oRPxi4MH6mR6YILQWKP2a3uXX7yLtJgg2UTcy/3Rio3IjL0T4 tK2DlhYn1iDerhqhPbA5Cj28k1DSdwC0WArZWN8pbOqhiXrtBaa0a6ZpwbThidGNsFdQ 5KAg== X-Gm-Message-State: AOAM532q6Ey2hakV3O56aHUyphYydilNfOSEfVtkHKGxq1YezWm0DbjZ EGil9oi1uZgeilMfqIiBQZHwYA== X-Received: by 2002:a2e:b8cf:: with SMTP id s15mr8225808ljp.364.1638397600114; Wed, 01 Dec 2021 14:26:40 -0800 (PST) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id u7sm117004lfs.144.2021.12.01.14.26.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Dec 2021 14:26:39 -0800 (PST) From: Dmitry Baryshkov To: Bjorn Andersson , Rob Clark , Sean Paul , Abhinav Kumar Subject: [PATCH v1 5/8] drm/msm/dpu: stop manually removing debugfs files for the DPU plane Date: Thu, 2 Dec 2021 01:26:30 +0300 Message-Id: <20211201222633.2476780-6-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211201222633.2476780-1-dmitry.baryshkov@linaro.org> References: <20211201222633.2476780-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: Stephen Boyd , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, David Airlie , freedreno@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" DRM code handles removing all debugfs recursively. Drop plane-specific code to perform that. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar --- drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 28 ++++++++--------------- 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c index f80ee3ba9a8a..d3176f58708e 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c @@ -110,7 +110,6 @@ struct dpu_plane { struct dpu_mdss_cfg *catalog; /* debugfs related stuff */ - struct dentry *debugfs_root; struct dpu_debugfs_regset32 debugfs_src; struct dpu_debugfs_regset32 debugfs_scaler; struct dpu_debugfs_regset32 debugfs_csc; @@ -1368,15 +1367,16 @@ static int _dpu_plane_init_debugfs(struct drm_plane *plane) struct dpu_kms *kms = _dpu_plane_get_kms(plane); const struct dpu_sspp_cfg *cfg = pdpu->pipe_hw->cap; const struct dpu_sspp_sub_blks *sblk = cfg->sblk; + struct dentry *debugfs_root; /* create overall sub-directory for the pipe */ - pdpu->debugfs_root = + debugfs_root = debugfs_create_dir(plane->name, plane->dev->primary->debugfs_root); /* don't error check these */ debugfs_create_xul("features", 0600, - pdpu->debugfs_root, (unsigned long *)&pdpu->pipe_hw->cap->features); + debugfs_root, (unsigned long *)&pdpu->pipe_hw->cap->features); /* add register dump support */ dpu_debugfs_setup_regset32(&pdpu->debugfs_src, @@ -1384,7 +1384,7 @@ static int _dpu_plane_init_debugfs(struct drm_plane *plane) sblk->src_blk.len, kms); dpu_debugfs_create_regset32("src_blk", 0400, - pdpu->debugfs_root, &pdpu->debugfs_src); + debugfs_root, &pdpu->debugfs_src); if (cfg->features & BIT(DPU_SSPP_SCALER_QSEED3) || cfg->features & BIT(DPU_SSPP_SCALER_QSEED3LITE) || @@ -1395,7 +1395,7 @@ static int _dpu_plane_init_debugfs(struct drm_plane *plane) sblk->scaler_blk.len, kms); dpu_debugfs_create_regset32("scaler_blk", 0400, - pdpu->debugfs_root, + debugfs_root, &pdpu->debugfs_scaler); } @@ -1406,24 +1406,24 @@ static int _dpu_plane_init_debugfs(struct drm_plane *plane) sblk->csc_blk.len, kms); dpu_debugfs_create_regset32("csc_blk", 0400, - pdpu->debugfs_root, &pdpu->debugfs_csc); + debugfs_root, &pdpu->debugfs_csc); } debugfs_create_u32("xin_id", 0400, - pdpu->debugfs_root, + debugfs_root, (u32 *) &cfg->xin_id); debugfs_create_u32("clk_ctrl", 0400, - pdpu->debugfs_root, + debugfs_root, (u32 *) &cfg->clk_ctrl); debugfs_create_x32("creq_vblank", 0600, - pdpu->debugfs_root, + debugfs_root, (u32 *) &sblk->creq_vblank); debugfs_create_x32("danger_vblank", 0600, - pdpu->debugfs_root, + debugfs_root, (u32 *) &sblk->danger_vblank); return 0; @@ -1440,13 +1440,6 @@ static int dpu_plane_late_register(struct drm_plane *plane) return _dpu_plane_init_debugfs(plane); } -static void dpu_plane_early_unregister(struct drm_plane *plane) -{ - struct dpu_plane *pdpu = to_dpu_plane(plane); - - debugfs_remove_recursive(pdpu->debugfs_root); -} - static bool dpu_plane_format_mod_supported(struct drm_plane *plane, uint32_t format, uint64_t modifier) { @@ -1472,7 +1465,6 @@ static const struct drm_plane_funcs dpu_plane_funcs = { .atomic_duplicate_state = dpu_plane_duplicate_state, .atomic_destroy_state = dpu_plane_destroy_state, .late_register = dpu_plane_late_register, - .early_unregister = dpu_plane_early_unregister, .format_mod_supported = dpu_plane_format_mod_supported, };