* [PATCH 1/2] drm/amdgpu: Fix no-procfs build
@ 2023-05-25 15:52 Rob Clark
2023-05-25 15:52 ` [PATCH 2/2] drm/amdgpu: Remove duplicate fdinfo fields Rob Clark
2023-05-26 7:18 ` [PATCH 1/2] drm/amdgpu: Fix no-procfs build Neil Armstrong
0 siblings, 2 replies; 5+ messages in thread
From: Rob Clark @ 2023-05-25 15:52 UTC (permalink / raw)
To: dri-devel
Cc: Rob Clark, kernel test robot, Alex Deucher, Christian König,
Pan, Xinhui, David Airlie, Daniel Vetter, Guchun Chen,
Marek Olšák, Lijo Lazar, YiPeng Chai,
Srinivasan Shanmugam, Michel Dänzer, Jim Cromie,
Mario Limonciello, Neil Armstrong, Dave Airlie,
open list:RADEON and AMDGPU DRM DRIVERS, open list
From: Rob Clark <robdclark@chromium.org>
Fixes undefined symbol when PROC_FS is not enabled.
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202305251510.U0R2as7k-lkp@intel.com/
Fixes: 376c25f8ca47 ("drm/amdgpu: Switch to fdinfo helper")
Signed-off-by: Rob Clark <robdclark@chromium.org>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
index 1b46e7ac7cb0..c9a41c997c6c 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
@@ -2795,21 +2795,23 @@ static const struct drm_driver amdgpu_kms_driver = {
DRIVER_SYNCOBJ_TIMELINE,
.open = amdgpu_driver_open_kms,
.postclose = amdgpu_driver_postclose_kms,
.lastclose = amdgpu_driver_lastclose_kms,
.ioctls = amdgpu_ioctls_kms,
.num_ioctls = ARRAY_SIZE(amdgpu_ioctls_kms),
.dumb_create = amdgpu_mode_dumb_create,
.dumb_map_offset = amdgpu_mode_dumb_mmap,
.fops = &amdgpu_driver_kms_fops,
.release = &amdgpu_driver_release_kms,
+#ifdef CONFIG_PROC_FS
.show_fdinfo = amdgpu_show_fdinfo,
+#endif
.prime_handle_to_fd = drm_gem_prime_handle_to_fd,
.prime_fd_to_handle = drm_gem_prime_fd_to_handle,
.gem_prime_import = amdgpu_gem_prime_import,
.gem_prime_mmap = drm_gem_prime_mmap,
.name = DRIVER_NAME,
.desc = DRIVER_DESC,
.date = DRIVER_DATE,
.major = KMS_DRIVER_MAJOR,
--
2.40.1
^ permalink raw reply [flat|nested] 5+ messages in thread* [PATCH 2/2] drm/amdgpu: Remove duplicate fdinfo fields 2023-05-25 15:52 [PATCH 1/2] drm/amdgpu: Fix no-procfs build Rob Clark @ 2023-05-25 15:52 ` Rob Clark 2023-05-25 20:28 ` Alex Deucher 2023-05-26 7:17 ` Neil Armstrong 2023-05-26 7:18 ` [PATCH 1/2] drm/amdgpu: Fix no-procfs build Neil Armstrong 1 sibling, 2 replies; 5+ messages in thread From: Rob Clark @ 2023-05-25 15:52 UTC (permalink / raw) To: dri-devel Cc: Rob Clark, Alex Deucher, Christian König, Pan, Xinhui, David Airlie, Daniel Vetter, Shashank Sharma, Tvrtko Ursulin, Marek Olšák, Dave Airlie, Neil Armstrong, open list:RADEON and AMDGPU DRM DRIVERS, open list From: Rob Clark <robdclark@chromium.org> Some of the fields that are handled by drm_show_fdinfo() crept back in when rebasing the patch. Remove them again. Fixes: 376c25f8ca47 ("drm/amdgpu: Switch to fdinfo helper") Signed-off-by: Rob Clark <robdclark@chromium.org> --- drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c index 13d7413d4ca3..a93e5627901a 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c @@ -80,23 +80,20 @@ void amdgpu_show_fdinfo(struct drm_printer *p, struct drm_file *file) amdgpu_ctx_mgr_usage(&fpriv->ctx_mgr, usage); /* * ****************************************************************** * For text output format description please see drm-usage-stats.rst! * ****************************************************************** */ drm_printf(p, "pasid:\t%u\n", fpriv->vm.pasid); - drm_printf(p, "drm-driver:\t%s\n", file->minor->dev->driver->name); - drm_printf(p, "drm-pdev:\t%04x:%02x:%02x.%d\n", domain, bus, dev, fn); - drm_printf(p, "drm-client-id:\t%Lu\n", vm->immediate.fence_context); drm_printf(p, "drm-memory-vram:\t%llu KiB\n", stats.vram/1024UL); drm_printf(p, "drm-memory-gtt: \t%llu KiB\n", stats.gtt/1024UL); drm_printf(p, "drm-memory-cpu: \t%llu KiB\n", stats.cpu/1024UL); drm_printf(p, "amd-memory-visible-vram:\t%llu KiB\n", stats.visible_vram/1024UL); drm_printf(p, "amd-evicted-vram:\t%llu KiB\n", stats.evicted_vram/1024UL); drm_printf(p, "amd-evicted-visible-vram:\t%llu KiB\n", stats.evicted_visible_vram/1024UL); drm_printf(p, "amd-requested-vram:\t%llu KiB\n", -- 2.40.1 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] drm/amdgpu: Remove duplicate fdinfo fields 2023-05-25 15:52 ` [PATCH 2/2] drm/amdgpu: Remove duplicate fdinfo fields Rob Clark @ 2023-05-25 20:28 ` Alex Deucher 2023-05-26 7:17 ` Neil Armstrong 1 sibling, 0 replies; 5+ messages in thread From: Alex Deucher @ 2023-05-25 20:28 UTC (permalink / raw) To: Rob Clark Cc: dri-devel, Rob Clark, Neil Armstrong, Shashank Sharma, Marek Olšák, Pan, Xinhui, open list, open list:RADEON and AMDGPU DRM DRIVERS, Tvrtko Ursulin, Daniel Vetter, Alex Deucher, Dave Airlie, David Airlie, Christian König On Thu, May 25, 2023 at 11:52 AM Rob Clark <robdclark@gmail.com> wrote: > > From: Rob Clark <robdclark@chromium.org> > > Some of the fields that are handled by drm_show_fdinfo() crept back in > when rebasing the patch. Remove them again. > > Fixes: 376c25f8ca47 ("drm/amdgpu: Switch to fdinfo helper") > Signed-off-by: Rob Clark <robdclark@chromium.org> Series is: Reviewed-by: <alexander.deucher@amd.com> > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c > index 13d7413d4ca3..a93e5627901a 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c > @@ -80,23 +80,20 @@ void amdgpu_show_fdinfo(struct drm_printer *p, struct drm_file *file) > > amdgpu_ctx_mgr_usage(&fpriv->ctx_mgr, usage); > > /* > * ****************************************************************** > * For text output format description please see drm-usage-stats.rst! > * ****************************************************************** > */ > > drm_printf(p, "pasid:\t%u\n", fpriv->vm.pasid); > - drm_printf(p, "drm-driver:\t%s\n", file->minor->dev->driver->name); > - drm_printf(p, "drm-pdev:\t%04x:%02x:%02x.%d\n", domain, bus, dev, fn); > - drm_printf(p, "drm-client-id:\t%Lu\n", vm->immediate.fence_context); > drm_printf(p, "drm-memory-vram:\t%llu KiB\n", stats.vram/1024UL); > drm_printf(p, "drm-memory-gtt: \t%llu KiB\n", stats.gtt/1024UL); > drm_printf(p, "drm-memory-cpu: \t%llu KiB\n", stats.cpu/1024UL); > drm_printf(p, "amd-memory-visible-vram:\t%llu KiB\n", > stats.visible_vram/1024UL); > drm_printf(p, "amd-evicted-vram:\t%llu KiB\n", > stats.evicted_vram/1024UL); > drm_printf(p, "amd-evicted-visible-vram:\t%llu KiB\n", > stats.evicted_visible_vram/1024UL); > drm_printf(p, "amd-requested-vram:\t%llu KiB\n", > -- > 2.40.1 > ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] drm/amdgpu: Remove duplicate fdinfo fields 2023-05-25 15:52 ` [PATCH 2/2] drm/amdgpu: Remove duplicate fdinfo fields Rob Clark 2023-05-25 20:28 ` Alex Deucher @ 2023-05-26 7:17 ` Neil Armstrong 1 sibling, 0 replies; 5+ messages in thread From: Neil Armstrong @ 2023-05-26 7:17 UTC (permalink / raw) To: Rob Clark, dri-devel Cc: Rob Clark, Alex Deucher, Christian König, Pan, Xinhui, David Airlie, Daniel Vetter, Shashank Sharma, Tvrtko Ursulin, Marek Olšák, Dave Airlie, open list:RADEON and AMDGPU DRM DRIVERS, open list Hi Rob, On 25/05/2023 17:52, Rob Clark wrote: > From: Rob Clark <robdclark@chromium.org> > > Some of the fields that are handled by drm_show_fdinfo() crept back in > when rebasing the patch. Remove them again. > > Fixes: 376c25f8ca47 ("drm/amdgpu: Switch to fdinfo helper") > Signed-off-by: Rob Clark <robdclark@chromium.org> > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c > index 13d7413d4ca3..a93e5627901a 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c > @@ -80,23 +80,20 @@ void amdgpu_show_fdinfo(struct drm_printer *p, struct drm_file *file) > > amdgpu_ctx_mgr_usage(&fpriv->ctx_mgr, usage); > > /* > * ****************************************************************** > * For text output format description please see drm-usage-stats.rst! > * ****************************************************************** > */ > > drm_printf(p, "pasid:\t%u\n", fpriv->vm.pasid); > - drm_printf(p, "drm-driver:\t%s\n", file->minor->dev->driver->name); > - drm_printf(p, "drm-pdev:\t%04x:%02x:%02x.%d\n", domain, bus, dev, fn); > - drm_printf(p, "drm-client-id:\t%Lu\n", vm->immediate.fence_context); > drm_printf(p, "drm-memory-vram:\t%llu KiB\n", stats.vram/1024UL); > drm_printf(p, "drm-memory-gtt: \t%llu KiB\n", stats.gtt/1024UL); > drm_printf(p, "drm-memory-cpu: \t%llu KiB\n", stats.cpu/1024UL); > drm_printf(p, "amd-memory-visible-vram:\t%llu KiB\n", > stats.visible_vram/1024UL); > drm_printf(p, "amd-evicted-vram:\t%llu KiB\n", > stats.evicted_vram/1024UL); > drm_printf(p, "amd-evicted-visible-vram:\t%llu KiB\n", > stats.evicted_visible_vram/1024UL); > drm_printf(p, "amd-requested-vram:\t%llu KiB\n", I got: drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c: In function ‘amdgpu_show_fdinfo’: drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c:64:32: error: variable ‘domain’ set but not used [-Werror=unused-but-set-variable] 64 | uint32_t bus, dev, fn, domain; | ^~~~~~ drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c:64:28: error: variable ‘fn’ set but not used [-Werror=unused-but-set-variable] 64 | uint32_t bus, dev, fn, domain; | ^~ drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c:64:23: error: variable ‘dev’ set but not used [-Werror=unused-but-set-variable] 64 | uint32_t bus, dev, fn, domain; | ^~~ drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c:64:18: error: variable ‘bus’ set but not used [-Werror=unused-but-set-variable] 64 | uint32_t bus, dev, fn, domain; after applying patch 2, can you fix it ? Seems you can keep the drm-pdev print line I applied patch 1 Thanks, Neil ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] drm/amdgpu: Fix no-procfs build 2023-05-25 15:52 [PATCH 1/2] drm/amdgpu: Fix no-procfs build Rob Clark 2023-05-25 15:52 ` [PATCH 2/2] drm/amdgpu: Remove duplicate fdinfo fields Rob Clark @ 2023-05-26 7:18 ` Neil Armstrong 1 sibling, 0 replies; 5+ messages in thread From: Neil Armstrong @ 2023-05-26 7:18 UTC (permalink / raw) To: dri-devel, Rob Clark Cc: Rob Clark, kernel test robot, Alex Deucher, Christian König, Pan, Xinhui, David Airlie, Daniel Vetter, Guchun Chen, Marek Olšák, Lijo Lazar, YiPeng Chai, Srinivasan Shanmugam, Michel Dänzer, Jim Cromie, Mario Limonciello, Dave Airlie, amd-gfx, linux-kernel Hi, On Thu, 25 May 2023 08:52:24 -0700, Rob Clark wrote: > Fixes undefined symbol when PROC_FS is not enabled. > > Thanks, Applied to https://anongit.freedesktop.org/git/drm/drm-misc.git (drm-misc-next) [1/2] drm/amdgpu: Fix no-procfs build https://cgit.freedesktop.org/drm/drm-misc/commit/?id=1a56fcf08ae463a4564d111356091b2bdb6c7bce [2/2] drm/amdgpu: Remove duplicate fdinfo fields (no commit info) -- Neil ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-05-26 7:18 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2023-05-25 15:52 [PATCH 1/2] drm/amdgpu: Fix no-procfs build Rob Clark 2023-05-25 15:52 ` [PATCH 2/2] drm/amdgpu: Remove duplicate fdinfo fields Rob Clark 2023-05-25 20:28 ` Alex Deucher 2023-05-26 7:17 ` Neil Armstrong 2023-05-26 7:18 ` [PATCH 1/2] drm/amdgpu: Fix no-procfs build Neil Armstrong
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®