Lines Matching refs:state

56 vc4_free_hang_state(struct drm_device *dev, struct vc4_hang_state *state)
60 for (i = 0; i < state->user_state.bo_count; i++)
61 drm_gem_object_put(state->bo[i]);
63 kfree(state);
73 struct drm_vc4_get_hang_state *state;
93 state = &kernel_state->user_state;
98 if (get_state->bo_count < state->bo_count) {
99 get_state->bo_count = state->bo_count;
108 state->bo = get_state->bo;
109 memcpy(get_state, state, sizeof(*state));
111 bo_state = kcalloc(state->bo_count, sizeof(*bo_state), GFP_KERNEL);
117 for (i = 0; i < state->bo_count; i++) {
125 state->bo_count = i;
135 state->bo_count * sizeof(*bo_state)))
140 for (i = 0; i < state->bo_count; i++)
155 struct drm_vc4_get_hang_state *state;
166 state = &kernel_state->user_state;
176 /* Get the bos from both binner and renderer into hang state. */
177 state->bo_count = 0;
185 state->bo_count += exec[i]->bo_count + unref_list_count;
188 kernel_state->bo = kcalloc(state->bo_count,
206 * someone had a chance to dump the hang state.
223 WARN_ON_ONCE(k != state->bo_count);
226 state->start_bin = exec[0]->ct0ca;
228 state->start_render = exec[1]->ct1ca;
232 state->ct0ca = V3D_READ(V3D_CTNCA(0));
233 state->ct0ea = V3D_READ(V3D_CTNEA(0));
235 state->ct1ca = V3D_READ(V3D_CTNCA(1));
236 state->ct1ea = V3D_READ(V3D_CTNEA(1));
238 state->ct0cs = V3D_READ(V3D_CTNCS(0));
239 state->ct1cs = V3D_READ(V3D_CTNCS(1));
241 state->ct0ra0 = V3D_READ(V3D_CT00RA0);
242 state->ct1ra0 = V3D_READ(V3D_CT01RA0);
244 state->bpca = V3D_READ(V3D_BPCA);
245 state->bpcs = V3D_READ(V3D_BPCS);
246 state->bpoa = V3D_READ(V3D_BPOA);
247 state->bpos = V3D_READ(V3D_BPOS);
249 state->vpmbase = V3D_READ(V3D_VPMBASE);
251 state->dbge = V3D_READ(V3D_DBGE);
252 state->fdbgo = V3D_READ(V3D_FDBGO);
253 state->fdbgb = V3D_READ(V3D_FDBGB);
254 state->fdbgr = V3D_READ(V3D_FDBGR);
255 state->fdbgs = V3D_READ(V3D_FDBGS);
256 state->errstat = V3D_READ(V3D_ERRSTAT);
259 * userspace has a chance to dump the hang state before the kernel
597 * We don't lock the RCL the tile alloc/state BOs, or overflow memory
1386 /* Save the purged state. */
1389 /* Update internal madv state only if the bo was not purged. */