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;
90 state = &kernel_state->user_state;
95 if (get_state->bo_count < state->bo_count) {
96 get_state->bo_count = state->bo_count;
105 state->bo = get_state->bo;
106 memcpy(get_state, state, sizeof(*state));
108 bo_state = kcalloc(state->bo_count, sizeof(*bo_state), GFP_KERNEL);
114 for (i = 0; i < state->bo_count; i++) {
122 state->bo_count = i;
132 state->bo_count * sizeof(*bo_state)))
137 for (i = 0; i < state->bo_count; i++)
152 struct drm_vc4_get_hang_state *state;
163 state = &kernel_state->user_state;
173 /* Get the bos from both binner and renderer into hang state. */
174 state->bo_count = 0;
182 state->bo_count += exec[i]->bo_count + unref_list_count;
185 kernel_state->bo = kcalloc(state->bo_count,
203 * someone had a chance to dump the hang state.
220 WARN_ON_ONCE(k != state->bo_count);
223 state->start_bin = exec[0]->ct0ca;
225 state->start_render = exec[1]->ct1ca;
229 state->ct0ca = V3D_READ(V3D_CTNCA(0));
230 state->ct0ea = V3D_READ(V3D_CTNEA(0));
232 state->ct1ca = V3D_READ(V3D_CTNCA(1));
233 state->ct1ea = V3D_READ(V3D_CTNEA(1));
235 state->ct0cs = V3D_READ(V3D_CTNCS(0));
236 state->ct1cs = V3D_READ(V3D_CTNCS(1));
238 state->ct0ra0 = V3D_READ(V3D_CT00RA0);
239 state->ct1ra0 = V3D_READ(V3D_CT01RA0);
241 state->bpca = V3D_READ(V3D_BPCA);
242 state->bpcs = V3D_READ(V3D_BPCS);
243 state->bpoa = V3D_READ(V3D_BPOA);
244 state->bpos = V3D_READ(V3D_BPOS);
246 state->vpmbase = V3D_READ(V3D_VPMBASE);
248 state->dbge = V3D_READ(V3D_DBGE);
249 state->fdbgo = V3D_READ(V3D_FDBGO);
250 state->fdbgb = V3D_READ(V3D_FDBGB);
251 state->fdbgr = V3D_READ(V3D_FDBGR);
252 state->fdbgs = V3D_READ(V3D_FDBGS);
253 state->errstat = V3D_READ(V3D_ERRSTAT);
256 * userspace has a chance to dump the hang state before the kernel
580 * We don't lock the RCL the tile alloc/state BOs, or overflow memory
1374 /* Save the purged state. */
1377 /* Update internal madv state only if the bo was not purged. */