From: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
To: Thomas Zimmermann <tzimmermann@suse.de>,
dri-devel@lists.freedesktop.org, Hans de Goede <hansg@kernel.org>
Cc: kernel-dev@igalia.com, Christian König <christian.koenig@amd.com>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>
Subject: Re: [PATCH] drm: Drop unused drm_device_class_(un)register API
Date: Wed, 29 Apr 2026 11:45:14 +0100 [thread overview]
Message-ID: <6cc225d0-774d-406d-a528-ddf89cbdf04a@igalia.com> (raw)
In-Reply-To: <4b1e0f32-36b7-41be-8ce1-95e6f023b62d@suse.de>
On 29/04/2026 10:35, Thomas Zimmermann wrote:
> Hi
>
> Am 29.04.26 um 10:57 schrieb Tvrtko Ursulin:
>> The API has been unused since commit
>> ed89fff97382 ("drm/ttm: drop sysfs directory")
>> so lets remove it.
>
> drm_privacy_screen_register() uses the same pattern. [1] If that helper
> is being converted over to drm_class_device_register(), the global
> drm_class could be internalized into drm_sysfb.c. Personally, I think
> this is the better solution, but either seems fine. [1] https://
> elixir.bootlin.com/linux/v7.0.1/source/drivers/gpu/drm/
> drm_privacy_screen.c#L405
I did not spot that one. The alternative sounds reasonable to me. Adding
Hans to check if he wants to take over converting this driver.
Regards,
Tvrtko
>> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
>> Cc: Christian König <christian.koenig@amd.com>
>> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
>> Cc: Maxime Ripard <mripard@kernel.org>
>> Cc: Thomas Zimmermann <tzimmermann@suse.de>
>> Cc: David Airlie <airlied@gmail.com>
>> Cc: Simona Vetter <simona@ffwll.ch>
>> ---
>> drivers/gpu/drm/drm_sysfs.c | 32 --------------------------------
>> include/drm/drm_sysfs.h | 4 ----
>> 2 files changed, 36 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/drm_sysfs.c b/drivers/gpu/drm/drm_sysfs.c
>> index 43b2c3eaa7e4..7433bf8136cc 100644
>> --- a/drivers/gpu/drm/drm_sysfs.c
>> +++ b/drivers/gpu/drm/drm_sysfs.c
>> @@ -645,35 +645,3 @@ struct device *drm_sysfs_minor_alloc(struct
>> drm_minor *minor)
>> put_device(kdev);
>> return ERR_PTR(r);
>> }
>> -
>> -/**
>> - * drm_class_device_register - register new device with the DRM sysfs
>> class
>> - * @dev: device to register
>> - *
>> - * Registers a new &struct device within the DRM sysfs class.
>> Essentially only
>> - * used by ttm to have a place for its global settings. Drivers
>> should never use
>> - * this.
>> - */
>> -int drm_class_device_register(struct device *dev)
>> -{
>> - if (!drm_class || IS_ERR(drm_class))
>> - return -ENOENT;
>> -
>> - dev->class = drm_class;
>> - return device_register(dev);
>> -}
>> -EXPORT_SYMBOL_GPL(drm_class_device_register);
>> -
>> -/**
>> - * drm_class_device_unregister - unregister device with the DRM sysfs
>> class
>> - * @dev: device to unregister
>> - *
>> - * Unregisters a &struct device from the DRM sysfs class. Essentially
>> only used
>> - * by ttm to have a place for its global settings. Drivers should
>> never use
>> - * this.
>> - */
>> -void drm_class_device_unregister(struct device *dev)
>> -{
>> - return device_unregister(dev);
>> -}
>> -EXPORT_SYMBOL_GPL(drm_class_device_unregister);
>> diff --git a/include/drm/drm_sysfs.h b/include/drm/drm_sysfs.h
>> index 96a5d858404b..7695873a9456 100644
>> --- a/include/drm/drm_sysfs.h
>> +++ b/include/drm/drm_sysfs.h
>> @@ -3,13 +3,9 @@
>> #define _DRM_SYSFS_H_
>> struct drm_device;
>> -struct device;
>> struct drm_connector;
>> struct drm_property;
>> -int drm_class_device_register(struct device *dev);
>> -void drm_class_device_unregister(struct device *dev);
>> -
>> void drm_sysfs_hotplug_event(struct drm_device *dev);
>> void drm_sysfs_connector_hotplug_event(struct drm_connector
>> *connector);
>> void drm_sysfs_connector_property_event(struct drm_connector
>> *connector,
>
next prev parent reply other threads:[~2026-04-29 10:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-29 8:57 [PATCH] drm: Drop unused drm_device_class_(un)register API Tvrtko Ursulin
2026-04-29 9:35 ` Thomas Zimmermann
2026-04-29 10:45 ` Tvrtko Ursulin [this message]
2026-04-29 12:15 ` Christian König
2026-05-05 1:46 ` Claude review: " Claude Code Review Bot
2026-05-05 1:46 ` Claude Code Review Bot
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=6cc225d0-774d-406d-a528-ddf89cbdf04a@igalia.com \
--to=tvrtko.ursulin@igalia.com \
--cc=airlied@gmail.com \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=hansg@kernel.org \
--cc=kernel-dev@igalia.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=simona@ffwll.ch \
--cc=tzimmermann@suse.de \
/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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox