29 #include <drm/i915_drm.h>
45 if (obj->
base.dev != dev ||
47 DRM_ERROR(
"freed render active %p\n", obj);
52 DRM_ERROR(
"invalid render active %p (a %d r %x)\n",
55 obj->
base.read_domains);
57 }
else if (obj->
base.write_domain && list_empty(&obj->gpu_write_list)) {
58 DRM_ERROR(
"invalid render active %p (w %x, gwl %d)\n",
60 obj->
base.write_domain,
61 !list_empty(&obj->gpu_write_list));
67 if (obj->
base.dev != dev ||
69 DRM_ERROR(
"freed flushing %p\n", obj);
74 list_empty(&obj->gpu_write_list)) {
75 DRM_ERROR(
"invalid flushing %p (a %d w %x gwl %d)\n",
78 obj->
base.write_domain,
79 !list_empty(&obj->gpu_write_list));
85 if (obj->
base.dev != dev ||
87 DRM_ERROR(
"freed gpu write %p\n", obj);
92 DRM_ERROR(
"invalid gpu write %p (a %d w %x)\n",
95 obj->
base.write_domain);
101 if (obj->
base.dev != dev ||
103 DRM_ERROR(
"freed inactive %p\n", obj);
108 DRM_ERROR(
"invalid inactive %p (p %d a %d w %x)\n",
111 obj->
base.write_domain);
130 DRM_INFO(
"%s: checking coherency of object %p@0x%08x (%d, %zdkb):\n",
136 if (gtt_mapping ==
NULL) {
137 DRM_ERROR(
"failed to map GTT space\n");
141 for (page = 0; page < obj->size /
PAGE_SIZE; page++) {
146 if (backing_map ==
NULL) {
147 DRM_ERROR(
"failed to map backing page\n");
156 if (cpuval != gttval) {
157 DRM_INFO(
"incoherent CPU vs GPU at 0x%08x: "
158 "0x%08x vs 0x%08x\n",
162 if (bad_count++ >= 8) {
173 if (backing_map !=
NULL)