linux-stable/drivers/gpu/drm/armada
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
..
armada_510.c drm/armada: update Armada 510 (Dove) to use "ext_ref_clk1" as the clock 2014-07-11 15:40:14 +01:00
armada_crtc.c drm: Replace 'format->format' comparisons to just 'format' comparisons 2016-12-15 14:55:34 +02:00
armada_crtc.h drm/armada: use common helper for plane base address 2016-11-01 20:06:55 +00:00
armada_debugfs.c drm/armada: s/drm_mm_dump_table/drm_mm_print/ 2016-12-30 17:35:13 +01:00
armada_drm.h drm/armada: de-midlayer armada 2016-11-17 00:02:50 +00:00
armada_drv.c drm: Deduplicate driver initialization message 2016-12-30 12:37:39 +01:00
armada_fb.c drm: Pass 'dev' to drm_helper_mode_fill_fb_struct() 2016-12-15 14:03:30 +02:00
armada_fb.h drm: Pass the user drm_mode_fb_cmd2 as const to .fb_create() 2015-11-24 11:47:38 +01:00
armada_fbdev.c drm: Rely on mode_config data for fb_helper initialization 2017-02-02 19:12:00 +01:00
armada_gem.c mm: use vmf->address instead of of vmf->virtual_address 2016-12-14 16:04:09 -08:00
armada_gem.h drm: Remove unused drm_device from drm_gem_object_lookup() 2016-05-17 08:47:30 +02:00
armada_hw.h
armada_ioctlP.h
armada_overlay.c drm: Nuke fb->pixel_format 2016-12-15 14:55:34 +02:00
armada_trace.c drm/armada: add tracing support 2016-11-01 20:06:54 +00:00
armada_trace.h drm/armada: add tracing support 2016-11-01 20:06:54 +00:00
Kconfig drm: add more MMU dependencies 2017-01-11 17:24:58 +01:00
Makefile drm/armada: Fix compile fail 2016-12-30 17:47:04 +01:00