linux_old1/drivers/gpu/drm/tilcdc
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/tilcdc: make fbdev support really optional 2016-07-18 09:11:38 +02:00
Makefile drm/tilcdc: Add dummy primary plane implementation 2016-08-08 23:05:00 +03:00
tilcdc_crtc.c Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into drm-next 2017-01-27 11:00:42 +10:00
tilcdc_drv.c drm: Rely on mode_config data for fb_helper initialization 2017-02-02 19:12:00 +01:00
tilcdc_drv.h drm/tilcdc: Remove tilcdc_debugfs_cleanup() 2017-01-27 15:27:45 +01:00
tilcdc_external.c drm: bridge: Link encoder and bridge in core code 2016-12-18 16:31:45 +05:30
tilcdc_external.h drm/tilcdc: Add drm bridge support for attaching drm bridge drivers 2016-11-30 14:17:52 +02:00
tilcdc_panel.c Merge remote-tracking branch 'airlied/drm-next' into drm-misc-next 2016-12-06 10:26:48 +01:00
tilcdc_panel.h drm/tilcdc: add support for LCD panels (v5) 2013-02-19 17:57:45 -05:00
tilcdc_plane.c drm: Replace 'format->format' comparisons to just 'format' comparisons 2016-12-15 14:55:34 +02:00
tilcdc_regs.h drm/tilcdc: Enable frame done irq and functionality for LCDC rev 1 2016-11-30 14:20:03 +02:00
tilcdc_slave_compat.c drm/tilcdc: Return directly after a failed kfree_table_init() in tilcdc_convert_slave_node() 2016-09-23 13:49:52 +03:00
tilcdc_slave_compat.dts drm/tilcdc: Add DRM_TILCDC_SLAVE_COMPAT for ti,tilcdc,slave binding support 2015-05-27 13:13:33 +03:00
tilcdc_slave_compat.h drm/tilcdc: Add DRM_TILCDC_SLAVE_COMPAT for ti,tilcdc,slave binding support 2015-05-27 13:13:33 +03:00
tilcdc_tfp410.c drm/tilcdc: Remove obsolete drm_connector_register() calls 2016-11-29 21:03:18 +02:00
tilcdc_tfp410.h