From patchwork Fri May 24 17:32:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 10960189 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 02F9C1390 for ; Fri, 24 May 2019 17:32:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DC605289FF for ; Fri, 24 May 2019 17:32:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D0C4928A0C; Fri, 24 May 2019 17:32:39 +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 73BBE28A01 for ; Fri, 24 May 2019 17:32:39 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B129E89F69; Fri, 24 May 2019 17:32:36 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-yb1-xb44.google.com (mail-yb1-xb44.google.com [IPv6:2607:f8b0:4864:20::b44]) by gabe.freedesktop.org (Postfix) with ESMTPS id 198976E12F for ; Fri, 24 May 2019 17:32:35 +0000 (UTC) Received: by mail-yb1-xb44.google.com with SMTP id x32so993309ybh.1 for ; Fri, 24 May 2019 10:32:35 -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:mime-version :content-transfer-encoding; bh=Rz26KSKqatgFQwQEso0yLpeStqm8dFhYBz7Ve/DZ0/o=; b=Hry636YZnAHEPX7sAPNyncbZdrGvFFxdbPyqKhDBucioKMh7ODCn+mgmrITFI4aINj JT5N9nWNXWj/RjvVHFFUrCSU1JGSnXJO6jVC3v2QmE6/zmHv/mwb6eeNEGF23HO/IcVN Ht1r4JIWuk87t0OsZPSv9J9HZ7bhZHnT652U48cWH3lrqRjRwZ6+qVfPvXRXBC9zp8Eg blNqfLeFVxGeO2jGAM3qOtol5OHl2geRfplPlsf2nEFjZ/VP2yvoQ12MbVWMqfrZasg1 tgvs+hDOFR9WsmdIFti+8HpuG1a3H593ujqupLi6PJKmOtHcp+lwx7u0aoasoP+SzDcC Kdww== X-Gm-Message-State: APjAAAXLtQ6MoJ6EJtyAMXO5BrpCZz4skG9F1hP0m+glPHEmHNnEjObl O/3oiVTHOse1aDfT95tCcmDYXbSGKUs= X-Google-Smtp-Source: APXvYqyAfITfeQW2P8raMp1Vi5Tp3aAtUGPeTrwt5ETgg6rjflQFAIsoMyZ6kRYVZUXtoycQ38M6AQ== X-Received: by 2002:a25:2183:: with SMTP id h125mr9593613ybh.414.1558719154005; Fri, 24 May 2019 10:32:34 -0700 (PDT) Received: from rosewood.cam.corp.google.com ([2620:0:1013:11:89c6:2139:5435:371d]) by smtp.gmail.com with ESMTPSA id s17sm774437ywg.70.2019.05.24.10.32.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 May 2019 10:32:33 -0700 (PDT) From: Sean Paul To: dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org Subject: [PATCH 1/2] drm/msm/dpu: Use provided drm_minor to initialize debugfs Date: Fri, 24 May 2019 13:32:18 -0400 Message-Id: <20190524173231.5040-1-sean@poorly.run> X-Mailer: git-send-email 2.22.0.rc1.257.g3120a18244-goog 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:mime-version :content-transfer-encoding; bh=Rz26KSKqatgFQwQEso0yLpeStqm8dFhYBz7Ve/DZ0/o=; b=KdJ3DcoDcjyiPNJv6g/csr1ng1mJ8ryqzVACkIgEeWcFAZu11Imsi0+q5nj9Jfg3N0 L+Ki9KHNKTI3ZIfkOWPzteqyqR+vtP9pLAHQ7wabfoZ8SBAXYVjYDY/vDlWgqonhEYUg XPLp79rjWFNaZQTsL/8tJPEQr1Ps1+YGiu2jpHgdol7z/RKPvpexMtEobrGlCUDLzst+ Kx7hS8+zLA4clylEUtMoMejh3TNZYflL4+EnV+B++QdSCcI5GW7fPDyInIiWwKGECVNl 8ODdJRYouaFIh69pTSCkF6i5JF5QFyEWH4utfOsz82C429dt5w1Thd7vA1YdZZdISmjg SONA== 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: Sean Paul , Sean Paul , linux-arm-msm@vger.kernel.org, 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 the debug directory under /sys/kernel/debug/ and instead creates the directory under the correct node in /sys/kernel/debug/dri// Reported-by: Stephen Boyd Signed-off-by: Sean Paul Reviewed-by: Abhinav Kumar --- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c index 885bf88afa3e..d77071965431 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c @@ -231,7 +231,7 @@ 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; @@ -239,7 +239,7 @@ static int _dpu_debugfs_init(struct dpu_kms *dpu_kms) if (!p) return -EINVAL; - entry = debugfs_create_dir("debug", dpu_kms->dev->primary->debugfs_root); + entry = debugfs_create_dir("debug", minor->debugfs_root); if (IS_ERR_OR_NULL(entry)) return -ENODEV; @@ -581,7 +581,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 From patchwork Fri May 24 17:32:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 10960195 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 46BD515A6 for ; Fri, 24 May 2019 17:32:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2C45B2892B for ; Fri, 24 May 2019 17:32:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2089028A0A; Fri, 24 May 2019 17:32:43 +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 D79C728A07 for ; Fri, 24 May 2019 17:32:42 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 43DF06E130; Fri, 24 May 2019 17:32:41 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-yb1-xb43.google.com (mail-yb1-xb43.google.com [IPv6:2607:f8b0:4864:20::b43]) by gabe.freedesktop.org (Postfix) with ESMTPS id B70F66E131 for ; Fri, 24 May 2019 17:32:39 +0000 (UTC) Received: by mail-yb1-xb43.google.com with SMTP id x7so3911927ybg.5 for ; Fri, 24 May 2019 10:32:39 -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=Nxi1zwuqndJEn18AdpEkkdQlNqPXeDyt3jpcO1TOWSU=; b=ngXODYPv+MtFWgIFjIvKHNL2s8UZs/JslAUF2J5Z88HfU1339VsX6fOyHii4vpR7CY Q2p+WsL1cRZ2oSev1WZCXJVBU/tzW2bSkkH4Pn55pIlNXPfpsznBwjR5/JQfmCec/AdM wc0wD7r3MPPsTqLtYnuBforWSOCZnjpNHODh4fE+zwdjCDolLx2uLekEXCEGH8Mgih/L ALrkWyzHBjWvvzEpvg36ssct432rKnFQ7kfErboqxBvMcxGDORW5mXyShcRHibusCKWP gijtzRE3clsUis+VMz5wbMoLW+FTZNnlzHGgsMJBrmbNUBNczL7JMoyVo999ofkackqN LC2g== X-Gm-Message-State: APjAAAUn27vU8mnE2pz7nZXC7HBl1bWIzgsfD2R2xuUtIy2di6grtsrw ZwpfXTCjp26rZD7AoW1NMFS0/qPBbzI= X-Google-Smtp-Source: APXvYqxA8fEtKhzhjbVv+cpIIdWmhzSrXOz4QZdMwEHQFhbwHwzQbYDAGyZce/2VKLRwxnxf+fNpNQ== X-Received: by 2002:a25:2a86:: with SMTP id q128mr28108060ybq.108.1558719158775; Fri, 24 May 2019 10:32:38 -0700 (PDT) Received: from rosewood.cam.corp.google.com ([2620:0:1013:11:89c6:2139:5435:371d]) by smtp.gmail.com with ESMTPSA id s17sm774437ywg.70.2019.05.24.10.32.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 May 2019 10:32:38 -0700 (PDT) From: Sean Paul To: dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org Subject: [PATCH 2/2] drm/msm/dpu: Remove _dpu_debugfs_init Date: Fri, 24 May 2019 13:32:19 -0400 Message-Id: <20190524173231.5040-2-sean@poorly.run> X-Mailer: git-send-email 2.22.0.rc1.257.g3120a18244-goog In-Reply-To: <20190524173231.5040-1-sean@poorly.run> References: <20190524173231.5040-1-sean@poorly.run> 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=Nxi1zwuqndJEn18AdpEkkdQlNqPXeDyt3jpcO1TOWSU=; b=Nw0MCBee/TWTmAxdRVs1IXvAqt1Jv/rkylswgDtTDj9WT/2AwQV8ROQPZCwQUSsPQH CU65nugMd4ePhX+UmTx3odq2/HhWQIRrsb4QxiotNxJUz3SdaaGhSTK6WN9ycUPqXkjS v+az9kyt50Ha2zamem4lMcJ10IBLtQz3JaTZtTBBDWVXUoaprnws4vWngGzhnu7aROzi ew9xCt8+1yQQbkKeBiGlyxlzoq7nQeUYIzOokXTz2PrRcNUR5pB2TkAS1ceWLj8mrECe tKOyj/kiYyAgoxQTIPDZNclFfGYzjxziEJtphtj9JZmg1FQroqEIZkGEUCWvj1fHGZsD FRng== 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: Sean Paul , Sean Paul , linux-arm-msm@vger.kernel.org, Stephen Boyd Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Sean Paul Fold it into dpu_debugfs_init. Cc: Stephen Boyd Signed-off-by: Sean Paul Reviewed-by: Abhinav Kumar --- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c index d77071965431..0a8c334c3a9f 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c @@ -231,8 +231,9 @@ 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, struct drm_minor *minor) +static int dpu_kms_debugfs_init(struct msm_kms *kms, struct drm_minor *minor) { + struct dpu_kms *dpu_kms = to_dpu_kms(kms); void *p = dpu_hw_util_get_log_mask_ptr(); struct dentry *entry; @@ -578,13 +579,6 @@ static int _dpu_kms_drm_obj_init(struct dpu_kms *dpu_kms) return ret; } -#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), minor); -} -#endif - static long dpu_kms_round_pixclk(struct msm_kms *kms, unsigned long rate, struct drm_encoder *encoder) {