[Intel-gfx] [PATCH 3/4] drm/i915: Include i915_reg.h in intel_ringbuffer.h

Michal Wajdeczko michal.wajdeczko at intel.com
Wed Mar 7 11:24:06 UTC 2018


On Wed, 07 Mar 2018 08:58:30 +0100, Tvrtko Ursulin  
<tvrtko.ursulin at linux.intel.com> wrote:

>
> On 06/03/2018 17:33, Chris Wilson wrote:
>> Quoting Michal Wajdeczko (2018-03-06 16:15:26)
>>> Header intel_ringbuffer.h is using definitions from i915_reg.h
>>> but forget to include it. Remove this hidden dependency by
>>> explicitly include missing header.
>>>
>>> Signed-off-by: Michal Wajdeczko <michal.wajdeczko at intel.com>
>>> Cc: Chris Wilson <chris at chris-wilson.co.uk>
>>> Cc: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
>>> ---
>>>   drivers/gpu/drm/i915/intel_ringbuffer.h | 1 +
>>>   1 file changed, 1 insertion(+)
>>>
>>> diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.h  
>>> b/drivers/gpu/drm/i915/intel_ringbuffer.h
>>> index e7526a4..cdea2ab 100644
>>> --- a/drivers/gpu/drm/i915/intel_ringbuffer.h
>>> +++ b/drivers/gpu/drm/i915/intel_ringbuffer.h
>>> @@ -7,6 +7,7 @@
>>>   #include "i915_gem_batch_pool.h"
>>>   #include "i915_gem_timeline.h"
>>>   +#include "i915_reg.h"
>>  Just the gpu commands, right? I'd like to pull those out of i915_reg.h!
>
> The one I spotted by luck was VECS_HW. Maybe Michal has a more  
> comprehensive list as output by the compiler when he found the problem.
>

We need i915_reg_t itself and VECS_HW plus gpu commands.
So, what kind of reminder do you want me to add?

/Michal

In file included from drivers/gpu/drm/i915/intel_ringbuffer.c:35:0:
drivers/gpu/drm/i915/intel_ringbuffer.h:512:29: error: âVECS_HWâ  
undeclared here (not in a function)
  #define GEN6_SEMAPHORE_LAST VECS_HW

drivers/gpu/drm/i915/intel_ringbuffer.h:519:4: error: unknown type name  
âi915_reg_tâ
     i915_reg_t signal[GEN6_NUM_SEMAPHORES];

drivers/gpu/drm/i915/intel_ringbuffer.h:721:56: error:  
âMI_STORE_DWORD_INDEX_SHIFTâ undeclared (first use in this function)
  #define I915_GEM_HWS_INDEX_ADDR (I915_GEM_HWS_INDEX <<  
MI_STORE_DWORD_INDEX_SHIFT)

drivers/gpu/drm/i915/intel_ringbuffer.h:961:13: error: implicit  
declaration of function âGFX_OP_PIPE_CONTROLâ  
[-Werror=implicit-function-declaration]
   batch[0] = GFX_OP_PIPE_CONTROL(6);

drivers/gpu/drm/i915/intel_ringbuffer.h: In function  
âgen8_emit_ggtt_write_rcsâ:
drivers/gpu/drm/i915/intel_ringbuffer.h:979:10: error:  
âPIPE_CONTROL_GLOBAL_GTT_IVBâ undeclared (first use in this function)
   *cs++ = PIPE_CONTROL_GLOBAL_GTT_IVB | PIPE_CONTROL_CS_STALL |
           ^
drivers/gpu/drm/i915/intel_ringbuffer.h:979:40: error:  
âPIPE_CONTROL_CS_STALLâ undeclared (first use in this function)
   *cs++ = PIPE_CONTROL_GLOBAL_GTT_IVB | PIPE_CONTROL_CS_STALL |
                                         ^
drivers/gpu/drm/i915/intel_ringbuffer.h:980:3: error:  
âPIPE_CONTROL_QW_WRITEâ undeclared (first use in this function)
    PIPE_CONTROL_QW_WRITE;
    ^
drivers/gpu/drm/i915/intel_ringbuffer.h: In function  
âgen8_emit_ggtt_writeâ:
drivers/gpu/drm/i915/intel_ringbuffer.h:998:11: error: âMI_FLUSH_DWâ  
undeclared (first use in this function)
   *cs++ = (MI_FLUSH_DW + 1) | MI_FLUSH_DW_OP_STOREDW;
            ^
drivers/gpu/drm/i915/intel_ringbuffer.h:998:30: error:  
âMI_FLUSH_DW_OP_STOREDWâ undeclared (first use in this function)
   *cs++ = (MI_FLUSH_DW + 1) | MI_FLUSH_DW_OP_STOREDW;
                               ^
drivers/gpu/drm/i915/intel_ringbuffer.h:999:23: error:  
âMI_FLUSH_DW_USE_GTTâ undeclared (first use in this function)
   *cs++ = gtt_offset | MI_FLUSH_DW_USE_GTT;

...


More information about the Intel-gfx mailing list