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: 10960185 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 775D81390 for ; Fri, 24 May 2019 17:32:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5C8CB28A09 for ; Fri, 24 May 2019 17:32:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 50EAE28A0A; Fri, 24 May 2019 17:32:36 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CE9C628A02 for ; Fri, 24 May 2019 17:32:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731464AbfEXRcf (ORCPT ); Fri, 24 May 2019 13:32:35 -0400 Received: from mail-yb1-f195.google.com ([209.85.219.195]:36853 "EHLO mail-yb1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725923AbfEXRcf (ORCPT ); Fri, 24 May 2019 13:32:35 -0400 Received: by mail-yb1-f195.google.com with SMTP id y2so1124443ybo.3 for ; Fri, 24 May 2019 10:32:34 -0700 (PDT) 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-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=ecOHnsgi+yrCmCl+bYnqEqw+/jffMOU4PFnNhLEDt0gv6naXsr5yuKiTAPg3xx+cM/ 2nQskM1p3OpHX8alx2LNthUKu4/rmPIyisBWmUOqcQHyugFzZilaQRTX9kKN41Ih2rzY LnH1ZohEoDmHyWA0gciUgFoi8OCMfvkVgk7fUupTkGhyHfNYp8AWF6t0aABSDSNCN25r Q7W87Y6bQGfM+yMiTYF4i81ZAcfFdF0UUzPOr1stcUe5f6in+jAXOayfIz/dCM0osvJI YUSsC0dSCWf/2VH32RXK2AL0rnC0blAZOsxN50F20CRmz6Y2ITet2Mrwgz46hELMp4vz 7h7A== X-Gm-Message-State: APjAAAXK5ksXiVw7au4jd0+SOEGcWWLGWoEgatHlSwfUEdJU5XlH99Mi ZtjNzexDNeNKPLFpOxYl+oOX+iTK1Qk= 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 Cc: Sean Paul , Stephen Boyd , Rob Clark , Sean Paul , linux-arm-msm@vger.kernel.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 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org 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: 10960193 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 AD36916C1 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 907E328A07 for ; Fri, 24 May 2019 17:32:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 84645289FF; Fri, 24 May 2019 17:32:40 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3384328A09 for ; Fri, 24 May 2019 17:32:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731771AbfEXRcj (ORCPT ); Fri, 24 May 2019 13:32:39 -0400 Received: from mail-yb1-f193.google.com ([209.85.219.193]:40075 "EHLO mail-yb1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725923AbfEXRcj (ORCPT ); Fri, 24 May 2019 13:32:39 -0400 Received: by mail-yb1-f193.google.com with SMTP id g62so3905475ybg.7 for ; Fri, 24 May 2019 10:32:39 -0700 (PDT) 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-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=nESEOBjnJKCciYf24fkS41J4Ms1tKswQlkN+3XqluYY0lZ+yk9KCEosYQvhFj8avAm krVGIk17xCF6/umnnHZIuIQnBrdc6d1bIfocWggGJU0f62vNQGuB9Jj0wPozPeKNX7nD vaDMFZwCPt2E6G3GytoiRfl3NJ0EL2iWBYk9pEAMNg+kOEbblvr4OkmMCdOqj9Fyx1ui vu1ZeUliSZypZXAhu7RJXeqOvGAFW+FnxrO4ZsG35SW4gtTr3jmy//KLf5hFabfJBygE z3XP8zFNLiHaB+8Zw29tCsla3+BzWQzIbqtrV7fdpczfr0RWp+Q/sBDMRxVaaK3+CzoT 8nYg== X-Gm-Message-State: APjAAAUnGvKWgPWGfxYDbymQGw3SZyt0baspWlhvMgyFZkgkehlzn8RM AcoKDCsgt7lEtY+cmLDgncSWnH6uD1c= 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 Cc: Sean Paul , Stephen Boyd , Rob Clark , Sean Paul , linux-arm-msm@vger.kernel.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 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org 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) {