All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel.vetter@ffwll.ch>
To: dri-devel@lists.freedesktop.org
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Subject: [PATCH 07/14] drm: kill context_ctor callback
Date: Mon, 23 Aug 2010 22:53:29 +0200	[thread overview]
Message-ID: <1282596816-10896-8-git-send-email-daniel.vetter@ffwll.ch> (raw)
In-Reply-To: <1282596816-10896-1-git-send-email-daniel.vetter@ffwll.ch>

It's not used by any driver. The destructor callback is unfortunately
used by the via driver in a rather convoluted piece of code used
to reimplement something resembling broken futexes. I didn't dare
to touch this code. But at least kill the needless NULL assignemt
in the sis driver.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 drivers/gpu/drm/drm_context.c |    8 --------
 drivers/gpu/drm/sis/sis_drv.c |    1 -
 include/drm/drmP.h            |    1 -
 3 files changed, 0 insertions(+), 10 deletions(-)

diff --git a/drivers/gpu/drm/drm_context.c b/drivers/gpu/drm/drm_context.c
index 2607753..6d440fb 100644
--- a/drivers/gpu/drm/drm_context.c
+++ b/drivers/gpu/drm/drm_context.c
@@ -333,14 +333,6 @@ int drm_addctx(struct drm_device *dev, void *data,
 		return -ENOMEM;
 	}
 
-	if (ctx->handle != DRM_KERNEL_CONTEXT) {
-		if (dev->driver->context_ctor)
-			if (!dev->driver->context_ctor(dev, ctx->handle)) {
-				DRM_DEBUG("Running out of ctxs or memory.\n");
-				return -ENOMEM;
-			}
-	}
-
 	ctx_entry = kmalloc(sizeof(*ctx_entry), GFP_KERNEL);
 	if (!ctx_entry) {
 		DRM_DEBUG("out of memory\n");
diff --git a/drivers/gpu/drm/sis/sis_drv.c b/drivers/gpu/drm/sis/sis_drv.c
index 39f098a..4d9f311 100644
--- a/drivers/gpu/drm/sis/sis_drv.c
+++ b/drivers/gpu/drm/sis/sis_drv.c
@@ -67,7 +67,6 @@ static struct drm_driver driver = {
 	.driver_features = DRIVER_USE_AGP | DRIVER_USE_MTRR,
 	.load = sis_driver_load,
 	.unload = sis_driver_unload,
-	.context_dtor = NULL,
 	.dma_quiescent = sis_idle,
 	.reclaim_buffers = NULL,
 	.reclaim_buffers_idlelocked = sis_reclaim_buffers_locked,
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index b139de9..4fc2ea2 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -700,7 +700,6 @@ struct drm_driver {
 	int (*resume) (struct drm_device *);
 	int (*dma_ioctl) (struct drm_device *dev, void *data, struct drm_file *file_priv);
 	int (*dma_quiescent) (struct drm_device *);
-	int (*context_ctor) (struct drm_device *dev, int context);
 	int (*context_dtor) (struct drm_device *dev, int context);
 
 	/**
-- 
1.7.1

  parent reply	other threads:[~2010-08-23 21:02 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-23 20:53 [PATCH 00/14] various drm core cleanups Daniel Vetter
2010-08-23 20:53 ` [PATCH 01/14] drm: don't export drm_sg_alloc Daniel Vetter
2010-08-23 20:53 ` [PATCH 02/14] drm: kill kernel_context_switch callbacks Daniel Vetter
2010-08-23 20:53 ` [PATCH 03/14] drm: kill dma_ready callbacks Daniel Vetter
2010-08-23 20:53 ` [PATCH 04/14] drm: kill procfs callbacks Daniel Vetter
2010-08-23 20:53 ` [PATCH 05/14] drm: kill drm_map_ofs callbacks Daniel Vetter
2010-08-23 20:53 ` [PATCH 06/14] drm: kill get_reg_ofs callback Daniel Vetter
2010-08-23 20:53 ` Daniel Vetter [this message]
2010-08-23 20:53 ` [PATCH 08/14] drm: don't export drm_get_drawable_info Daniel Vetter
2010-08-23 20:53 ` [PATCH 09/14] drm: replace drawable ioctl by noops Daniel Vetter
2010-08-23 20:53 ` [PATCH 10/14] drm: kill dev->timer Daniel Vetter
2010-08-23 20:53 ` [PATCH 11/14] drm: kill gem_free_object_unlocked driver callback Daniel Vetter
2010-08-23 20:53 ` [PATCH 12/14] drm: don't export dri1 locking functions Daniel Vetter
2010-08-23 20:53 ` [PATCH 13/14] drm: drop return value of drm_free_agp Daniel Vetter
2010-08-23 20:53 ` [PATCH 14/14] drm: kill agp indirection mess Daniel Vetter
2010-08-24 15:05   ` Kristian Høgsberg
2010-08-24 16:20     ` Daniel Vetter

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=1282596816-10896-8-git-send-email-daniel.vetter@ffwll.ch \
    --to=daniel.vetter@ffwll.ch \
    --cc=dri-devel@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.