Skip to content

i915/display: split and constify vtable (v3)

Dave Airlie intel-gfx 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest23 patches 2 repliesIn review

Changes in v1 from the cover letter

This is orthogonal to my display ptr refactoring and should probably be applied first.

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/23drm/i915/pm: drop get_fifo_size vfunc.drivers/gpu/drm/i915/i915_drv.h drivers/gpu/drm/i915/intel_pm.c+11 -110 replies
2/23drm/i915: make update_wm take a dev_priv.drivers/gpu/drm/i915/display/intel_display.c drivers/gpu/drm/i915/i915_drv.h drivers/gpu/drm/i915/intel_pm.c +1 more+13 -190 replies
3/23drm/i915/wm: provide wrappers around watermark vfuncs callsdrivers/gpu/drm/i915/display/intel_display.c drivers/gpu/drm/i915/intel_pm.c drivers/gpu/drm/i915/intel_pm.h+123 -1041 reply
4/23drm/i915: add wrappers around cdclk vtable funcs.drivers/gpu/drm/i915/display/intel_cdclk.c drivers/gpu/drm/i915/display/intel_cdclk.h drivers/gpu/drm/i915/display/intel_display.c +1 more+44 -110 replies
5/23drm/i915/display: add intel_fdi_link_train wrapper.drivers/gpu/drm/i915/display/intel_display.c drivers/gpu/drm/i915/display/intel_fdi.c drivers/gpu/drm/i915/display/intel_fdi.h+11 -10 replies
6/23drm/i915: split clock gating init from display vtabledrivers/gpu/drm/i915/i915_drv.h drivers/gpu/drm/i915/intel_pm.c+32 -250 replies
7/23drm/i915: split watermark vfuncs from display vtable.drivers/gpu/drm/i915/display/intel_display.c drivers/gpu/drm/i915/i915_drv.h drivers/gpu/drm/i915/intel_pm.c+54 -450 replies
8/23drm/i915: split color functions from display vtabledrivers/gpu/drm/i915/display/intel_color.c drivers/gpu/drm/i915/i915_drv.h+54 -490 replies
9/23drm/i915: split audio functions from display vtabledrivers/gpu/drm/i915/display/intel_audio.c drivers/gpu/drm/i915/i915_drv.h+25 -180 replies
10/23drm/i915: split cdclk functions from display vtable.drivers/gpu/drm/i915/display/intel_cdclk.c drivers/gpu/drm/i915/i915_drv.h+78 -720 replies
11/23drm/i915: split irq hotplug function from display vtabledrivers/gpu/drm/i915/display/intel_hotplug.c drivers/gpu/drm/i915/i915_drv.h drivers/gpu/drm/i915/i915_irq.c+17 -100 replies
12/23drm/i915: split fdi link training from display vtable.drivers/gpu/drm/i915/display/intel_fdi.c drivers/gpu/drm/i915/i915_drv.h+12 -70 replies
13/23drm/i915: split the dpll clock compute out from display vtable.drivers/gpu/drm/i915/display/intel_display.c drivers/gpu/drm/i915/display/intel_dpll.c drivers/gpu/drm/i915/i915_drv.h+18 -120 replies
14/23drm/i915: constify fdi link training vtabledrivers/gpu/drm/i915/display/intel_fdi.c drivers/gpu/drm/i915/i915_drv.h+17 -50 replies
15/23drm/i915: constify hotplug function vtable.drivers/gpu/drm/i915/display/intel_hotplug.c drivers/gpu/drm/i915/i915_drv.h drivers/gpu/drm/i915/i915_irq.c+24 -100 replies
16/23drm/i915: constify color function vtable.drivers/gpu/drm/i915/display/intel_color.c drivers/gpu/drm/i915/i915_drv.h+93 -470 replies
17/23drm/i915: constify the audio function vtabledrivers/gpu/drm/i915/display/intel_audio.c drivers/gpu/drm/i915/i915_drv.h+28 -170 replies
18/23drm/i915: constify the dpll clock vtabledrivers/gpu/drm/i915/display/intel_display.c drivers/gpu/drm/i915/display/intel_dpll.c drivers/gpu/drm/i915/i915_drv.h+44 -120 replies
19/23drm/i915: constify the cdclk vtabledrivers/gpu/drm/i915/display/intel_cdclk.c drivers/gpu/drm/i915/i915_drv.h+206 -960 replies
20/23drm/i915: drop unused function ptr and comments.drivers/gpu/drm/i915/i915_drv.h+0 -70 replies
21/23drm/i915: constify display function vtabledrivers/gpu/drm/i915/display/intel_display.c drivers/gpu/drm/i915/i915_drv.h+52 -310 replies
22/23drm/i915: constify clock gating init vtable.drivers/gpu/drm/i915/i915_drv.h drivers/gpu/drm/i915/intel_pm.c+55 -250 replies
23/23drm/i915: constify display wm vtabledrivers/gpu/drm/i915/display/intel_display.c drivers/gpu/drm/i915/i915_drv.h drivers/gpu/drm/i915/intel_pm.c+75 -410 replies

Reviews trailers per patch

20 of 23 patches have a Reviewed-by or Acked-by.

PatchJani Nikula
1/23R-b
2/23R-b
3/23R-b
4/23
5/23
6/23R-b
7/23
8/23R-b
9/23R-b
10/23R-b
11/23R-b
12/23R-b
13/23R-b
14/23R-b
15/23R-b
16/23R-b
17/23R-b
18/23R-b
19/23R-b
20/23R-b
21/23R-b
22/23R-b
23/23R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [Intel-gfx] [PATCH 00/23] i915/display: split and constify vtable (v3)

(v3 just adds some missing ,)

Details below, I've taken all the review feedback (thanks Jani).
I added 3 patches moving to wrappers before refactoring, and one other patch is unreviewed (07) but the main comment was wanting the wrappers.

Jani if you are happy with the final 4 patches can you land this series, I don't think I have drm-intel commit rights.

v1:
This is orthogonal to my display ptr refactoring and should probably be applied first.

The display funcs vtable was a bit of mess, lots of intermixing of internal display functionality and interfaces to watermarks/irqs.

It's also considered not great security practice to leave writeable function pointers around for exploits to get into.

This series attempts to address both problems, first there are a few cleanups, then it splits the function table into multiple pieces. Some of the splits might be bikesheds but I think we should apply first and merge things later if there is good reason.

The second half converts all the vtables to static const structs, I've used macros in some of them to make it less messy, the cdclk one is probably the worst one.

v2:
Added some patches adding wrappers around things before refactoring them as suggested by Jani.
Fixed up all struct names as suggested by Jani.
Added s-o-b lines
Added commit msgs.

v3:
added missing , (Jani)

Dave.