From patchwork Tue May 28 15:13:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 10965191 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D9BF06C5 for ; Tue, 28 May 2019 15:13:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C78E41FF40 for ; Tue, 28 May 2019 15:13:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BBF1C28606; Tue, 28 May 2019 15:13:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 51C26285F7 for ; Tue, 28 May 2019 15:13:47 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EDC2189EBB; Tue, 28 May 2019 15:13:44 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-yw1-xc41.google.com (mail-yw1-xc41.google.com [IPv6:2607:f8b0:4864:20::c41]) by gabe.freedesktop.org (Postfix) with ESMTPS id 858A989EBB for ; Tue, 28 May 2019 15:13:43 +0000 (UTC) Received: by mail-yw1-xc41.google.com with SMTP id w18so8020381ywa.12 for ; Tue, 28 May 2019 08:13:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=w3he60PeRSDt9ElFd+He/Tvuudq445P3hVqGQ2V87lo=; b=clKhAXAUxxYHV8ikHPFsQmNSmd6Ua7Tw5uImelTn9tGGnKwfocPxw4SZtzi3NmSAJm DXVFLDLsHmNl/u8hY7r7tXllXZuCsRv1BXxCSHsmL06bEhODZkTBOAwQhSmLi3rJp507 xciMDmvQr5RQSlG1YxlU4/wnrXwyw4wMBaJDbKEW9fPVVOC3tRpj2BYRRADZnlnQEjWp Nq+G5rKVdWFigSeffjdITalM/OppdgiLmDRE6ETlR/lgAup4307e7IFt6l6Q3YaBZ8V4 ZpGCUc/ie1wEuphuWtmznIJ7N9De1rxDZ+mtiWlKdRX1YJDdlxe0Qn5xFAx2qocaEO3w 7nfQ== X-Gm-Message-State: APjAAAU03hJLwq6yrNB4UZ53i3tJTHNK6AU9aVpyFhTMAJ8wO5Mor/ol QZVkQ4pnlVkAuN+GNnnzhWnFG7bHEmI= X-Google-Smtp-Source: APXvYqyiOA+7OXMVX0rtwnER0dJIf62nXkL2sShVfKOobvZy4nFsmF2XFSTY1dhu8wS5LztzFf4R6A== X-Received: by 2002:a81:2fca:: with SMTP id v193mr10170562ywv.296.1559056422487; Tue, 28 May 2019 08:13:42 -0700 (PDT) Received: from rosewood.cam.corp.google.com ([2620:0:1013:11:89c6:2139:5435:371d]) by smtp.gmail.com with ESMTPSA id 136sm869596ywu.53.2019.05.28.08.13.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 May 2019 08:13:41 -0700 (PDT) From: Sean Paul To: dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org Subject: [PATCH v2] drm/msm/dpu: Use provided drm_minor to initialize debugfs Date: Tue, 28 May 2019 11:13:39 -0400 Message-Id: <20190528151339.207978-1-sean@poorly.run> X-Mailer: git-send-email 2.22.0.rc1.257.g3120a18244-goog In-Reply-To: <5ce85778.1c69fb81.ccfd3.bac8@mx.google.com> References: <5ce85778.1c69fb81.ccfd3.bac8@mx.google.com> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=poorly.run; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=w3he60PeRSDt9ElFd+He/Tvuudq445P3hVqGQ2V87lo=; b=IhmRmU/8g5t6Ek/54QV0E5Gqj0o27WWZHFRm8mzsa1t0nGlHH6z4mrZGWzMdJjiRjb Q5GATtw5zORXMA+dFR+g2T8invO1zejFOEkYm6ouJxw4SGrILidp6QCtjNUcJ/ZrCkDp I4ztmHcIBunUbVPyIujsCTLqFCzM3ybHhHgildrTDObkIGOvdQlX8dpjwghC6NfeU/sc H7+zZwQxh68pq30R/M9uCgNPbk1ajEcaYGxp9axUH2Jit/xkItXlyShGIYArflg4MZ9U e5gtFZXPb0q3HMJxkFhZfjc9XU7C+iKQBaO0Tm9dA2p8OReDUppjp4y0UaOZuK+7Tn2+ ahgg== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rob Clark , Sean Paul , Abhinav Kumar , Stephen Boyd Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Sean Paul Instead of reaching into dev->primary for debugfs_root, use the minor passed into debugfs_init. This avoids creating a debug directory under /sys/kernel/debug/debug and instead uses /sys/kernel/debug/dri// Since we're now putting everything under */dri/, there's no need to create a duplicate "debug" directory. Just put everything in the root. Changes in v2: - Remove the unnecessary "debug" directory (Stephen) Link to v1: https://patchwork.freedesktop.org/patch/msgid/20190524173231.5040-1-sean@poorly.run Cc: Rob Clark Reported-by: Stephen Boyd Reviewed-by: Abhinav Kumar Signed-off-by: Sean Paul Reviewed-by: Rob Clark --- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c index 885bf88afa3ec..ad094704610f9 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c @@ -231,18 +231,14 @@ void *dpu_debugfs_create_regset32(const char *name, umode_t mode, regset, &dpu_fops_regset32); } -static int _dpu_debugfs_init(struct dpu_kms *dpu_kms) +static int _dpu_debugfs_init(struct dpu_kms *dpu_kms, struct drm_minor *minor) { void *p = dpu_hw_util_get_log_mask_ptr(); - struct dentry *entry; + struct dentry *entry = minor->debugfs_root; if (!p) return -EINVAL; - entry = debugfs_create_dir("debug", dpu_kms->dev->primary->debugfs_root); - if (IS_ERR_OR_NULL(entry)) - return -ENODEV; - /* allow root to be NULL */ debugfs_create_x32(DPU_DEBUGFS_HWMASKNAME, 0600, entry, p); @@ -581,7 +577,7 @@ static int _dpu_kms_drm_obj_init(struct dpu_kms *dpu_kms) #ifdef CONFIG_DEBUG_FS static int dpu_kms_debugfs_init(struct msm_kms *kms, struct drm_minor *minor) { - return _dpu_debugfs_init(to_dpu_kms(kms)); + return _dpu_debugfs_init(to_dpu_kms(kms), minor); } #endif