drm/irq: drm_legacy_ prefix for legacy ioctls
Subsystems (2)
PATCH 1/1 drm/irq: drm_legacy_ prefix for legacy ioctls
Spotted while auditing our ioctl table. Also nuke the not-really-kerneldoc comments, we don't document internals and definitely don't want to mislead people with the old dragons.
I think with this all the legacy ioctls now have proper drm_legacy_ prefixes.
--- drivers/gpu/drm/drm_internal.h | 8 ++++---- drivers/gpu/drm/drm_ioctl.c | 4 ++-- drivers/gpu/drm/drm_irq.c | 30 ++++-------------------------- 3 files changed, 10 insertions(+), 32 deletions(-)
drivers/gpu/drm/drm_internal.h +4 -4
@@ -58,10 +58,10 @@ extern unsigned int drm_timestamp_monotonic;/* IOCTLS */ int drm_wait_vblank (struct drm_device *dev,void *data,struct drm_file *filp); -int drm_control (struct drm_device *dev,void *data, -struct drm_file *file_priv); -int drm_modeset_ctl (struct drm_device *dev,void *data, -struct drm_file *file_priv); +int drm_legacy_irq_control (struct drm_device *dev,void *data, +struct drm_file *file_priv); +int drm_legacy_modeset_ctl (struct drm_device *dev,void *data, +struct drm_file *file_priv);/* drm_auth.c */ int drm_getmagic(struct drm_device *dev, void *data,
drivers/gpu/drm/drm_ioctl.c +2 -2
@@ -574,7 +574,7 @@ static const struct drm_ioctl_desc drm_ioctls[] = {DRM_IOCTL_DEF (DRM_IOCTL_FREE_BUFS , drm_legacy_freebufs,DRM_AUTH ),DRM_IOCTL_DEF (DRM_IOCTL_DMA , drm_legacy_dma_ioctl,DRM_AUTH ), -DRM_IOCTL_DEF (DRM_IOCTL_CONTROL , drm_control,DRM_AUTH |DRM_MASTER |DRM_ROOT_ONLY ), +DRM_IOCTL_DEF (DRM_IOCTL_CONTROL , drm_legacy_irq_control,DRM_AUTH |DRM_MASTER |DRM_ROOT_ONLY ), #if IS_ENABLED(CONFIG_AGP) DRM_IOCTL_DEF(DRM_IOCTL_AGP_ACQUIRE, drm_agp_acquire_ioctl, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY),
@@ -592,7 +592,7 @@ static const struct drm_ioctl_desc drm_ioctls[] = {DRM_IOCTL_DEF (DRM_IOCTL_WAIT_VBLANK , drm_wait_vblank,DRM_MASTER |DRM_UNLOCKED ), -DRM_IOCTL_DEF (DRM_IOCTL_MODESET_CTL , drm_modeset_ctl,0 ), +DRM_IOCTL_DEF (DRM_IOCTL_MODESET_CTL , drm_legacy_modeset_ctl,0 ), DRM_IOCTL_DEF(DRM_IOCTL_UPDATE_DRAW, drm_noop, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY),
drivers/gpu/drm/drm_irq.c +4 -26
@@ -579,19 +579,8 @@ int drm_irq_uninstall(struct drm_device *dev) }EXPORT_SYMBOL (drm_irq_uninstall); -/* -* IRQ control ioctl. -* -* \param inode device inode. -* \param file_priv DRM file private. -* \param cmd command. -* \param arg user argument, pointing to a drm_control structure. -* \return zero on success or a negative number on failure. -* -* Calls irq_install() or irq_uninstall() according to \p arg. -*/ -int drm_control (struct drm_device *dev,void *data, -struct drm_file *file_priv) +int drm_legacy_irq_control (struct drm_device *dev,void *data, +struct drm_file *file_priv) {struct drm_control *ctl = data;int ret =0 , irq;
@@ -1442,19 +1431,8 @@ static void drm_legacy_vblank_post_modeset(struct drm_device *dev, } } -/* -* drm_modeset_ctl - handle vblank event counter changes across mode switch -* @DRM_IOCTL_ARGS: standard ioctl arguments -* -* Applications should call the %_DRM_PRE_MODESET and %_DRM_POST_MODESET -* ioctls around modesetting so that any lost vblank events are accounted for. -* -* Generally the counter will reset across mode sets. If interrupts are -* enabled around this call, we don't have to do anything since the counter -* will have already been incremented. -*/ -int drm_modeset_ctl (struct drm_device *dev,void *data, -struct drm_file *file_priv) +int drm_legacy_modeset_ctl (struct drm_device *dev,void *data, +struct drm_file *file_priv) {struct drm_modeset_ctl *modeset = data;unsigned int pipe;
Signature · 6 lines
2.10.2 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 3 lines · Daniel Vetter
Spotted while auditing our ioctl table. Also nuke the not-really-kerneldoc comments, we don't document internals and definitely don't want to mislead people with the old dragons.
Not just specific to this patch, but I'm not sure I agree with the "we don't document internals" in general. That seems to be something that just started happening without much discussion. We have *loads* of complicated functions that would benefit from documentation, even if they're internal (i.e. not exported).
BR,
Jani.
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 10 lines · Jani Nikula
Quoted 3 lines · Daniel Vetter
Spotted while auditing our ioctl table. Also nuke the not-really-kerneldoc comments, we don't document internals and definitely don't want to mislead people with the old dragons.
Not just specific to this patch, but I'm not sure I agree with the "we don't document internals" in general. That seems to be something that just started happening without much discussion. We have *loads* of complicated functions that would benefit from documentation, even if they're internal (i.e. not exported).
I do keep the comments if I think they're useful, but kernel-doc for them seems serious overkill. In this case here I couldn't really justify even just the comment for myself, but maybe I just want to hide those old dragons too much ;-)
-Daniel
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel