]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm: deprecate driver date
authorJani Nikula <jani.nikula@intel.com>
Mon, 29 Apr 2024 16:43:36 +0000 (19:43 +0300)
committerJani Nikula <jani.nikula@intel.com>
Wed, 8 May 2024 12:31:58 +0000 (15:31 +0300)
The driver date serves no useful purpose, because it's hardly ever
updated. The information is misleading at best.

As described in Documentation/gpu/drm-internals.rst:

  The driver date, formatted as YYYYMMDD, is meant to identify the date
  of the latest modification to the driver. However, as most drivers
  fail to update it, its value is mostly useless. The DRM core prints it
  to the kernel log at initialization time and passes it to userspace
  through the DRM_IOCTL_VERSION ioctl.

Stop printing the driver date at init, and start returning the empty
string "" as driver date through the DRM_IOCTL_VERSION ioctl.

The driver date initialization in drivers and the struct drm_driver date
member can be removed in follow-up.

Reviewed-by: Hamza Mahfooz <hamza.mahfooz@amd.com>
Acked-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240429164336.1406480-1-jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Documentation/gpu/drm-internals.rst
drivers/gpu/drm/drm_drv.c
drivers/gpu/drm/drm_ioctl.c
include/drm/drm_drv.h

index 335de7fcddeecc0fbe94f376a8107ed94476b986..11d9a5730fb22f75c3aa1ae9d0c5b02813a2729b 100644 (file)
@@ -57,8 +57,8 @@ is larger than the driver minor, the DRM_IOCTL_SET_VERSION call will
 return an error. Otherwise the driver's set_version() method will be
 called with the requested version.
 
-Name, Description and Date
-~~~~~~~~~~~~~~~~~~~~~~~~~~
+Name and Description
+~~~~~~~~~~~~~~~~~~~~
 
 char \*name; char \*desc; char \*date;
 The driver name is printed to the kernel log at initialization time,
@@ -69,12 +69,6 @@ The driver description is a purely informative string passed to
 userspace through the DRM_IOCTL_VERSION ioctl and otherwise unused by
 the kernel.
 
-The driver date, formatted as YYYYMMDD, is meant to identify the date of
-the latest modification to the driver. However, as most drivers fail to
-update it, its value is mostly useless. The DRM core prints it to the
-kernel log at initialization time and passes it to userspace through the
-DRM_IOCTL_VERSION ioctl.
-
 Module Initialization
 ---------------------
 
index b8186cf16230786bdeb6fa431abcfc335417f5fc..93543071a5008cea5b682b5210a9274c2f7b761c 100644 (file)
@@ -947,9 +947,9 @@ int drm_dev_register(struct drm_device *dev, unsigned long flags)
        }
        drm_panic_register(dev);
 
-       DRM_INFO("Initialized %s %d.%d.%d %s for %s on minor %d\n",
+       DRM_INFO("Initialized %s %d.%d.%d for %s on minor %d\n",
                 driver->name, driver->major, driver->minor,
-                driver->patchlevel, driver->date,
+                driver->patchlevel,
                 dev->dev ? dev_name(dev->dev) : "virtual device",
                 dev->primary ? dev->primary->index : dev->accel->index);
 
index e368fc084c77d4e22d9e5bc42ef823d733409728..89feb7306e477e1f804da0969a2c11324048aa2e 100644 (file)
@@ -529,9 +529,10 @@ int drm_version(struct drm_device *dev, void *data,
        version->version_patchlevel = dev->driver->patchlevel;
        err = drm_copy_field(version->name, &version->name_len,
                        dev->driver->name);
+
+       /* Driver date is deprecated. Return the empty string. */
        if (!err)
-               err = drm_copy_field(version->date, &version->date_len,
-                               dev->driver->date);
+               err = drm_copy_field(version->date, &version->date_len, "");
        if (!err)
                err = drm_copy_field(version->desc, &version->desc_len,
                                dev->driver->desc);
index 8878260d7529dcbe9af6f9ad3e530b30f02c3e22..cd37936c3926b00022e8ea3b43570a013ad30a8d 100644 (file)
@@ -411,7 +411,7 @@ struct drm_driver {
        char *name;
        /** @desc: driver description */
        char *desc;
-       /** @date: driver date */
+       /** @date: driver date, unused, to be removed */
        char *date;
 
        /**