28 #include <linux/string.h>
29 #include <linux/bitops.h>
31 #include <drm/i915_drm.h>
108 if (dimm_c0 == dimm_c1) {
163 if (dcc == 0xffffffff) {
164 DRM_ERROR(
"Couldn't read from MCHBAR. "
165 "Disabling tiling.\n");
199 dev_priv->
mm.bit_6_swizzle_x = swizzle_x;
200 dev_priv->
mm.bit_6_swizzle_y = swizzle_y;
240 if (stride & (tile_width - 1))
246 if (stride < tile_width)
249 if (stride & (stride - 1))
284 while (size < obj->
base.size)
302 struct drm_file *
file)
313 if (!i915_tiling_ok(dev,
315 drm_gem_object_unreference_unlocked(&obj->
base);
320 drm_gem_object_unreference_unlocked(&obj->
base);
376 u32 unfenced_alignment =
380 if (obj->
gtt_offset & (unfenced_alignment - 1))
399 drm_gem_object_unreference(&obj->
base);
410 struct drm_file *
file)
434 DRM_ERROR(
"unknown tiling mode\n");
443 drm_gem_object_unreference(&obj->
base);
455 i915_gem_swizzle_page(
struct page *
page)
464 memcpy(temp, &vaddr[i], 64);
465 memcpy(&vaddr[i], &vaddr[i + 64], 64);
466 memcpy(&vaddr[i + 64], temp, 64);
483 struct page *page = sg_page(sg);
485 if ((new_bit_17 & 0x1) !=
487 i915_gem_swizzle_page(page);
504 DRM_ERROR(
"Failed to allocate memory for bit 17 "
511 struct page *page = sg_page(sg);