Commit b3da8f7d authored by Daniel Vetter's avatar Daniel Vetter Committed by Dave Airlie

drm: kill context_ctor callback

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: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent fd2e7931
...@@ -333,14 +333,6 @@ int drm_addctx(struct drm_device *dev, void *data, ...@@ -333,14 +333,6 @@ int drm_addctx(struct drm_device *dev, void *data,
return -ENOMEM; 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); ctx_entry = kmalloc(sizeof(*ctx_entry), GFP_KERNEL);
if (!ctx_entry) { if (!ctx_entry) {
DRM_DEBUG("out of memory\n"); DRM_DEBUG("out of memory\n");
......
...@@ -67,7 +67,6 @@ static struct drm_driver driver = { ...@@ -67,7 +67,6 @@ static struct drm_driver driver = {
.driver_features = DRIVER_USE_AGP | DRIVER_USE_MTRR, .driver_features = DRIVER_USE_AGP | DRIVER_USE_MTRR,
.load = sis_driver_load, .load = sis_driver_load,
.unload = sis_driver_unload, .unload = sis_driver_unload,
.context_dtor = NULL,
.dma_quiescent = sis_idle, .dma_quiescent = sis_idle,
.reclaim_buffers = NULL, .reclaim_buffers = NULL,
.reclaim_buffers_idlelocked = sis_reclaim_buffers_locked, .reclaim_buffers_idlelocked = sis_reclaim_buffers_locked,
......
...@@ -700,7 +700,6 @@ struct drm_driver { ...@@ -700,7 +700,6 @@ struct drm_driver {
int (*resume) (struct drm_device *); int (*resume) (struct drm_device *);
int (*dma_ioctl) (struct drm_device *dev, void *data, struct drm_file *file_priv); int (*dma_ioctl) (struct drm_device *dev, void *data, struct drm_file *file_priv);
int (*dma_quiescent) (struct drm_device *); int (*dma_quiescent) (struct drm_device *);
int (*context_ctor) (struct drm_device *dev, int context);
int (*context_dtor) (struct drm_device *dev, int context); int (*context_dtor) (struct drm_device *dev, int context);
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment