linux/drivers/gpu/drm/rockchip
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
..
analogix_dp-rockchip.c drm/rockchip: analogix_dp: Refuse to enable PSR if panel doesn't support it 2016-10-04 08:23:17 +02:00
dw_hdmi-rockchip.c drm: bridge: dw-hdmi: Move IRQ and IO resource allocation to common code 2017-01-18 09:29:32 +05:30
dw-mipi-dsi.c drm: Make the connector .detect() callback optional 2016-12-01 10:05:53 -05:00
inno_hdmi.c drm: rockchip: Rely on the default ->best_encoder() behavior 2016-06-10 17:24:37 +02:00
inno_hdmi.h drm/rockchip: hdmi: add Innosilicon HDMI support 2016-02-18 13:56:43 +08:00
Kconfig gpu: Remove depends on RESET_CONTROLLER when not a provider 2016-10-19 09:26:15 +02:00
Makefile drm/rockchip: add an common abstracted PSR driver 2016-08-23 11:44:32 -04:00
rockchip_drm_drv.c drm: rockchip: use crtc helper drm_crtc_from_index() 2016-12-30 12:15:11 +01:00
rockchip_drm_drv.h drm/rockchip: Replace custom wait_for_vblanks with helper 2016-09-21 06:55:51 -07:00
rockchip_drm_fb.c drm: Pass 'dev' to drm_helper_mode_fill_fb_struct() 2016-12-15 14:03:30 +02:00
rockchip_drm_fb.h drm: Pass the user drm_mode_fb_cmd2 as const to .fb_create() 2015-11-24 11:47:38 +01:00
rockchip_drm_fbdev.c drm: Rely on mode_config data for fb_helper initialization 2017-02-02 19:12:00 +01:00
rockchip_drm_fbdev.h drm/rockchip: respect CONFIG_DRM_FBDEV_EMULATION 2016-01-22 08:45:31 +08:00
rockchip_drm_gem.c dma-mapping: use unsigned long for dma_attrs 2016-08-04 08:50:07 -04:00
rockchip_drm_gem.h dma-mapping: use unsigned long for dma_attrs 2016-08-04 08:50:07 -04:00
rockchip_drm_psr.c drm/rockchip: Fix up bug in psr state machine 2016-09-21 06:55:49 -07:00
rockchip_drm_psr.h drm/rockchip: Don't key off vblank for psr 2016-09-21 06:55:47 -07:00
rockchip_drm_vop.c drm: Nuke fb->pixel_format 2016-12-15 14:55:34 +02:00
rockchip_drm_vop.h drm/rockchip: vop: export line flag function 2016-08-23 11:44:31 -04:00
rockchip_vop_reg.c Merge branch 'for-next' of git://people.freedesktop.org/~seanpaul/dogwood into drm-next 2016-08-25 12:35:35 +10:00
rockchip_vop_reg.h drm/rockchip: vop: add rk3399 vop support 2016-08-23 11:44:29 -04:00