gpu: drm: Add root argument on drm_debugfs_remove_files() for Linux 6.7

Add root argument in the call drm_debugfs_remove_files() for Linux 6.7
as per below change from mainline:

***
commit 8e455145d8f163aefa6b9cc29478e0a9f82276e6
Author: Christian König <ckoenig.leichtzumerken@gmail.com>

    drm/debugfs: rework drm_debugfs_create_files implementation v2
***

Bug 4346767

Change-Id: Iadc878d66b093fd72b4524052dee9dbb24e82c1d
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3019998
Reviewed-by: Suresh Mangipudi <smangipudi@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Laxman Dewangan
2023-11-21 12:09:20 +00:00
committed by mobile promotions
parent 36d1775879
commit b17be80108
5 changed files with 50 additions and 0 deletions

View File

@@ -86,6 +86,9 @@ endif
# Changes done in Linux 6.7 onwards # Changes done in Linux 6.7 onwards
ifeq ($(shell test $(LINUX_VERSION) -ge $(LINUX_VERSION_6_7); echo $$?),0) ifeq ($(shell test $(LINUX_VERSION) -ge $(LINUX_VERSION_6_7); echo $$?),0)
subdir-ccflags-y += -DNV_ASOC_XXX_DROP subdir-ccflags-y += -DNV_ASOC_XXX_DROP
# drm_debugfs_remove_files has root argument
subdir-ccflags-y += -DNV_DRM_DEBUGFS_REMOVE_HAS_ROOT_ARGS
endif endif
ifeq ($(CONFIG_TEGRA_VIRTUALIZATION),y) ifeq ($(CONFIG_TEGRA_VIRTUALIZATION),y)

View File

@@ -1746,8 +1746,19 @@ static void tegra_dc_early_unregister(struct drm_crtc *crtc)
unsigned int count = ARRAY_SIZE(debugfs_files); unsigned int count = ARRAY_SIZE(debugfs_files);
struct drm_minor *minor = crtc->dev->primary; struct drm_minor *minor = crtc->dev->primary;
struct tegra_dc *dc = to_tegra_dc(crtc); struct tegra_dc *dc = to_tegra_dc(crtc);
#if defined(NV_DRM_DEBUGFS_REMOVE_HAS_ROOT_ARGS)
struct dentry *root;
#ifdef CONFIG_DEBUG_FS
root = crtc->debugfs_entry;
#else
root = NULL;
#endif
drm_debugfs_remove_files(dc->debugfs_files, count, root, minor);
#else
drm_debugfs_remove_files(dc->debugfs_files, count, minor); drm_debugfs_remove_files(dc->debugfs_files, count, minor);
#endif
kfree(dc->debugfs_files); kfree(dc->debugfs_files);
dc->debugfs_files = NULL; dc->debugfs_files = NULL;
} }

View File

@@ -254,9 +254,21 @@ static void tegra_dsi_early_unregister(struct drm_connector *connector)
struct tegra_output *output = connector_to_output(connector); struct tegra_output *output = connector_to_output(connector);
unsigned int count = ARRAY_SIZE(debugfs_files); unsigned int count = ARRAY_SIZE(debugfs_files);
struct tegra_dsi *dsi = to_dsi(output); struct tegra_dsi *dsi = to_dsi(output);
#if defined(NV_DRM_DEBUGFS_REMOVE_HAS_ROOT_ARGS)
struct dentry *root;
#ifdef CONFIG_DEBUG_FS
root = connector->debugfs_entry;
#else
root = NULL;
#endif
drm_debugfs_remove_files(dsi->debugfs_files, count,
root, connector->dev->primary);
#else
drm_debugfs_remove_files(dsi->debugfs_files, count, drm_debugfs_remove_files(dsi->debugfs_files, count,
connector->dev->primary); connector->dev->primary);
#endif
kfree(dsi->debugfs_files); kfree(dsi->debugfs_files);
dsi->debugfs_files = NULL; dsi->debugfs_files = NULL;
} }

View File

@@ -1121,8 +1121,19 @@ static void tegra_hdmi_early_unregister(struct drm_connector *connector)
struct drm_minor *minor = connector->dev->primary; struct drm_minor *minor = connector->dev->primary;
unsigned int count = ARRAY_SIZE(debugfs_files); unsigned int count = ARRAY_SIZE(debugfs_files);
struct tegra_hdmi *hdmi = to_hdmi(output); struct tegra_hdmi *hdmi = to_hdmi(output);
#if defined(NV_DRM_DEBUGFS_REMOVE_HAS_ROOT_ARGS)
struct dentry *root;
#ifdef CONFIG_DEBUG_FS
root = connector->debugfs_entry;
#else
root = NULL;
#endif
drm_debugfs_remove_files(hdmi->debugfs_files, count, root, minor);
#else
drm_debugfs_remove_files(hdmi->debugfs_files, count, minor); drm_debugfs_remove_files(hdmi->debugfs_files, count, minor);
#endif
kfree(hdmi->debugfs_files); kfree(hdmi->debugfs_files);
hdmi->debugfs_files = NULL; hdmi->debugfs_files = NULL;
} }

View File

@@ -1717,9 +1717,22 @@ static void tegra_sor_early_unregister(struct drm_connector *connector)
struct tegra_output *output = connector_to_output(connector); struct tegra_output *output = connector_to_output(connector);
unsigned int count = ARRAY_SIZE(debugfs_files); unsigned int count = ARRAY_SIZE(debugfs_files);
struct tegra_sor *sor = to_sor(output); struct tegra_sor *sor = to_sor(output);
#if defined(NV_DRM_DEBUGFS_REMOVE_HAS_ROOT_ARGS)
struct dentry *root;
#ifdef CONFIG_DEBUG_FS
root = connector->debugfs_entry;
#else
root = NULL;
#endif
drm_debugfs_remove_files(sor->debugfs_files, count,
root, connector->dev->primary);
#else
drm_debugfs_remove_files(sor->debugfs_files, count, drm_debugfs_remove_files(sor->debugfs_files, count,
connector->dev->primary); connector->dev->primary);
#endif
kfree(sor->debugfs_files); kfree(sor->debugfs_files);
sor->debugfs_files = NULL; sor->debugfs_files = NULL;
} }