All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel.vetter@ffwll.ch>
To: DRI Development <dri-devel@lists.freedesktop.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
	Intel Graphics Development <intel-gfx@lists.freedesktop.org>,
	Daniel Vetter <daniel.vetter@intel.com>
Subject: [PATCH 1/4] drm: Complain if drivers still use the ->load callback
Date: Tue, 28 Jan 2020 11:45:58 +0100	[thread overview]
Message-ID: <20200128104602.1459802-1-daniel.vetter@ffwll.ch> (raw)

Kinda time to get this sorted. The locking around this really is not
nice.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 drivers/gpu/drm/drm_drv.c | 6 ++++++
 include/drm/drm_drv.h     | 3 +++
 2 files changed, 9 insertions(+)

diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
index 7c18a980cd4b..8deff75b484c 100644
--- a/drivers/gpu/drm/drm_drv.c
+++ b/drivers/gpu/drm/drm_drv.c
@@ -948,6 +948,12 @@ int drm_dev_register(struct drm_device *dev, unsigned long flags)
 
 	mutex_lock(&drm_global_mutex);
 
+	if (dev->driver->load) {
+		if (!drm_core_check_feature(dev, DRIVER_LEGACY))
+			DRM_INFO("drm driver %s is using deprecated ->load callback\n",
+				 dev->driver->name);
+	}
+
 	ret = drm_minor_register(dev, DRM_MINOR_RENDER);
 	if (ret)
 		goto err_minors;
diff --git a/include/drm/drm_drv.h b/include/drm/drm_drv.h
index 77685ed7aa65..77bc63de0a91 100644
--- a/include/drm/drm_drv.h
+++ b/include/drm/drm_drv.h
@@ -173,6 +173,9 @@ struct drm_driver {
 	 *
 	 * This is deprecated, do not use!
 	 *
+	 * FIXME: A few non-DRIVER_LEGACY drivers still use this, and should be
+	 * converted.
+	 *
 	 * Returns:
 	 *
 	 * Zero on success, non-zero value on failure.
-- 
2.24.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

WARNING: multiple messages have this Message-ID (diff)
From: Daniel Vetter <daniel.vetter@ffwll.ch>
To: DRI Development <dri-devel@lists.freedesktop.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
	Intel Graphics Development <intel-gfx@lists.freedesktop.org>,
	Daniel Vetter <daniel.vetter@intel.com>
Subject: [Intel-gfx] [PATCH 1/4] drm: Complain if drivers still use the ->load callback
Date: Tue, 28 Jan 2020 11:45:58 +0100	[thread overview]
Message-ID: <20200128104602.1459802-1-daniel.vetter@ffwll.ch> (raw)

Kinda time to get this sorted. The locking around this really is not
nice.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 drivers/gpu/drm/drm_drv.c | 6 ++++++
 include/drm/drm_drv.h     | 3 +++
 2 files changed, 9 insertions(+)

diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
index 7c18a980cd4b..8deff75b484c 100644
--- a/drivers/gpu/drm/drm_drv.c
+++ b/drivers/gpu/drm/drm_drv.c
@@ -948,6 +948,12 @@ int drm_dev_register(struct drm_device *dev, unsigned long flags)
 
 	mutex_lock(&drm_global_mutex);
 
+	if (dev->driver->load) {
+		if (!drm_core_check_feature(dev, DRIVER_LEGACY))
+			DRM_INFO("drm driver %s is using deprecated ->load callback\n",
+				 dev->driver->name);
+	}
+
 	ret = drm_minor_register(dev, DRM_MINOR_RENDER);
 	if (ret)
 		goto err_minors;
diff --git a/include/drm/drm_drv.h b/include/drm/drm_drv.h
index 77685ed7aa65..77bc63de0a91 100644
--- a/include/drm/drm_drv.h
+++ b/include/drm/drm_drv.h
@@ -173,6 +173,9 @@ struct drm_driver {
 	 *
 	 * This is deprecated, do not use!
 	 *
+	 * FIXME: A few non-DRIVER_LEGACY drivers still use this, and should be
+	 * converted.
+	 *
 	 * Returns:
 	 *
 	 * Zero on success, non-zero value on failure.
-- 
2.24.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

             reply	other threads:[~2020-01-28 10:46 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-28 10:45 Daniel Vetter [this message]
2020-01-28 10:45 ` [Intel-gfx] [PATCH 1/4] drm: Complain if drivers still use the ->load callback Daniel Vetter
2020-01-28 10:45 ` [PATCH 2/4] drm/fbdev-helper: don't force restores Daniel Vetter
2020-01-28 10:45   ` [Intel-gfx] " Daniel Vetter
2020-01-28 11:52   ` Noralf Trønnes
2020-01-28 11:52     ` [Intel-gfx] " Noralf Trønnes
2020-01-28 14:55     ` Daniel Vetter
2020-01-28 14:55       ` [Intel-gfx] " Daniel Vetter
2020-01-28 10:46 ` [PATCH 3/4] drm: Push drm_global_mutex locking in drm_open Daniel Vetter
2020-01-28 10:46   ` [Intel-gfx] " Daniel Vetter
2020-01-28 10:49   ` Chris Wilson
2020-01-28 10:49     ` [Intel-gfx] " Chris Wilson
2020-01-28 10:46 ` [PATCH 4/4] drm: Nerv drm_global_mutex BKL for good drivers Daniel Vetter
2020-01-28 10:46   ` [Intel-gfx] " Daniel Vetter
2020-01-28 11:00   ` Chris Wilson
2020-01-28 11:00     ` [Intel-gfx] " Chris Wilson
2020-01-28 14:59     ` Daniel Vetter
2020-01-28 14:59       ` [Intel-gfx] " Daniel Vetter
2020-01-28 10:47 ` [Intel-gfx] [PATCH 1/4] drm: Complain if drivers still use the ->load callback Chris Wilson
2020-01-28 10:47   ` Chris Wilson
2020-01-28 11:01   ` Chris Wilson
2020-01-28 11:01     ` Chris Wilson
2020-01-28 15:02   ` Daniel Vetter
2020-01-28 15:02     ` Daniel Vetter
2020-01-28 13:41 ` Thomas Zimmermann
2020-01-28 13:41   ` [Intel-gfx] " Thomas Zimmermann
2020-01-28 14:53   ` Daniel Vetter
2020-01-28 14:53     ` [Intel-gfx] " Daniel Vetter
2020-01-28 18:34 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/4] " Patchwork
2020-01-28 19:44 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork

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=20200128104602.1459802-1-daniel.vetter@ffwll.ch \
    --to=daniel.vetter@ffwll.ch \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    /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 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.