linux-stable/drivers/gpu/drm/sti
Gabriel Krisman Bertazi e4563f6ba7 drm: Rely on mode_config data for fb_helper initialization
Instead of receiving the num_crts as a parameter, we can read it
directly from the mode_config structure.  I audited the drivers that
invoke this helper and I believe all of them initialize the mode_config
struct accordingly, prior to calling the fb_helper.

I used the following coccinelle hack to make this transformation, except
for the function headers and comment updates.  The first and second
rules are split because I couldn't find a way to remove the unused
temporary variables at the same time I removed the parameter.

// <smpl>
@r@
expression A,B,D,E;
identifier C;
@@
(
- drm_fb_helper_init(A,B,C,D)
+ drm_fb_helper_init(A,B,D)
|
- drm_fbdev_cma_init_with_funcs(A,B,C,D,E)
+ drm_fbdev_cma_init_with_funcs(A,B,D,E)
|
- drm_fbdev_cma_init(A,B,C,D)
+ drm_fbdev_cma_init(A,B,D)
)

@@
expression A,B,C,D,E;
@@
(
- drm_fb_helper_init(A,B,C,D)
+ drm_fb_helper_init(A,B,D)
|
- drm_fbdev_cma_init_with_funcs(A,B,C,D,E)
+ drm_fbdev_cma_init_with_funcs(A,B,D,E)
|
- drm_fbdev_cma_init(A,B,C,D)
+ drm_fbdev_cma_init(A,B,D)
)

@@
identifier r.C;
type T;
expression V;
@@
- T C;
<...
when != C
- C = V;
...>
// </smpl>

Changes since v1:
 - Rebased on top of the tip of drm-misc-next.
 - Remove mention to sti since a proper fix got merged.

Suggested-by: Daniel Vetter <daniel.vetter@intel.com>
Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.co.uk>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20170202162640.27261-1-krisman@collabora.co.uk
2017-02-02 19:12:00 +01:00
..
Kconfig drm/sti: remove stih415-416 platform support 2016-09-20 15:03:33 +02:00
Makefile drm/sti: remove deprecated sti_vtac.c file 2017-01-06 15:12:03 +01:00
NOTES
sti_awg_utils.c drm/sti: adjust delay for AWG 2016-06-27 10:18:25 +02:00
sti_awg_utils.h
sti_compositor.c drm/sti: remove stih415-416 platform support 2016-09-20 15:03:33 +02:00
sti_compositor.h drm/sti: fix compositor debugfs creation 2016-09-20 11:32:07 +02:00
sti_crtc.c drm/sti: fix compositor debugfs creation 2016-09-20 11:32:07 +02:00
sti_crtc.h drm/irq: Use unsigned int pipe in public API 2015-10-06 12:57:47 +02:00
sti_cursor.c drm/sti: fix atomic_disable check 2016-09-20 11:32:05 +02:00
sti_cursor.h drm/sti: atomic crtc/plane update 2015-08-03 14:26:05 +02:00
sti_drv.c drm: Rely on mode_config data for fb_helper initialization 2017-02-02 19:12:00 +01:00
sti_drv.h drm/sti: remove deprecated sti_vtac.c file 2017-01-06 15:12:03 +01:00
sti_dvo.c drm/sti: Remove drm_debugfs_remove_files() calls 2017-01-27 15:27:06 +01:00
sti_gdp.c drm: Nuke fb->pixel_format 2016-12-15 14:55:34 +02:00
sti_gdp.h drm/sti: atomic crtc/plane update 2015-08-03 14:26:05 +02:00
sti_hda.c drm/sti: Remove drm_debugfs_remove_files() calls 2017-01-27 15:27:06 +01:00
sti_hdmi.c Merge tag 'drm-misc-next-2017-01-30' of git://anongit.freedesktop.org/git/drm-misc into drm-next 2017-02-01 08:31:09 +10:00
sti_hdmi.h drm: sti: Add ASoC generic hdmi codec support. 2016-07-01 09:12:49 +02:00
sti_hdmi_tx3g4c28phy.c
sti_hdmi_tx3g4c28phy.h
sti_hqvdp.c Merge tag 'sti-drm-next-2017-01-06' of https://github.com/vinceab/linux into drm-next 2017-01-23 10:15:44 +10:00
sti_hqvdp_lut.h
sti_mixer.c drm/sti: remove stih415-416 platform support 2016-09-20 15:03:33 +02:00
sti_mixer.h drm: sti: use late_register and early_unregister callbacks 2016-06-21 21:32:52 +02:00
sti_plane.c drm/sti: Fix compilation failure for drm_framebuffer.pixel_format 2017-01-27 12:54:15 +10:00
sti_plane.h drm/sti: update fps debugfs entries 2017-01-06 15:12:03 +01:00
sti_tvout.c drm/sti: Remove drm_debugfs_remove_files() calls 2017-01-27 15:27:06 +01:00
sti_vid.c drm/sti: use valid video mode 2016-09-20 11:32:06 +02:00
sti_vid.h drm: sti: use late_register and early_unregister callbacks 2016-06-21 21:32:52 +02:00
sti_vtg.c drm/sti: sti_vtg: Handle return NULL error from devm_ioremap_nocache 2017-01-06 15:12:03 +01:00
sti_vtg.h drm/sti: update VTG timing programming 2016-02-26 10:03:57 +01:00