[Intel-gfx] [RFC 1/2] drm/i915/uc: Move uC related types into dedicated header

Michal Wajdeczko michal.wajdeczko at intel.com
Wed Sep 27 10:58:45 UTC 2017


On Wed, 27 Sep 2017 09:22:35 +0200, Sagar Arun Kamble  
<sagar.a.kamble at intel.com> wrote:

> Like this change as now headers becomes easy to read. Minor inputs  
> suggested below.
>
> On 9/26/2017 10:18 PM, Michal Wajdeczko wrote:
>> In old header structure we were mixing type definitions and
>> declarations that prevent us from exposing some functions
>> as inline. Lets try to fix that.
>>
>> Suggested-by: Chris Wilson <chris at chris-wilson.co.uk>
>> Signed-off-by: Michal Wajdeczko <michal.wajdeczko at intel.com>
>> Cc: Chris Wilson <chris at chris-wilson.co.uk>
>> Cc: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
>> Cc: Sagar Arun Kamble <sagar.a.kamble at intel.com>
>> ---

<snip>

>> +#ifndef _INTEL_UC_TYPES_H_
>> +#define _INTEL_UC_TYPES_H_
>> +
>> +#include "i915_guc_reg.h"
> How about pulling intel_guc_fwif.h from intel_guc_ct.h here? I feel it  
> fits more here.

Sure. Previously I leaved it in ct header as it was required only there.
But to simplify dependencies we can include fwif here.

>> +#include "intel_guc_ct.h"
>> +
>> +struct i915_guc_client;
> Can we skip this forward declaration and ...

Well, it looks that this forward declaration was superfluous as we need it
only for pointer definition inside intel_guc where compiler can still be
happy without explicit declaration.

> define struct i915_guc_client here .. that way it maintains the needs of  
> intel_guc together.

Ok, will reverse the order but will place it right before intel_guc.

Thanks,
Michal


More information about the Intel-gfx mailing list