Lines Matching defs:ctx
306 drm_ctx_t ctx;
320 bzero(&ctx, sizeof (ctx));
322 ctx.handle = i;
324 &ctx, sizeof (ctx));
349 drm_ctx_t ctx;
351 DRM_COPYFROM_WITH_RETURN(&ctx, (void *)data, sizeof (ctx));
353 ctx.handle = drm_ctxbitmap_next(dev);
354 if (ctx.handle == DRM_KERNEL_CONTEXT) {
356 ctx.handle = drm_ctxbitmap_next(dev);
358 if (ctx.handle == (drm_context_t)-1) {
362 if (dev->driver->context_ctor && ctx.handle != DRM_KERNEL_CONTEXT) {
363 dev->driver->context_ctor(dev, ctx.handle);
366 DRM_COPYTO_WITH_RETURN((void *)data, &ctx, sizeof (ctx));
383 drm_ctx_t ctx;
385 DRM_COPYFROM_WITH_RETURN(&ctx, (void *)data, sizeof (ctx));
388 ctx.flags = 0;
390 DRM_COPYTO_WITH_RETURN((void *)data, &ctx, sizeof (ctx));
400 drm_ctx_t ctx;
402 DRM_COPYFROM_WITH_RETURN(&ctx, (void *)data, sizeof (ctx));
404 DRM_DEBUG("drm_switchctx: %d", ctx.handle);
405 return (drm_context_switch(dev, dev->last_context, ctx.handle));
413 drm_ctx_t ctx;
415 DRM_COPYFROM_WITH_RETURN(&ctx, (void *)data, sizeof (ctx));
417 DRM_DEBUG("drm_newctx: %d", ctx.handle);
418 (void) drm_context_switch_complete(dev, ctx.handle);
428 drm_ctx_t ctx;
430 DRM_COPYFROM_WITH_RETURN(&ctx, (void *)data, sizeof (ctx));
432 DRM_DEBUG("drm_rmctx : %d", ctx.handle);
433 if (ctx.handle != DRM_KERNEL_CONTEXT) {
436 dev->driver->context_dtor(dev, ctx.handle);
440 drm_ctxbitmap_free(dev, ctx.handle);