Skip to content

Commit b3da8f7

Browse files
danvetairlied
authored andcommitted
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: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Dave Airlie <airlied@redhat.com>
1 parent fd2e793 commit b3da8f7

3 files changed

Lines changed: 0 additions & 10 deletions

File tree

‎drivers/gpu/drm/drm_context.c‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -333,14 +333,6 @@ int drm_addctx(struct drm_device *dev, void *data,
333333
return -ENOMEM;
334334
}
335335

336-
if (ctx->handle != DRM_KERNEL_CONTEXT) {
337-
if (dev->driver->context_ctor)
338-
if (!dev->driver->context_ctor(dev, ctx->handle)) {
339-
DRM_DEBUG("Running out of ctxs or memory.\n");
340-
return -ENOMEM;
341-
}
342-
}
343-
344336
ctx_entry = kmalloc(sizeof(*ctx_entry), GFP_KERNEL);
345337
if (!ctx_entry) {
346338
DRM_DEBUG("out of memory\n");

‎drivers/gpu/drm/sis/sis_drv.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ static struct drm_driver driver = {
6767
.driver_features = DRIVER_USE_AGP | DRIVER_USE_MTRR,
6868
.load = sis_driver_load,
6969
.unload = sis_driver_unload,
70-
.context_dtor = NULL,
7170
.dma_quiescent = sis_idle,
7271
.reclaim_buffers = NULL,
7372
.reclaim_buffers_idlelocked = sis_reclaim_buffers_locked,

‎include/drm/drmP.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -700,7 +700,6 @@ struct drm_driver {
700700
int (*resume) (struct drm_device *);
701701
int (*dma_ioctl) (struct drm_device *dev, void *data, struct drm_file *file_priv);
702702
int (*dma_quiescent) (struct drm_device *);
703-
int (*context_ctor) (struct drm_device *dev, int context);
704703
int (*context_dtor) (struct drm_device *dev, int context);
705704

706705
/**

0 commit comments

Comments
 (0)