Lines Matching defs:dri_state
62 struct dri_state *dri_state = (struct dri_state *)ctx->drm_state;
65 VA_DRIDestroyContext(ctx->native_dpy, ctx->x11_screen, dri_state->hwContextID);
66 assert(dri_state->pSAREA != MAP_FAILED);
67 drmUnmap(dri_state->pSAREA, SAREA_MAX);
68 assert(dri_state->base.fd >= 0);
69 drmCloseOnce(dri_state->base.fd);
76 struct dri_state *dri_state = (struct dri_state *)ctx->drm_state;
86 dri_state->base.fd = -1;
87 dri_state->pSAREA = MAP_FAILED;
88 dri_state->base.auth_type = VA_NONE;
104 &dri_state->hSAREA, &BusID))
108 dri_state->base.fd = drmOpenOnce(NULL, BusID, &newlyopened);
111 if (dri_state->base.fd < 0)
115 if (drmGetMagic(dri_state->base.fd, &magic))
121 if (drmMap(dri_state->base.fd, dri_state->hSAREA, SAREA_MAX, &dri_state->pSAREA))
126 &dri_state->hwContextID, &dri_state->hwContext))
129 dri_state->base.auth_type = VA_DRI1;
130 dri_state->createDrawable = dri1CreateDrawable;
131 dri_state->destroyDrawable = dri1DestroyDrawable;
132 dri_state->swapBuffer = dri1SwapBuffer;
133 dri_state->getRenderingBuffer = dri1GetRenderingBuffer;
134 dri_state->close = dri1Close;
139 if (dri_state->pSAREA != MAP_FAILED)
140 drmUnmap(dri_state->pSAREA, SAREA_MAX);
142 if (dri_state->base.fd >= 0)
143 drmCloseOnce(dri_state->base.fd);
151 dri_state->pSAREA = MAP_FAILED;
152 dri_state->base.fd = -1;