drm/i915: Fix tracepoint compilation
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 29 Nov 2016 12:42:05 +0000 (12:42 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 29 Nov 2016 12:54:03 +0000 (12:54 +0000)
drivers/gpu/drm/i915/./i915_trace.h: In function ‘trace_event_raw_event_i915_gem_evict’:
drivers/gpu/drm/i915/./i915_trace.h:409:24: error: ‘struct i915_address_space’ has no member named ‘dev’
       __entry->dev = vm->dev->primary->index;

A couple of macros missed in the s/vm->dev/vm->i915/ conversion.

Fixes: 49d73912cbfc ("drm/i915: Convert vm->dev backpointer to vm->i915")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20161129124205.19351-1-chris@chris-wilson.co.uk
Reviewed-by: Michał Winiarski <michal.winiarski@intel.com>
drivers/gpu/drm/i915/i915_gem_gtt.c
drivers/gpu/drm/i915/i915_trace.h

index 18d0340e2be41c08fd9112967c28c70d69ea8458..02fb063302bfadc7c6d071fcf4e7b98f4df160be 100644 (file)
@@ -858,7 +858,7 @@ static void gen8_ppgtt_clear_range(struct i915_address_space *vm,
 {
        struct i915_hw_ppgtt *ppgtt = i915_vm_to_ppgtt(vm);
 
-       if (USES_FULL_48BIT_PPGTT(to_i915(vm->dev)))
+       if (USES_FULL_48BIT_PPGTT(vm->i915))
                gen8_ppgtt_clear_pml4(vm, &ppgtt->pml4, start, length);
        else
                gen8_ppgtt_clear_pdp(vm, &ppgtt->pdp, start, length);
@@ -893,7 +893,7 @@ gen8_ppgtt_insert_pte_entries(struct i915_address_space *vm,
                        kunmap_px(ppgtt, pt_vaddr);
                        pt_vaddr = NULL;
                        if (++pde == I915_PDES) {
-                               if (++pdpe == I915_PDPES_PER_PDP(to_i915(vm->dev)))
+                               if (++pdpe == I915_PDPES_PER_PDP(vm->i915))
                                        break;
                                pde = 0;
                        }
@@ -916,7 +916,7 @@ static void gen8_ppgtt_insert_entries(struct i915_address_space *vm,
 
        __sg_page_iter_start(&sg_iter, pages->sgl, sg_nents(pages->sgl), 0);
 
-       if (!USES_FULL_48BIT_PPGTT(to_i915(vm->dev))) {
+       if (!USES_FULL_48BIT_PPGTT(vm->i915)) {
                gen8_ppgtt_insert_pte_entries(vm, &ppgtt->pdp, &sg_iter, start,
                                              cache_level);
        } else {
@@ -1455,7 +1455,7 @@ static int gen8_alloc_va_range(struct i915_address_space *vm,
 {
        struct i915_hw_ppgtt *ppgtt = i915_vm_to_ppgtt(vm);
 
-       if (USES_FULL_48BIT_PPGTT(to_i915(vm->dev)))
+       if (USES_FULL_48BIT_PPGTT(vm->i915))
                return gen8_alloc_va_range_4lvl(vm, &ppgtt->pml4, start, length);
        else
                return gen8_alloc_va_range_3lvl(vm, &ppgtt->pdp, start, length);
@@ -1526,7 +1526,7 @@ static void gen8_dump_ppgtt(struct i915_hw_ppgtt *ppgtt, struct seq_file *m)
        gen8_pte_t scratch_pte = gen8_pte_encode(vm->scratch_page.daddr,
                                                 I915_CACHE_LLC);
 
-       if (!USES_FULL_48BIT_PPGTT(to_i915(vm->dev))) {
+       if (!USES_FULL_48BIT_PPGTT(vm->i915)) {
                gen8_dump_pdp(&ppgtt->pdp, start, length, scratch_pte, m);
        } else {
                uint64_t pml4e;
index c5d210ebaa9a21f268bced6661c3cb5a49497f9c..240067705e1c53e311bc26d3f82be829ac3d8f2e 100644 (file)
@@ -406,7 +406,7 @@ TRACE_EVENT(i915_gem_evict,
                            ),
 
            TP_fast_assign(
-                          __entry->dev = vm->dev->primary->index;
+                          __entry->dev = vm->i915->drm.primary->index;
                           __entry->vm = vm;
                           __entry->size = size;
                           __entry->align = align;
@@ -443,7 +443,7 @@ TRACE_EVENT(i915_gem_evict_vm,
                            ),
 
            TP_fast_assign(
-                          __entry->dev = vm->dev->primary->index;
+                          __entry->dev = vm->i915->drm.primary->index;
                           __entry->vm = vm;
                          ),
 
@@ -711,7 +711,7 @@ DECLARE_EVENT_CLASS(i915_ppgtt,
 
        TP_fast_assign(
                        __entry->vm = vm;
-                       __entry->dev = vm->dev->primary->index;
+                       __entry->dev = vm->i915->drm.primary->index;
        ),
 
        TP_printk("dev=%u, vm=%p", __entry->dev, __entry->vm)