Lines Matching refs:ctx

328 	struct drm_ctx ctx;  in drm_legacy_resctx()  local
336 memset(&ctx, 0, sizeof(ctx)); in drm_legacy_resctx()
338 ctx.handle = i; in drm_legacy_resctx()
339 if (copy_to_user(&res->contexts[i], &ctx, sizeof(ctx))) in drm_legacy_resctx()
363 struct drm_ctx *ctx = data; in drm_legacy_addctx() local
369 ctx->handle = drm_legacy_ctxbitmap_next(dev); in drm_legacy_addctx()
370 if (ctx->handle == DRM_KERNEL_CONTEXT) { in drm_legacy_addctx()
372 ctx->handle = drm_legacy_ctxbitmap_next(dev); in drm_legacy_addctx()
374 DRM_DEBUG("%d\n", ctx->handle); in drm_legacy_addctx()
375 if (ctx->handle == -1) { in drm_legacy_addctx()
388 ctx_entry->handle = ctx->handle; in drm_legacy_addctx()
410 struct drm_ctx *ctx = data; in drm_legacy_getctx() local
417 ctx->flags = 0; in drm_legacy_getctx()
436 struct drm_ctx *ctx = data; in drm_legacy_switchctx() local
442 DRM_DEBUG("%d\n", ctx->handle); in drm_legacy_switchctx()
443 return drm_context_switch(dev, dev->last_context, ctx->handle); in drm_legacy_switchctx()
460 struct drm_ctx *ctx = data; in drm_legacy_newctx() local
466 DRM_DEBUG("%d\n", ctx->handle); in drm_legacy_newctx()
467 drm_context_switch_complete(dev, file_priv, ctx->handle); in drm_legacy_newctx()
486 struct drm_ctx *ctx = data; in drm_legacy_rmctx() local
492 DRM_DEBUG("%d\n", ctx->handle); in drm_legacy_rmctx()
493 if (ctx->handle != DRM_KERNEL_CONTEXT) { in drm_legacy_rmctx()
495 dev->driver->context_dtor(dev, ctx->handle); in drm_legacy_rmctx()
496 drm_legacy_ctxbitmap_free(dev, ctx->handle); in drm_legacy_rmctx()
504 if (pos->handle == ctx->handle) { in drm_legacy_rmctx()