Feature macro cleanup, batch 1
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest12 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/12 | drm/i915: Transitional, non-polymorph, macrosdrivers/ | +3 | 0 replies | |
| 2/12 | drm/i915: IS_MOBILE() fixesdrivers/ drivers/ drivers/ +3 more | +16 | 0 replies | |
| 3/12 | drm/i915: HAS_POOLED_EU() fixesdrivers/ drivers/ drivers/ | +5 | 0 replies | |
| 4/12 | drm/i915: INTEL_GEN() fixes, part 1drivers/ drivers/ drivers/ +1 more | +5 | 0 replies | |
| 5/12 | drm/i915: INTEL_GEN() fixes, part 2drivers/ drivers/ drivers/ +20 more | +80 | 0 replies | |
| 6/12 | drm/i915: INTEL_GEN() fixes, part 3drivers/ | +89 | 0 replies | |
| 7/12 | drm/i915: INTEL_GEN() fixes, part 4drivers/ | +40 | 0 replies | |
| 8/12 | drm/i915: INTEL_GEN() fixes, part 5drivers/ drivers/ drivers/ +20 more | +124 | 0 replies | |
| 9/12 | drm/i915: i915_vgacntrl_reg() fixesdrivers/ drivers/ | +5 | 0 replies | |
| 10/12 | drm/i915: HAS_GMCH_DISPLAY() fixesdrivers/ drivers/ drivers/ +4 more | +25 | 0 replies | |
| 11/12 | drm/i915: RESOURCE_STREAMER/CORE_RING_FREQ fixesdrivers/ drivers/ drivers/ | +8 | 0 replies | |
| 12/12 | drm/i915: INTEL_GEN() fixes, part 6drivers/ drivers/ drivers/ +2 more | +19 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 00/12] Feature macro cleanup, batch 1
Most of our feature macros are made to take drm_i915_private as a parameter, since the wanted information is part of that struct.
A lot of code still passes drm_device instead, meaning extra pointer churn. As a stop-gap solution our macros currently implements a poor man's polymorphism by use of the magic __I915__ macro.
This batch of patches starts a transition to a shinier world with non-polymorphic macros. I've got more patches in the pipeline, but to prevent the merge from stalling due to lack of review or due to merge conflicts, I've decided to split them into several batches.
The first patch in this series is only needed during the merge period; the final patch in the final batch of patches will undo those changes (but until then these transitional macros serve to prevent new code being added that uses the old behaviour).
This batch will, due to the introduction of some transitional code, introduce more lines that it deletes, but the following batches will more than compensate for this. In terms of module size, this patch should save us a bit less than 1kB. The total series will save something on the order of 35-40kB (without doing most of the further cleanup that this enables).
The philosophy when doing this transition has been:
* Whenever struct drm_i915_private * has been introduced it has been named dev_priv[1].
* In most of those cases I've tried to make the newly introduced pointers be independent from struct drm_device *, to ease finding unused variables once the transition is complete
* Whenever a transitioned macro has another macro on the same line, or the ones immediately preceeding or succeeding, I've transitioned those too, to minimise the amount of patches that changes the same lines.
* If leaf functions with struct drm_device * as an in-parameter has ended up not using that parameter at all (except for turning it into struct drm_i915_private *), I have in a few cases modified the function to take the latter pointer as a parameter instead.
* In a few cases I've rebroken lines to make them follow the kernel coding style.
[1] Let the bikeshedding ensue; i915 is an alternative that would make the code slightly more compact, be slightly more descriptive, and allow for fewer lines that violates that the kernel coding style in terms of length, but it does have a solid majority against it in terms of established use.
David Weinehall (12):
drm/i915: Transitional, non-polymorph, macros drm/i915: IS_MOBILE() fixes
drm/i915: HAS_POOLED_EU() fixes drm/i915: INTEL_GEN() fixes, part 1 drm/i915: INTEL_GEN() fixes, part 2 drm/i915: INTEL_GEN() fixes, part 3 drm/i915: INTEL_GEN() fixes, part 4 drm/i915: INTEL_GEN() fixes, part 5 drm/i915: i915_vgacntrl_reg() fixes drm/i915: HAS_GMCH_DISPLAY() fixes drm/i915: RESOURCE_STREAMER/CORE_RING_FREQ fixes drm/i915: INTEL_GEN() fixes, part 6
drivers/gpu/drm/i915/i915_drv.c | 29 ++-- drivers/gpu/drm/i915/i915_drv.h | 52 +++--- drivers/gpu/drm/i915/i915_gem.c | 14 +- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 11 +- drivers/gpu/drm/i915/i915_gem_fence.c | 9 +- drivers/gpu/drm/i915/i915_gem_gtt.c | 22 +-- drivers/gpu/drm/i915/i915_gem_render_state.c | 6 +- drivers/gpu/drm/i915/i915_gem_stolen.c | 9 +- drivers/gpu/drm/i915/i915_gem_tiling.c | 7 +- drivers/gpu/drm/i915/i915_gpu_error.c | 18 +-- drivers/gpu/drm/i915/i915_irq.c | 50 +++--- drivers/gpu/drm/i915/i915_suspend.c | 18 +-- drivers/gpu/drm/i915/intel_audio.c | 2 +- drivers/gpu/drm/i915/intel_bios.c | 2 +- drivers/gpu/drm/i915/intel_color.c | 16 +- drivers/gpu/drm/i915/intel_crt.c | 9 +- drivers/gpu/drm/i915/intel_ddi.c | 24 ++- drivers/gpu/drm/i915/intel_device_info.c | 2 +- drivers/gpu/drm/i915/intel_display.c | 231 ++++++++++++++------------- drivers/gpu/drm/i915/intel_dp.c | 56 ++++--- drivers/gpu/drm/i915/intel_dpll_mgr.c | 5 +- drivers/gpu/drm/i915/intel_drv.h | 2 +- drivers/gpu/drm/i915/intel_dsi.c | 5 +- drivers/gpu/drm/i915/intel_fbc.c | 28 ++-- drivers/gpu/drm/i915/intel_fifo_underrun.c | 2 +- drivers/gpu/drm/i915/intel_guc_loader.c | 2 +- drivers/gpu/drm/i915/intel_hdmi.c | 15 +- drivers/gpu/drm/i915/intel_lvds.c | 17 +- drivers/gpu/drm/i915/intel_mocs.c | 2 +- drivers/gpu/drm/i915/intel_panel.c | 12 +- drivers/gpu/drm/i915/intel_pm.c | 83 ++++++---- drivers/gpu/drm/i915/intel_psr.c | 8 +- drivers/gpu/drm/i915/intel_ringbuffer.c | 2 +- drivers/gpu/drm/i915/intel_sdvo.c | 12 +- drivers/gpu/drm/i915/intel_sprite.c | 17 +- drivers/gpu/drm/i915/intel_tv.c | 2 +- drivers/gpu/drm/i915/intel_uncore.c | 14 +- 37 files changed, 418 insertions(+), 397 deletions(-)
Signature · 6 lines
2.9.3 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx