aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_irq.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/i915/i915_irq.c')
-rw-r--r--drivers/gpu/drm/i915/i915_irq.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index c2e11a0fa40c..4aedd387c8b5 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -1520,7 +1520,7 @@ i915_error_object_create_sized(struct drm_i915_private *dev_priv,
1520 if (dst == NULL) 1520 if (dst == NULL)
1521 return NULL; 1521 return NULL;
1522 1522
1523 reloc_offset = src->gtt_offset; 1523 reloc_offset = dst->gtt_offset = i915_gem_obj_ggtt_offset(src);
1524 for (i = 0; i < num_pages; i++) { 1524 for (i = 0; i < num_pages; i++) {
1525 unsigned long flags; 1525 unsigned long flags;
1526 void *d; 1526 void *d;
@@ -1572,7 +1572,6 @@ i915_error_object_create_sized(struct drm_i915_private *dev_priv,
1572 reloc_offset += PAGE_SIZE; 1572 reloc_offset += PAGE_SIZE;
1573 } 1573 }
1574 dst->page_count = num_pages; 1574 dst->page_count = num_pages;
1575 dst->gtt_offset = src->gtt_offset;
1576 1575
1577 return dst; 1576 return dst;
1578 1577
@@ -1626,7 +1625,7 @@ static void capture_bo(struct drm_i915_error_buffer *err,
1626 err->name = obj->base.name; 1625 err->name = obj->base.name;
1627 err->rseqno = obj->last_read_seqno; 1626 err->rseqno = obj->last_read_seqno;
1628 err->wseqno = obj->last_write_seqno; 1627 err->wseqno = obj->last_write_seqno;
1629 err->gtt_offset = obj->gtt_offset; 1628 err->gtt_offset = i915_gem_obj_ggtt_offset(obj);
1630 err->read_domains = obj->base.read_domains; 1629 err->read_domains = obj->base.read_domains;
1631 err->write_domain = obj->base.write_domain; 1630 err->write_domain = obj->base.write_domain;
1632 err->fence_reg = obj->fence_reg; 1631 err->fence_reg = obj->fence_reg;
@@ -1724,8 +1723,8 @@ i915_error_first_batchbuffer(struct drm_i915_private *dev_priv,
1724 return NULL; 1723 return NULL;
1725 1724
1726 obj = ring->private; 1725 obj = ring->private;
1727 if (acthd >= obj->gtt_offset && 1726 if (acthd >= i915_gem_obj_ggtt_offset(obj) &&
1728 acthd < obj->gtt_offset + obj->base.size) 1727 acthd < i915_gem_obj_ggtt_offset(obj) + obj->base.size)
1729 return i915_error_object_create(dev_priv, obj); 1728 return i915_error_object_create(dev_priv, obj);
1730 } 1729 }
1731 1730
@@ -1806,7 +1805,7 @@ static void i915_gem_record_active_context(struct intel_ring_buffer *ring,
1806 return; 1805 return;
1807 1806
1808 list_for_each_entry(obj, &dev_priv->mm.bound_list, global_list) { 1807 list_for_each_entry(obj, &dev_priv->mm.bound_list, global_list) {
1809 if ((error->ccid & PAGE_MASK) == obj->gtt_offset) { 1808 if ((error->ccid & PAGE_MASK) == i915_gem_obj_ggtt_offset(obj)) {
1810 ering->ctx = i915_error_object_create_sized(dev_priv, 1809 ering->ctx = i915_error_object_create_sized(dev_priv,
1811 obj, 1); 1810 obj, 1);
1812 break; 1811 break;
@@ -2160,10 +2159,10 @@ static void __always_unused i915_pageflip_stall_check(struct drm_device *dev, in
2160 if (INTEL_INFO(dev)->gen >= 4) { 2159 if (INTEL_INFO(dev)->gen >= 4) {
2161 int dspsurf = DSPSURF(intel_crtc->plane); 2160 int dspsurf = DSPSURF(intel_crtc->plane);
2162 stall_detected = I915_HI_DISPBASE(I915_READ(dspsurf)) == 2161 stall_detected = I915_HI_DISPBASE(I915_READ(dspsurf)) ==
2163 obj->gtt_offset; 2162 i915_gem_obj_ggtt_offset(obj);
2164 } else { 2163 } else {
2165 int dspaddr = DSPADDR(intel_crtc->plane); 2164 int dspaddr = DSPADDR(intel_crtc->plane);
2166 stall_detected = I915_READ(dspaddr) == (obj->gtt_offset + 2165 stall_detected = I915_READ(dspaddr) == (i915_gem_obj_ggtt_offset(obj) +
2167 crtc->y * crtc->fb->pitches[0] + 2166 crtc->y * crtc->fb->pitches[0] +
2168 crtc->x * crtc->fb->bits_per_pixel/8); 2167 crtc->x * crtc->fb->bits_per_pixel/8);
2169 } 2168 }