[Intel-gfx] [PATCH 19/21] drm/i915: move some leftovers to intel_pm.h from i915_drv.h

Jani Nikula jani.nikula at intel.com
Mon Apr 29 13:03:33 UTC 2019


On Mon, 29 Apr 2019, Chris Wilson <chris at chris-wilson.co.uk> wrote:
> Quoting Jani Nikula (2019-04-29 13:29:37)
>> Commit 696173b064c6 ("drm/i915: extract intel_pm.h from intel_drv.h")
>> missed the declarations in i915_drv.h.
>
> Fwiw, I want to pull these along with gt powermanagement and rps into
> gt/intel_gt_pm.c and a few friends.
>
> Doesn't make much difference for this patch; just planned obsolescence.

I'm fine either way, via this patch or directly.

In general I like how it's easier to look at the new headers and wonder
why on earth some functions are in the files they are, and try to come
up with better division into files.

---

I'm also trying to probe feedback on some style guidelines I might like
to enforce in the future:

1) A file and the non-static functions in it should have the same
   prefix, i.e. intel_foo.c has functions prefixed intel_foo_*.

2) No file should have platform specific non-static functions, i.e. all
   the non-static functions should be intel_foo_* and this should
   internally split to platform_foo_* instead of leaving the if ladders
   or function pointer initializations to the callers.

So, thoughts on naming the functions intel_gt_pm_* upon moving them?

BR,
Jani.


-- 
Jani Nikula, Intel Open Source Graphics Center


More information about the Intel-gfx mailing list