linux/include/drm
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
..
bridge drm/bridge/mhl: add MHL3 infoframe related definitions 2017-02-02 15:15:29 +05:30
i2c drm/i2c: tda998x: Register ASoC hdmi-codec and add audio DT binding 2016-09-07 13:10:10 +01:00
ttm drm/ttm: revert "add optional LRU removal callback v2" 2017-01-27 12:20:35 -05:00
ati_pcigart.h
drm_agpsupport.h
drm_atomic_helper.h drm/kms-helpers: Use recommened kerneldoc for struct member refs 2017-01-25 16:18:57 +01:00
drm_atomic.h drm/kms-core: Use recommened kerneldoc for struct member refs 2017-01-25 16:30:34 +01:00
drm_auth.h drm/core: Use recommened kerneldoc for struct member refs 2017-01-25 16:22:42 +01:00
drm_blend.h drm: RIP mode_config->rotation_property 2016-10-22 10:42:11 +02:00
drm_bridge.h drm/bridge: Use recommened kerneldoc for struct member refs 2017-01-02 09:17:26 +01:00
drm_cache.h drm: Move drm_clflush prototypes to drm_cache header file 2017-01-10 11:17:01 +01:00
drm_color_mgmt.h drm/color: un-inline drm_color_lut_extract() 2017-01-31 15:31:58 +02:00
drm_connector.h drm/kms-core: Use recommened kerneldoc for struct member refs 2017-01-25 16:30:34 +01:00
drm_crtc_helper.h Reinstate "drm/probe-helpers: Drop locking from poll_enable"" 2017-01-27 12:04:08 +10:00
drm_crtc.h drm/doc: Fix typos for early_unregister doc 2017-01-26 10:49:09 +01:00
drm_debugfs_crc.h drm: Add API for capturing frame CRCs 2016-10-17 16:44:34 +02:00
drm_displayid.h
drm_dp_dual_mode_helper.h drm: Fix LSPCON kernel-doc 2016-10-19 18:20:40 +03:00
drm_dp_helper.h drm : adds Y-coordinate and Colorimetry Format 2017-01-10 15:36:37 -08:00
drm_dp_mst_helper.h drm/kms-helpers: Use recommened kerneldoc for struct member refs 2017-01-25 16:18:57 +01:00
drm_drv.h drm: Provide a driver hook for drm_dev_release() 2017-02-02 15:58:06 +01:00
drm_edid.h drm/edid: Set AVI infoframe Q even when QS=0 2017-01-26 18:37:13 +02:00
drm_encoder_slave.h drm: Don't include <drm/drm_encoder.h> in <drm/drm_crtc.h> 2016-12-18 16:29:29 +05:30
drm_encoder.h drm/doc: Fix typos for early_unregister doc 2017-01-26 10:49:09 +01:00
drm_fb_cma_helper.h drm: Rely on mode_config data for fb_helper initialization 2017-02-02 19:12:00 +01:00
drm_fb_helper.h drm: Rely on mode_config data for fb_helper initialization 2017-02-02 19:12:00 +01:00
drm_fixed.h
drm_flip_work.h drm/kms-helpers: Use recommened kerneldoc for struct member refs 2017-01-25 16:18:57 +01:00
drm_fourcc.h drm: move allocation out of drm_get_format_name() 2016-11-12 14:19:38 +01:00
drm_framebuffer.h drm/kms-core: Use recommened kerneldoc for struct member refs 2017-01-25 16:30:34 +01:00
drm_gem_cma_helper.h drm: allow to use mmuless SoC 2017-01-06 11:04:54 +01:00
drm_gem.h drm/gem|prime|mm: Use recommened kerneldoc for struct member refs 2017-01-25 16:20:21 +01:00
drm_global.h
drm_hashtab.h
drm_irq.h drm/core: Use recommened kerneldoc for struct member refs 2017-01-25 16:22:42 +01:00
drm_legacy.h drm: document drm_auth.c 2016-06-21 22:10:55 +02:00
drm_mem_util.h
drm_mipi_dsi.h drm/dsi: Implement DCS set/get display brightness 2016-08-24 13:34:00 +02:00
drm_mm.h drm/mm: Some doc polish 2016-12-30 12:53:51 +01:00
drm_mode_config.h drm/kms-core: Use recommened kerneldoc for struct member refs 2017-01-25 16:30:34 +01:00
drm_mode_object.h drm/kms-core: Use recommened kerneldoc for struct member refs 2017-01-25 16:30:34 +01:00
drm_modes.h drm: s/drm_crtc_get_hv_timings/drm_mode_get_hv_timings/ 2017-01-26 10:46:28 +01:00
drm_modeset_helper_vtables.h drm/kms-helpers: Use recommened kerneldoc for struct member refs 2017-01-25 16:18:57 +01:00
drm_modeset_helper.h drm: Pass 'dev' to drm_helper_mode_fill_fb_struct() 2016-12-15 14:03:30 +02:00
drm_modeset_lock.h drm/kms-core: Use recommened kerneldoc for struct member refs 2017-01-25 16:30:34 +01:00
drm_of.h drm: mark drm_of_component_match_add dummy inline 2016-10-26 15:48:42 -04:00
drm_os_linux.h
drm_panel.h
drm_pciids.h
drm_plane_helper.h drm/kms-helpers: Extract drm_modeset_helper.[hc] 2016-08-16 16:10:19 +02:00
drm_plane.h drm/doc: Fix typos for early_unregister doc 2017-01-26 10:49:09 +01:00
drm_print.h drm/doc: use preferred struct reference in kernel-doc 2016-12-30 13:34:59 +01:00
drm_property.h drm/kms-core: Use recommened kerneldoc for struct member refs 2017-01-25 16:30:34 +01:00
drm_rect.h
drm_simple_kms_helper.h drm/kms-helpers: Use recommened kerneldoc for struct member refs 2017-01-25 16:18:57 +01:00
drm_sysfs.h
drm_vma_manager.h drm: use drm_file to tag vm-bos 2016-09-19 11:22:08 +02:00
drmP.h drm: remove device_is_agp callback 2017-01-26 10:45:14 +01:00
gma_drm.h
i915_component.h drm/i915/dp: DP audio API changes for MST 2016-09-22 09:01:55 -07:00
i915_drm.h drm: avoid "possible bad bitmask?" warning 2016-08-09 22:18:26 +02:00
i915_pciids.h drm/i915: more .is_mobile cleanups for BDW 2017-01-04 14:39:04 -02:00
intel-gtt.h drm/i915: Use fixed-sized types for stolen 2017-01-06 16:02:09 +00:00