Lines Matching refs:ctx

305 	struct drm_ctx ctx;  in drm_legacy_resctx()  local
309 memset(&ctx, 0, sizeof(ctx)); in drm_legacy_resctx()
311 ctx.handle = i; in drm_legacy_resctx()
312 if (copy_to_user(&res->contexts[i], &ctx, sizeof(ctx))) in drm_legacy_resctx()
336 struct drm_ctx *ctx = data; in drm_legacy_addctx() local
338 ctx->handle = drm_legacy_ctxbitmap_next(dev); in drm_legacy_addctx()
339 if (ctx->handle == DRM_KERNEL_CONTEXT) { in drm_legacy_addctx()
341 ctx->handle = drm_legacy_ctxbitmap_next(dev); in drm_legacy_addctx()
343 DRM_DEBUG("%d\n", ctx->handle); in drm_legacy_addctx()
344 if (ctx->handle == -1) { in drm_legacy_addctx()
357 ctx_entry->handle = ctx->handle; in drm_legacy_addctx()
379 struct drm_ctx *ctx = data; in drm_legacy_getctx() local
382 ctx->flags = 0; in drm_legacy_getctx()
401 struct drm_ctx *ctx = data; in drm_legacy_switchctx() local
403 DRM_DEBUG("%d\n", ctx->handle); in drm_legacy_switchctx()
404 return drm_context_switch(dev, dev->last_context, ctx->handle); in drm_legacy_switchctx()
421 struct drm_ctx *ctx = data; in drm_legacy_newctx() local
423 DRM_DEBUG("%d\n", ctx->handle); in drm_legacy_newctx()
424 drm_context_switch_complete(dev, file_priv, ctx->handle); in drm_legacy_newctx()
443 struct drm_ctx *ctx = data; in drm_legacy_rmctx() local
445 DRM_DEBUG("%d\n", ctx->handle); in drm_legacy_rmctx()
446 if (ctx->handle != DRM_KERNEL_CONTEXT) { in drm_legacy_rmctx()
448 dev->driver->context_dtor(dev, ctx->handle); in drm_legacy_rmctx()
449 drm_legacy_ctxbitmap_free(dev, ctx->handle); in drm_legacy_rmctx()
457 if (pos->handle == ctx->handle) { in drm_legacy_rmctx()