drm: kill context_ctor callback
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 23 Aug 2010 20:53:29 +0000 (22:53 +0200)
committerDave Airlie <airlied@redhat.com>
Sun, 29 Aug 2010 23:38:25 +0000 (09:38 +1000)
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>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/drm_context.c
drivers/gpu/drm/sis/sis_drv.c
include/drm/drmP.h

index 2607753a320bfb84b7bf8caafafe7856f4cfc0b8..6d440fb894cf2acba53c863d20d10b16ccfa14b5 100644 (file)
@@ -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");
index 776bf9e9ea1adfec718e6b5a4c7906eedaf72348..2d1292131500b468ac14413c9be01742603f0b48 100644 (file)
@@ -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,
index 6dbdbf45cd1af3c6c15cc8249d5daa3cc9e6d0f9..eb4f7edcc3145bcebd56d3fafeb27e94a53daf8a 100644 (file)
@@ -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);
 
        /**