From: Nirmoy Das <nirmoy.das@amd.com> To: <dri-devel@lists.freedesktop.org> Cc: <intel-gfx@lists.freedesktop.org>, Nirmoy Das <nirmoy.das@amd.com>, Thierry Reding <thierry.reding@gmail.com>, David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>, Jonathan Hunter <jonathanh@nvidia.com> Subject: [PATCH 5/5] drm/tegra: check root dentry before debugfs init Date: Fri, 8 Oct 2021 11:17:04 +0200 [thread overview] Message-ID: <20211008091704.27094-5-nirmoy.das@amd.com> (raw) In-Reply-To: <20211008091704.27094-1-nirmoy.das@amd.com> Return early if crtc or connector's debugfs root dentries are NULL. CC: Thierry Reding <thierry.reding@gmail.com> CC: David Airlie <airlied@linux.ie> CC: Daniel Vetter <daniel@ffwll.ch> CC: Jonathan Hunter <jonathanh@nvidia.com> Signed-off-by: Nirmoy Das <nirmoy.das@amd.com> --- drivers/gpu/drm/tegra/dc.c | 5 +++++ drivers/gpu/drm/tegra/dsi.c | 4 ++++ drivers/gpu/drm/tegra/hdmi.c | 5 +++++ drivers/gpu/drm/tegra/sor.c | 4 ++++ 4 files changed, 18 insertions(+) diff --git a/drivers/gpu/drm/tegra/dc.c b/drivers/gpu/drm/tegra/dc.c index 16c7aabb94d3..87eeda68d231 100644 --- a/drivers/gpu/drm/tegra/dc.c +++ b/drivers/gpu/drm/tegra/dc.c @@ -1623,6 +1623,11 @@ static int tegra_dc_late_register(struct drm_crtc *crtc) struct dentry *root; struct tegra_dc *dc = to_tegra_dc(crtc); + if (!crtc->debugfs_entry) { + dc->debugfs_files = NULL; + return 0; + } + #ifdef CONFIG_DEBUG_FS root = crtc->debugfs_entry; #else diff --git a/drivers/gpu/drm/tegra/dsi.c b/drivers/gpu/drm/tegra/dsi.c index f46d377f0c30..f0263165e261 100644 --- a/drivers/gpu/drm/tegra/dsi.c +++ b/drivers/gpu/drm/tegra/dsi.c @@ -236,6 +236,10 @@ static int tegra_dsi_late_register(struct drm_connector *connector) struct dentry *root = connector->debugfs_entry; struct tegra_dsi *dsi = to_dsi(output); + if (!root) { + dsi->debugfs_files = NULL; + return 0; + } dsi->debugfs_files = kmemdup(debugfs_files, sizeof(debugfs_files), GFP_KERNEL); if (!dsi->debugfs_files) diff --git a/drivers/gpu/drm/tegra/hdmi.c b/drivers/gpu/drm/tegra/hdmi.c index e5d2a4026028..400319db0afc 100644 --- a/drivers/gpu/drm/tegra/hdmi.c +++ b/drivers/gpu/drm/tegra/hdmi.c @@ -1065,6 +1065,11 @@ static int tegra_hdmi_late_register(struct drm_connector *connector) struct dentry *root = connector->debugfs_entry; struct tegra_hdmi *hdmi = to_hdmi(output); + if (!root) { + hdmi->debugfs_files = NULL; + return 0; + } + hdmi->debugfs_files = kmemdup(debugfs_files, sizeof(debugfs_files), GFP_KERNEL); if (!hdmi->debugfs_files) diff --git a/drivers/gpu/drm/tegra/sor.c b/drivers/gpu/drm/tegra/sor.c index 0ea320c1092b..a8a3b0a587d9 100644 --- a/drivers/gpu/drm/tegra/sor.c +++ b/drivers/gpu/drm/tegra/sor.c @@ -1687,6 +1687,10 @@ static int tegra_sor_late_register(struct drm_connector *connector) struct dentry *root = connector->debugfs_entry; struct tegra_sor *sor = to_sor(output); + if (!root) { + sor->debugfs_files = NULL; + return 0; + } sor->debugfs_files = kmemdup(debugfs_files, sizeof(debugfs_files), GFP_KERNEL); if (!sor->debugfs_files) -- 2.32.0
WARNING: multiple messages have this Message-ID (diff)
From: Nirmoy Das <nirmoy.das@amd.com> To: <dri-devel@lists.freedesktop.org> Cc: <intel-gfx@lists.freedesktop.org>, Nirmoy Das <nirmoy.das@amd.com>, Thierry Reding <thierry.reding@gmail.com>, David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>, Jonathan Hunter <jonathanh@nvidia.com> Subject: [Intel-gfx] [PATCH 5/5] drm/tegra: check root dentry before debugfs init Date: Fri, 8 Oct 2021 11:17:04 +0200 [thread overview] Message-ID: <20211008091704.27094-5-nirmoy.das@amd.com> (raw) In-Reply-To: <20211008091704.27094-1-nirmoy.das@amd.com> Return early if crtc or connector's debugfs root dentries are NULL. CC: Thierry Reding <thierry.reding@gmail.com> CC: David Airlie <airlied@linux.ie> CC: Daniel Vetter <daniel@ffwll.ch> CC: Jonathan Hunter <jonathanh@nvidia.com> Signed-off-by: Nirmoy Das <nirmoy.das@amd.com> --- drivers/gpu/drm/tegra/dc.c | 5 +++++ drivers/gpu/drm/tegra/dsi.c | 4 ++++ drivers/gpu/drm/tegra/hdmi.c | 5 +++++ drivers/gpu/drm/tegra/sor.c | 4 ++++ 4 files changed, 18 insertions(+) diff --git a/drivers/gpu/drm/tegra/dc.c b/drivers/gpu/drm/tegra/dc.c index 16c7aabb94d3..87eeda68d231 100644 --- a/drivers/gpu/drm/tegra/dc.c +++ b/drivers/gpu/drm/tegra/dc.c @@ -1623,6 +1623,11 @@ static int tegra_dc_late_register(struct drm_crtc *crtc) struct dentry *root; struct tegra_dc *dc = to_tegra_dc(crtc); + if (!crtc->debugfs_entry) { + dc->debugfs_files = NULL; + return 0; + } + #ifdef CONFIG_DEBUG_FS root = crtc->debugfs_entry; #else diff --git a/drivers/gpu/drm/tegra/dsi.c b/drivers/gpu/drm/tegra/dsi.c index f46d377f0c30..f0263165e261 100644 --- a/drivers/gpu/drm/tegra/dsi.c +++ b/drivers/gpu/drm/tegra/dsi.c @@ -236,6 +236,10 @@ static int tegra_dsi_late_register(struct drm_connector *connector) struct dentry *root = connector->debugfs_entry; struct tegra_dsi *dsi = to_dsi(output); + if (!root) { + dsi->debugfs_files = NULL; + return 0; + } dsi->debugfs_files = kmemdup(debugfs_files, sizeof(debugfs_files), GFP_KERNEL); if (!dsi->debugfs_files) diff --git a/drivers/gpu/drm/tegra/hdmi.c b/drivers/gpu/drm/tegra/hdmi.c index e5d2a4026028..400319db0afc 100644 --- a/drivers/gpu/drm/tegra/hdmi.c +++ b/drivers/gpu/drm/tegra/hdmi.c @@ -1065,6 +1065,11 @@ static int tegra_hdmi_late_register(struct drm_connector *connector) struct dentry *root = connector->debugfs_entry; struct tegra_hdmi *hdmi = to_hdmi(output); + if (!root) { + hdmi->debugfs_files = NULL; + return 0; + } + hdmi->debugfs_files = kmemdup(debugfs_files, sizeof(debugfs_files), GFP_KERNEL); if (!hdmi->debugfs_files) diff --git a/drivers/gpu/drm/tegra/sor.c b/drivers/gpu/drm/tegra/sor.c index 0ea320c1092b..a8a3b0a587d9 100644 --- a/drivers/gpu/drm/tegra/sor.c +++ b/drivers/gpu/drm/tegra/sor.c @@ -1687,6 +1687,10 @@ static int tegra_sor_late_register(struct drm_connector *connector) struct dentry *root = connector->debugfs_entry; struct tegra_sor *sor = to_sor(output); + if (!root) { + sor->debugfs_files = NULL; + return 0; + } sor->debugfs_files = kmemdup(debugfs_files, sizeof(debugfs_files), GFP_KERNEL); if (!sor->debugfs_files) -- 2.32.0
next prev parent reply other threads:[~2021-10-08 9:17 UTC|newest] Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-10-08 9:17 [PATCH 1/5] dri: cleanup debugfs error handling Nirmoy Das 2021-10-08 9:17 ` [Intel-gfx] " Nirmoy Das 2021-10-08 9:17 ` [PATCH 2/5] drm/i915: check dri root before debugfs init Nirmoy Das 2021-10-08 9:17 ` [Intel-gfx] " Nirmoy Das 2021-10-12 9:59 ` Wang, Zhi A 2021-10-12 9:59 ` [Intel-gfx] " Wang, Zhi A 2021-10-12 10:19 ` Das, Nirmoy 2021-10-12 10:19 ` [Intel-gfx] " Das, Nirmoy 2021-10-08 9:17 ` [PATCH 3/5] drm/radeon: " Nirmoy Das 2021-10-08 9:17 ` [Intel-gfx] " Nirmoy Das 2021-10-08 10:23 ` Christian König 2021-10-08 10:23 ` [Intel-gfx] " Christian König 2021-10-08 10:34 ` Das, Nirmoy 2021-10-08 10:34 ` [Intel-gfx] " Das, Nirmoy 2021-10-08 9:17 ` [PATCH 4/5] drm/armada: check dri/crtc " Nirmoy Das 2021-10-08 9:17 ` [Intel-gfx] " Nirmoy Das 2021-10-12 19:40 ` kernel test robot 2021-10-12 19:40 ` kernel test robot 2021-10-12 19:40 ` [Intel-gfx] " kernel test robot 2021-10-08 9:17 ` Nirmoy Das [this message] 2021-10-08 9:17 ` [Intel-gfx] [PATCH 5/5] drm/tegra: check root dentry " Nirmoy Das 2021-11-08 6:35 ` kernel test robot 2021-11-08 6:35 ` kernel test robot 2021-11-08 6:35 ` [Intel-gfx] " kernel test robot 2021-10-08 9:35 ` [PATCH 1/5] dri: cleanup debugfs error handling Thomas Zimmermann 2021-10-08 9:35 ` [Intel-gfx] " Thomas Zimmermann 2021-10-08 9:40 ` Jani Nikula 2021-10-08 11:07 ` Greg KH 2021-10-08 12:08 ` Das, Nirmoy [not found] ` <02fc9da3-ebac-2df1-3a54-d764b273f91b@amd.com> 2021-10-08 12:56 ` Fw: " Das, Nirmoy [not found] ` <c4f1464d-19b6-04a3-e2d8-a153bfbb050a@amd.com> [not found] ` <YWBfvILqkBQ8VSYc@kroah.com> 2021-10-11 14:19 ` Christian König 2021-10-11 14:53 ` Greg KH 2021-10-11 16:38 ` Jani Nikula 2021-10-11 17:07 ` Greg KH 2021-10-11 18:43 ` Jani Nikula 2021-10-11 15:13 ` Das, Nirmoy 2021-10-08 14:09 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/5] " Patchwork 2021-10-08 14:10 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork 2021-10-08 19:18 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20211008091704.27094-5-nirmoy.das@amd.com \ --to=nirmoy.das@amd.com \ --cc=airlied@linux.ie \ --cc=daniel@ffwll.ch \ --cc=dri-devel@lists.freedesktop.org \ --cc=intel-gfx@lists.freedesktop.org \ --cc=jonathanh@nvidia.com \ --cc=thierry.reding@gmail.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.