Lines Matching refs:dev_priv

203 	struct drm_i915_private *dev_priv = ppgtt->dev->dev_private;
211 pd_addr = (gen6_gtt_pte_t *)(uintptr_t)((caddr_t)dev_priv->gtt.virtual_gtt
219 ddi_put32(dev_priv->gtt.gtt_mapping.acc_handle,
223 (void) ddi_get32(dev_priv->gtt.gtt_mapping.acc_handle,
224 (gen6_gtt_pte_t *)(uintptr_t)((caddr_t)dev_priv->gtt.virtual_gtt + ppgtt->pd_offset));
229 drm_i915_private_t *dev_priv = dev->dev_private;
232 struct i915_hw_ppgtt *ppgtt = dev_priv->mm.aliasing_ppgtt;
274 for_each_ring(ring, dev_priv, i) {
351 struct drm_i915_private *dev_priv = dev->dev_private;
358 first_pd_entry_in_global_pt = gtt_total_entries(dev_priv->gtt);
387 struct drm_i915_private *dev_priv = dev->dev_private;
396 ppgtt->scratch_page_paddr = ptob(dev_priv->gtt.scratch_page->pfnarray[0]);
408 dev_priv->mm.aliasing_ppgtt = ppgtt;
415 struct drm_i915_private *dev_priv = dev->dev_private;
416 struct i915_hw_ppgtt *ppgtt = dev_priv->mm.aliasing_ppgtt;
422 dev_priv->mm.aliasing_ppgtt = NULL;
447 struct drm_i915_private *dev_priv = dev->dev_private;
452 i915_ggtt_clear_range(dev_priv->mm.gtt_start / PAGE_SIZE,
453 (dev_priv->mm.gtt_end - dev_priv->mm.gtt_start) / PAGE_SIZE);
456 list_for_each_entry(obj, struct drm_i915_gem_object, &dev_priv->mm.bound_list, global_list) {
483 * mapped BAR (dev_priv->mm.gtt->gtt).
489 struct drm_i915_private *dev_priv = dev->dev_private;
493 const int max_entries = gtt_total_entries(dev_priv->gtt);
499 gtt_addr = (gtt_pte_t *)(uintptr_t)((caddr_t)dev_priv->gtt.virtual_gtt + i * sizeof(gtt_pte_t));
501 ddi_put32(dev_priv->gtt.gtt_mapping.acc_handle,
503 dev_priv->gtt.pte_encode(dev, page_addr, level));
516 gtt_addr = (gtt_pte_t *)(uintptr_t)((caddr_t)dev_priv->gtt.virtual_gtt + (i-1)*sizeof(gtt_pte_t));
518 WARN_ON(ddi_get32(dev_priv->gtt.gtt_mapping.acc_handle, gtt_addr) !=
519 dev_priv->gtt.pte_encode(dev, page_addr, level));
534 struct drm_i915_private *dev_priv = dev->dev_private;
538 const int max_entries = gtt_total_entries(dev_priv->gtt) - first_entry;
539 uint64_t scratch_page_addr = dev_priv->gtt.scratch_page->pfnarray[0] << PAGE_SHIFT;
550 gtt_addr = (gtt_pte_t *)(uintptr_t)((caddr_t)dev_priv->gtt.virtual_gtt + i * sizeof(gtt_pte_t));
551 scratch_pte = dev_priv->gtt.pte_encode(dev, scratch_page_addr, I915_CACHE_LLC);
552 ddi_put32(dev_priv->gtt.gtt_mapping.acc_handle,
576 struct drm_i915_private *dev_priv = dev->dev_private;
581 dev_priv->gtt.scratch_page->pfnarray[0], type);
592 struct drm_i915_private *dev_priv = dev->dev_private;
594 dev_priv->gtt.gtt_insert_entries(obj, cache_level);
601 struct drm_i915_private *dev_priv = dev->dev_private;
603 dev_priv->gtt.gtt_clear_range(dev, obj, type);
643 drm_i915_private_t *dev_priv = dev->dev_private;
647 drm_mm_init(&dev_priv->mm.gtt_space, start, end - start - PAGE_SIZE);
649 dev_priv->mm.gtt_space.color_adjust = i915_gtt_color_adjust;
653 &dev_priv->mm.bound_list, global_list) {
658 obj->gtt_space = drm_mm_create_block(&dev_priv->mm.gtt_space,
665 dev_priv->gtt.start = start;
666 dev_priv->gtt.total = end - start;
684 struct drm_i915_private *dev_priv = dev->dev_private;
687 gtt_size = dev_priv->gtt.total;
688 mappable_size = dev_priv->gtt.mappable_end;
708 drm_mm_takedown(&dev_priv->mm.gtt_space);
716 struct drm_i915_private *dev_priv = dev->dev_private;
720 dev_priv->gtt.scratch_page = kzalloc(sizeof(struct drm_gem_object), GFP_KERNEL);
721 if (dev_priv->gtt.scratch_page == NULL)
729 if (drm_gem_object_init(dev, dev_priv->gtt.scratch_page, DRM_PAGE_SIZE, gen) != 0) {
730 kmem_free(dev_priv->gtt.scratch_page, sizeof (struct drm_gem_object));
733 (void) memset(dev_priv->gtt.scratch_page->kaddr, 0, DRM_PAGE_SIZE);
740 struct drm_i915_private *dev_priv = dev->dev_private;
742 drm_gem_object_release(dev_priv->gtt.scratch_page);
743 kmem_free(dev_priv->gtt.scratch_page, sizeof (struct drm_gem_object));
789 struct drm_i915_private *dev_priv = dev->dev_private;
793 dev_priv->gtt.mappable_end = pci_resource_len(dev->pdev, 1);
798 if ((dev_priv->gtt.mappable_end < (64<<20) ||
799 (dev_priv->gtt.mappable_end > (512<<20)))) {
801 dev_priv->gtt.mappable_end);
813 dev_priv->gtt.gtt_mapping.offset = dev->agp_aperbase;
814 dev_priv->gtt.gtt_mapping.size = gtt_size;
815 dev_priv->gtt.gtt_mapping.type = 0;
816 dev_priv->gtt.gtt_mapping.flags = 0;
817 dev_priv->gtt.gtt_mapping.mtrr = 0;
819 i915_gen6_gtt_ioremap(&dev_priv->gtt.gtt_mapping, dev);
821 if (dev_priv->gtt.gtt_mapping.handle == NULL) {
825 dev_priv->gtt.virtual_gtt = (caddr_t)dev_priv->gtt.gtt_mapping.handle;
827 dev_priv->gtt.gtt_clear_range = gen6_ggtt_clear_range;
828 dev_priv->gtt.gtt_insert_entries = gen6_ggtt_insert_entries;
835 struct drm_i915_private *dev_priv = dev->dev_private;
836 drm_core_ioremapfree(&dev_priv->gtt.gtt_mapping, dev);
847 drm_i915_private_t *dev_priv = dev->dev_private;
852 if (i915_bridge_dev_read_config_word(&dev_priv->bridge_dev, INTEL_GMCH_CTRL, &gmch_ctrl))
939 drm_i915_private_t *dev_priv = dev->dev_private;
955 if (i915_bridge_dev_read_config_word(&dev_priv->bridge_dev, INTEL_GMCH_CTRL, &gmch_ctrl))
976 drm_i915_private_t *dev_priv = dev->dev_private;
996 drm_i915_private_t *dev_priv = dev->dev_private;
998 if (i915_bridge_dev_read_config_word(&dev_priv->bridge_dev, INTEL_GMCH_CTRL, &gmch_ctl))
1050 drm_i915_private_t *dev_priv = dev->dev_private;
1058 return (dev_priv->gtt.mappable_end >> PAGE_SHIFT);
1066 struct drm_i915_private *dev_priv = dev->dev_private;
1068 dev_priv->gtt.mappable_end = intel_gtt_mappable_entries(dev) << PAGE_SHIFT;
1072 dev_priv->gtt.gtt_clear_range = i915_ggtt_clear_range;
1073 dev_priv->gtt.gtt_insert_entries = i915_ggtt_insert_entries;
1085 struct drm_i915_private *dev_priv = dev->dev_private;
1086 struct i915_gtt *gtt = &dev_priv->gtt;
1092 dev_priv->gtt.gtt_probe = i915_gmch_probe;
1093 dev_priv->gtt.gtt_remove = i915_gmch_remove;
1095 dev_priv->gtt.gtt_probe = gen6_gmch_probe;
1096 dev_priv->gtt.gtt_remove = gen6_gmch_remove;
1098 dev_priv->gtt.pte_encode = hsw_pte_encode;
1100 dev_priv->gtt.pte_encode = byt_pte_encode;
1102 dev_priv->gtt.pte_encode = gen6_pte_encode;
1106 ret = dev_priv->gtt.gtt_probe(dev, &dev_priv->gtt.total,
1107 &dev_priv->gtt.stolen_size);
1113 dev_priv->gtt.total >> 20);
1115 dev_priv->gtt.mappable_end >> 20);
1117 dev_priv->gtt.stolen_size >> 20);
1129 struct drm_i915_private *dev_priv = dev->dev_private;
1142 gtt_addr = (uint32_t *)(uintptr_t)((caddr_t)dev_priv->gtt.virtual_gtt
1144 ddi_put32(dev_priv->gtt.gtt_mapping.acc_handle,
1149 gtt_addr = (uint32_t *)(uintptr_t)((caddr_t)dev_priv->gtt.virtual_gtt
1151 old_gtt[i] = ddi_get32(dev_priv->gtt.gtt_mapping.acc_handle,gtt_addr);
1160 struct drm_i915_private *dev_priv = dev->dev_private;
1162 unsigned num_entries = (dev_priv->gtt.total - offset - PAGE_SIZE) >> PAGE_SHIFT;
1163 uint64_t scratch_page_addr = dev_priv->gtt.scratch_page->pfnarray[0] << PAGE_SHIFT;
1169 offset, dev_priv->gtt.scratch_page->pfnarray[0] ,1);
1172 gtt_addr = (gtt_pte_t *)(uintptr_t)((caddr_t)dev_priv->gtt.virtual_gtt
1175 ddi_put32(dev_priv->gtt.gtt_mapping.acc_handle,