* [PATCH] drm: register more drm device nodes @ 2024-05-30 15:34 James Zhu 2024-08-29 19:51 ` James Zhu 2024-08-29 21:37 ` [PATCH v2] " James Zhu 0 siblings, 2 replies; 5+ messages in thread From: James Zhu @ 2024-05-30 15:34 UTC (permalink / raw) To: dri-devel Cc: Alexander.Deucher, christian.koenig, daniel.vetter, epilmore, jamesz Since the default number 256 can't handle large modern systems with large numbers of GPUs, specify a more reasonable default. Signed-off-by: James Zhu <James.Zhu@amd.com> --- drivers/gpu/drm/drm_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c index 243cacb3575c..719ea57a70ab 100644 --- a/drivers/gpu/drm/drm_drv.c +++ b/drivers/gpu/drm/drm_drv.c @@ -1086,7 +1086,7 @@ static int __init drm_core_init(void) drm_debugfs_root = debugfs_create_dir("dri", NULL); - ret = register_chrdev(DRM_MAJOR, "drm", &drm_stub_fops); + ret = __register_chrdev(DRM_MAJOR, 0, 1024, "drm", &drm_stub_fops); if (ret < 0) goto error; -- 2.34.1 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] drm: register more drm device nodes 2024-05-30 15:34 [PATCH] drm: register more drm device nodes James Zhu @ 2024-08-29 19:51 ` James Zhu 2024-08-29 19:56 ` James Zhu 2024-08-29 21:37 ` [PATCH v2] " James Zhu 1 sibling, 1 reply; 5+ messages in thread From: James Zhu @ 2024-08-29 19:51 UTC (permalink / raw) To: James Zhu, dri-devel Cc: Alexander.Deucher, christian.koenig, daniel.vetter, epilmore Ping ... On 2024-05-30 11:34, James Zhu wrote: > Since the default number 256 can't handle large modern systems > with large numbers of GPUs, specify a more reasonable default. > > Signed-off-by: James Zhu <James.Zhu@amd.com> > --- > drivers/gpu/drm/drm_drv.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c > index 243cacb3575c..719ea57a70ab 100644 > --- a/drivers/gpu/drm/drm_drv.c > +++ b/drivers/gpu/drm/drm_drv.c > @@ -1086,7 +1086,7 @@ static int __init drm_core_init(void) > > drm_debugfs_root = debugfs_create_dir("dri", NULL); > > - ret = register_chrdev(DRM_MAJOR, "drm", &drm_stub_fops); > + ret = __register_chrdev(DRM_MAJOR, 0, 1024, "drm", &drm_stub_fops); > if (ret < 0) > goto error; > ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] drm: register more drm device nodes 2024-08-29 19:51 ` James Zhu @ 2024-08-29 19:56 ` James Zhu 0 siblings, 0 replies; 5+ messages in thread From: James Zhu @ 2024-08-29 19:56 UTC (permalink / raw) To: James Zhu, dri-devel Cc: Alexander.Deucher, christian.koenig, daniel.vetter, epilmore Please ignore this. need update unregister_chrdev in the meantime Will send out v2 later, On 2024-08-29 15:51, James Zhu wrote: > Ping ... > > On 2024-05-30 11:34, James Zhu wrote: >> Since the default number 256 can't handle large modern systems >> with large numbers of GPUs, specify a more reasonable default. >> >> Signed-off-by: James Zhu <James.Zhu@amd.com> >> --- >> drivers/gpu/drm/drm_drv.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c >> index 243cacb3575c..719ea57a70ab 100644 >> --- a/drivers/gpu/drm/drm_drv.c >> +++ b/drivers/gpu/drm/drm_drv.c >> @@ -1086,7 +1086,7 @@ static int __init drm_core_init(void) >> drm_debugfs_root = debugfs_create_dir("dri", NULL); >> - ret = register_chrdev(DRM_MAJOR, "drm", &drm_stub_fops); >> + ret = __register_chrdev(DRM_MAJOR, 0, 1024, "drm", &drm_stub_fops); >> if (ret < 0) >> goto error; ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2] drm: register more drm device nodes 2024-05-30 15:34 [PATCH] drm: register more drm device nodes James Zhu 2024-08-29 19:51 ` James Zhu @ 2024-08-29 21:37 ` James Zhu 2024-09-02 10:40 ` Daniel Vetter 1 sibling, 1 reply; 5+ messages in thread From: James Zhu @ 2024-08-29 21:37 UTC (permalink / raw) To: dri-devel Cc: Alexander.Deucher, christian.koenig, daniel.vetter, epilmore, jamesz Since the default number 256 can't handle large modern systems with large numbers of GPUs, specify a more reasonable default. -v2: update drm_core_exit to unregister more drm device nodes Signed-off-by: James Zhu <James.Zhu@amd.com> --- drivers/gpu/drm/drm_drv.c | 4 ++-- include/drm/drm_drv.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c index 243cacb3575c..bfc6c18a7a92 100644 --- a/drivers/gpu/drm/drm_drv.c +++ b/drivers/gpu/drm/drm_drv.c @@ -1063,7 +1063,7 @@ static void drm_core_exit(void) { drm_privacy_screen_lookup_exit(); accel_core_exit(); - unregister_chrdev(DRM_MAJOR, "drm"); + __unregister_chrdev(DRM_MAJOR, 0, DRM_CHRDEV_MAX, "drm"); debugfs_remove(drm_debugfs_root); drm_sysfs_destroy(); idr_destroy(&drm_minors_idr); @@ -1086,7 +1086,7 @@ static int __init drm_core_init(void) drm_debugfs_root = debugfs_create_dir("dri", NULL); - ret = register_chrdev(DRM_MAJOR, "drm", &drm_stub_fops); + ret = __register_chrdev(DRM_MAJOR, 0, DRM_CHRDEV_MAX, "drm", &drm_stub_fops); if (ret < 0) goto error; diff --git a/include/drm/drm_drv.h b/include/drm/drm_drv.h index 8878260d7529..8a2da92f02b7 100644 --- a/include/drm/drm_drv.h +++ b/include/drm/drm_drv.h @@ -45,6 +45,8 @@ struct drm_mode_create_dumb; struct drm_printer; struct sg_table; +#define DRM_CHRDEV_MAX 1024 + /** * enum drm_driver_feature - feature flags * -- 2.34.1 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2] drm: register more drm device nodes 2024-08-29 21:37 ` [PATCH v2] " James Zhu @ 2024-09-02 10:40 ` Daniel Vetter 0 siblings, 0 replies; 5+ messages in thread From: Daniel Vetter @ 2024-09-02 10:40 UTC (permalink / raw) To: James Zhu Cc: dri-devel, Alexander.Deucher, christian.koenig, daniel.vetter, epilmore, jamesz On Thu, Aug 29, 2024 at 05:37:30PM -0400, James Zhu wrote: > Since the default number 256 can't handle large modern systems > with large numbers of GPUs, specify a more reasonable default. > > -v2: update drm_core_exit to unregister more drm device nodes > > Signed-off-by: James Zhu <James.Zhu@amd.com> We've merged a more complete solution meanwhile, I think this should also cover your case: https://lore.kernel.org/dri-devel/b313a6f7-a857-4ec9-bc98-0480cd64bc20@amd.com/ Cheers, Sima > --- > drivers/gpu/drm/drm_drv.c | 4 ++-- > include/drm/drm_drv.h | 2 ++ > 2 files changed, 4 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c > index 243cacb3575c..bfc6c18a7a92 100644 > --- a/drivers/gpu/drm/drm_drv.c > +++ b/drivers/gpu/drm/drm_drv.c > @@ -1063,7 +1063,7 @@ static void drm_core_exit(void) > { > drm_privacy_screen_lookup_exit(); > accel_core_exit(); > - unregister_chrdev(DRM_MAJOR, "drm"); > + __unregister_chrdev(DRM_MAJOR, 0, DRM_CHRDEV_MAX, "drm"); > debugfs_remove(drm_debugfs_root); > drm_sysfs_destroy(); > idr_destroy(&drm_minors_idr); > @@ -1086,7 +1086,7 @@ static int __init drm_core_init(void) > > drm_debugfs_root = debugfs_create_dir("dri", NULL); > > - ret = register_chrdev(DRM_MAJOR, "drm", &drm_stub_fops); > + ret = __register_chrdev(DRM_MAJOR, 0, DRM_CHRDEV_MAX, "drm", &drm_stub_fops); > if (ret < 0) > goto error; > > diff --git a/include/drm/drm_drv.h b/include/drm/drm_drv.h > index 8878260d7529..8a2da92f02b7 100644 > --- a/include/drm/drm_drv.h > +++ b/include/drm/drm_drv.h > @@ -45,6 +45,8 @@ struct drm_mode_create_dumb; > struct drm_printer; > struct sg_table; > > +#define DRM_CHRDEV_MAX 1024 > + > /** > * enum drm_driver_feature - feature flags > * > -- > 2.34.1 > -- Simona Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-09-02 10:40 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2024-05-30 15:34 [PATCH] drm: register more drm device nodes James Zhu 2024-08-29 19:51 ` James Zhu 2024-08-29 19:56 ` James Zhu 2024-08-29 21:37 ` [PATCH v2] " James Zhu 2024-09-02 10:40 ` Daniel Vetter
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.