linux/drivers/gpu/drm/omapdrm
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
..
displays drm/omap: panel-sony-acx565akm.c: Add MODULE_ALIAS 2017-01-04 14:08:14 +02:00
dss drm/omap: dsi: fix compile errors when enabling debug prints 2017-01-04 13:57:47 +02:00
Kconfig drm/omap: make fbdev support really optional 2016-07-18 09:11:34 +02:00
Makefile drm/omap: remove -Werror from Makefile 2016-03-03 17:38:46 +02:00
omap_connector.c drm: omapdrm: Perform initialization/cleanup at probe/remove time 2016-12-19 11:33:45 +02:00
omap_crtc.c drm: omapdrm: Inline the pipe2vbl function 2016-12-19 11:25:03 +02:00
omap_debugfs.c drm/omap: Remove omap_debugfs_cleanup() 2017-01-27 15:25:53 +01:00
omap_dmm_priv.h drm/omap: fix race conditon in DMM 2015-03-24 13:50:59 +02:00
omap_dmm_tiler.c drm: omapdrm: Use sizeof(*var) instead of sizeof(type) for structures 2016-12-19 11:25:05 +02:00
omap_dmm_tiler.h drm/omap: fix TILER on OMAP5 2015-03-24 13:50:55 +02:00
omap_drv.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
omap_drv.h 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
omap_encoder.c drm: omapdrm: Use sizeof(*var) instead of sizeof(type) for structures 2016-12-19 11:25:05 +02:00
omap_fb.c omapdrm changes for 4.11 2017-01-23 10:17:06 +10:00
omap_fbdev.c drm: Rely on mode_config data for fb_helper initialization 2017-02-02 19:12:00 +01:00
omap_gem_dmabuf.c Merge tag 'topic/drm-misc-2016-03-22' of git://anongit.freedesktop.org/drm-intel into drm-next 2016-03-24 08:41:59 +10:00
omap_gem.c mm: use vmf->address instead of of vmf->virtual_address 2016-12-14 16:04:09 -08:00
omap_irq.c drm: omapdrm: Remove global variables 2016-12-19 11:25:04 +02:00
omap_plane.c drm: omapdrm: Handle FIFO underflow IRQs internally 2016-12-19 11:24:56 +02:00
tcm-sita.c drm/omap: Use bitmaps for TILER placement 2015-12-31 11:25:47 +02:00
tcm-sita.h
tcm.h drm/omap: Use bitmaps for TILER placement 2015-12-31 11:25:47 +02:00
TODO