[Intel-gfx] [RFC 22/31] drm/i915: Move i915_gem_chipset_flush to intel_gt

Tvrtko Ursulin tvrtko.ursulin at linux.intel.com
Fri Jun 14 16:30:35 UTC 2019


On 14/06/2019 17:26, Chris Wilson wrote:
> Quoting Tvrtko Ursulin (2019-06-14 16:17:22)
>> diff --git a/drivers/gpu/drm/i915/gt/intel_gt.h b/drivers/gpu/drm/i915/gt/intel_gt.h
>> index 051d7069db55..8d84716c3b3b 100644
>> --- a/drivers/gpu/drm/i915/gt/intel_gt.h
>> +++ b/drivers/gpu/drm/i915/gt/intel_gt.h
>> @@ -9,8 +9,7 @@
>>   
>>   #include "gt/intel_engine_types.h"
>>   #include "gt/intel_gt_types.h"
>> -
>> -struct drm_i915_private;
>> +#include "i915_drv.h"
>>   
>>   void intel_gt_init(struct intel_gt *gt, struct drm_i915_private *i915);
>>   
>> @@ -20,4 +19,11 @@ void intel_gt_clear_error_registers(struct intel_gt *gt,
>>   
>>   void intel_gt_flush_ggtt_writes(struct intel_gt *gt);
>>   
>> +static inline void intel_gt_chipset_flush(struct intel_gt *gt)
>> +{
>> +       wmb();
>> +       if (INTEL_GEN(gt->i915) < 6)
>> +               intel_gtt_chipset_flush();
>> +}
> 
> Grr, in my current mindset I'd take an out-of-line chipset flush over an
> include "i915_drv.h"
> 
> In the long run, having it out-of-line may be better for detecting if it
> is ever a problem (more noticeable).

You know that was my first choice but then I saw you replying "A 
function call, for this, you cannot be serious!". :)

So okay, will make it a function call.

Regards,

Tvrtko



More information about the Intel-gfx mailing list