[Intel-gfx] [RFC 4/7] drm/i915: move and rename i915_runtime_pm

Jani Nikula jani.nikula at linux.intel.com
Tue May 21 08:27:12 UTC 2019


On Fri, 17 May 2019, Chris Wilson <chris at chris-wilson.co.uk> wrote:
> Quoting Daniele Ceraolo Spurio (2019-05-17 16:27:26)
>> 
>> 
>> On 5/16/19 3:42 PM, Chris Wilson wrote:
>> > Quoting Chris Wilson (2019-05-16 23:10:10)
>> >> Quoting Chris Wilson (2019-05-16 23:07:43)
>> >>> Quoting Daniele Ceraolo Spurio (2019-05-16 22:56:31)
>> >>>> diff --git a/drivers/gpu/drm/i915/intel_runtime_pm.h b/drivers/gpu/drm/i915/intel_runtime_pm.h
>> >>>> index b964ca7af9c8..0e3817f9785e 100644
>> >>>> --- a/drivers/gpu/drm/i915/intel_runtime_pm.h
>> >>>> +++ b/drivers/gpu/drm/i915/intel_runtime_pm.h
>> >>>> @@ -6,6 +6,7 @@
>> >>>>   #ifndef __INTEL_RUNTIME_PM_H__
>> >>>>   #define __INTEL_RUNTIME_PM_H__
>> >>>>   
>> >>>> +#include <linux/device.h>
>> >>>
>> >>> There doesn't seem to be any peeking into struct device, so do we not
>> >>> just need the struct device forward decl here?
>> 
>> True, will fix.

At some point we had the idea of adding separate _types.h headers for
types. The more we add structs in the headers, the more they'll need to
include to be self-contained, while the interface users in many cases
don't need to look at the internals at all. They just need the forward
decls for the pointers.

>> 
>> >>
>> >> And add it to Makefile.headers_test
>> > 
>> > Hint: we may need to split out intel_display_power.[ch]
>> > 
>> 
>> Should I add intel_display_power.h to Makefile.headers_test as well? It 
>> does compile on its own, but it'll have to include intel_display.h, 
>> which isn't on the list.
>
> Yes. If we have to include intel_display.h, that means whenever we get
> around to splitting intel_display.h, we will remember to update
> intel_display_power.h. Rainy day tasks will be to delete #include at
> random and see which are still required in headers.

Storm day task will be to bang iwyu [1] to work nicely with the kernel
build.

BR,
Jani.


[1] https://include-what-you-use.org/



-- 
Jani Nikula, Intel Open Source Graphics Center


More information about the Intel-gfx mailing list