static struct nvhost_hwctx *ctx3d_alloc_v1(struct nvhost_hwctx_handler *h, struct nvhost_channel *ch) { struct host1x_hwctx_handler *p = to_host1x_hwctx_handler(h); struct host1x_hwctx *ctx = nvhost_3dctx_alloc_common(p, ch, false); if (ctx) return &ctx->hwctx; else return NULL; }
static struct nvhost_hwctx *ctx3d_alloc_v0(struct nvhost_hwctx_handler *h, struct nvhost_channel *ch) { struct host1x_hwctx_handler *p = to_host1x_hwctx_handler(h); struct host1x_hwctx *ctx = nvhost_3dctx_alloc_common(p, ch, true); if (ctx) { setup_restore_v0(p, ctx->restore_virt); return &ctx->hwctx; } else return NULL; }
static struct nvhost_hwctx *ctx3d_alloc_v1(struct nvhost_channel *ch) { return nvhost_3dctx_alloc_common(ch, false); }