mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-21 14:38:02 +07:00
e4563f6ba7
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 |
||
---|---|---|
.. | ||
dispnv04 | ||
include | ||
nvif | ||
nvkm | ||
Kbuild | ||
Kconfig | ||
nouveau_abi16.c | ||
nouveau_abi16.h | ||
nouveau_acpi.c | ||
nouveau_acpi.h | ||
nouveau_backlight.c | ||
nouveau_bios.c | ||
nouveau_bios.h | ||
nouveau_bo.c | ||
nouveau_bo.h | ||
nouveau_chan.c | ||
nouveau_chan.h | ||
nouveau_connector.c | ||
nouveau_connector.h | ||
nouveau_crtc.h | ||
nouveau_debugfs.c | ||
nouveau_debugfs.h | ||
nouveau_display.c | ||
nouveau_display.h | ||
nouveau_dma.c | ||
nouveau_dma.h | ||
nouveau_dp.c | ||
nouveau_drm.c | ||
nouveau_drv.h | ||
nouveau_encoder.h | ||
nouveau_fbcon.c | ||
nouveau_fbcon.h | ||
nouveau_fence.c | ||
nouveau_fence.h | ||
nouveau_gem.c | ||
nouveau_gem.h | ||
nouveau_hwmon.c | ||
nouveau_hwmon.h | ||
nouveau_ioc32.c | ||
nouveau_ioctl.h | ||
nouveau_led.c | ||
nouveau_led.h | ||
nouveau_nvif.c | ||
nouveau_platform.c | ||
nouveau_platform.h | ||
nouveau_prime.c | ||
nouveau_reg.h | ||
nouveau_sgdma.c | ||
nouveau_ttm.c | ||
nouveau_ttm.h | ||
nouveau_usif.c | ||
nouveau_usif.h | ||
nouveau_vga.c | ||
nouveau_vga.h | ||
nv04_fbcon.c | ||
nv04_fence.c | ||
nv10_fence.c | ||
nv10_fence.h | ||
nv17_fence.c | ||
nv50_display.c | ||
nv50_display.h | ||
nv50_fbcon.c | ||
nv50_fence.c | ||
nv84_fence.c | ||
nvc0_fbcon.c | ||
nvc0_fence.c |