OpenCloudOS-Kernel/drivers/gpu/drm/nouveau
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
..
dispnv04 drm: Nuke fb->pixel_format 2016-12-15 14:55:34 +02:00
include drm/nouveau/bios/volt: pointers are 32-bit 2016-11-28 15:39:35 +10:00
nvif drm/nouveau: silence sparse warnings about symbols not being marked static 2016-11-07 14:04:40 +10:00
nvkm drm/nouveau/bios/dp: fix handling of LevelEntryTableIndex on DP table 4.2 2016-12-13 11:40:16 +10:00
Kbuild drm/nouveau/drm/nouveau: add a LED driver for the NVIDIA logo 2016-10-12 17:29:29 +10:00
Kconfig drm: fix compilations issues introduced by "drm: allow to use mmuless SoC" 2017-01-09 11:30:30 +01:00
nouveau_abi16.c drm: remove device_is_agp callback 2017-01-26 10:45:14 +01:00
nouveau_abi16.h drm/nouveau/abi16: implement limited interoperability with usif/nvif 2015-11-03 15:02:18 +10:00
nouveau_acpi.c drm/nouveau/acpi: fix check for power resources support 2016-11-01 14:52:03 +10:00
nouveau_acpi.h drm/nouveau/device: remove pci/platform_device from common struct 2015-08-28 12:40:49 +10:00
nouveau_backlight.c drm/nouveau/bl: Do not register interface if Apple GMUX detected 2016-12-13 11:40:17 +10:00
nouveau_bios.c drm/nouveau/kms: lvds panel strap moved again on maxwell 2016-11-07 14:04:14 +10:00
nouveau_bios.h drm/nouveau/nouveau: bios pointers may be unaligned, use proper accessors 2016-10-12 17:29:02 +10:00
nouveau_bo.c drm/ttm: revert "implement LRU add callbacks v2" 2017-01-27 12:20:34 -05:00
nouveau_bo.h
nouveau_chan.c drm/nouveau/fifo/gp100: initial support 2016-07-14 11:53:25 +10:00
nouveau_chan.h drm/nouveau: remove unnecessary usage of object handles 2015-11-03 15:02:18 +10:00
nouveau_connector.c drm: Wrap the check for atomic_commit implementation 2016-12-27 10:44:00 +01:00
nouveau_connector.h drm: Don't include <drm/drm_encoder.h> in <drm/drm_crtc.h> 2016-12-18 16:29:29 +05:30
nouveau_crtc.h drm/nouveau/kms/nv50: remove code to support non-atomic connector properties 2016-11-07 14:05:01 +10:00
nouveau_debugfs.c drm/nouveau: rename nouveau_drm.h to nouveau_drv.h 2016-05-20 14:43:04 +10:00
nouveau_debugfs.h drm/nouveau: rename nouveau_drm.h to nouveau_drv.h 2016-05-20 14:43:04 +10:00
nouveau_display.c drm: nouveau: use crtc helper drm_crtc_from_index() 2017-01-18 09:21:06 -05:00
nouveau_display.h drm/nouveau/bl: Assign different names to interfaces 2016-12-13 11:40:16 +10:00
nouveau_dma.c drm/nouveau: rename nouveau_drm.h to nouveau_drv.h 2016-05-20 14:43:04 +10:00
nouveau_dma.h drm/nouveau/nvif: simplify and tidy library interfaces 2015-08-28 12:40:32 +10:00
nouveau_dp.c drm/nouveau/kms/nv50: initial support for DP 1.2 multi-stream 2016-11-07 14:05:03 +10:00
nouveau_drm.c drm: Change the return type of the unload hook to void 2017-01-09 11:25:22 +01:00
nouveau_drv.h drm/nouveau/bl: Assign different names to interfaces 2016-12-13 11:40:16 +10:00
nouveau_encoder.h drm/nouveau/kms/nv50: initial support for DP 1.2 multi-stream 2016-11-07 14:05:03 +10:00
nouveau_fbcon.c drm: Rely on mode_config data for fb_helper initialization 2017-02-02 19:12:00 +01:00
nouveau_fbcon.h drm/nouveau/fbcon: refcount the drm_framebuffer 2016-11-07 14:04:44 +10:00
nouveau_fence.c ktime: Cleanup ktime_set() usage 2016-12-25 17:21:22 +01:00
nouveau_fence.h drm/nouveau/kms/nv50: remove code to support non-atomic page flips 2016-11-07 14:05:01 +10:00
nouveau_gem.c drm/nouveau: hide gcc-4.9 -Wmaybe-uninitialized 2016-11-07 14:04:36 +10:00
nouveau_gem.h drm/nouveau: rename nouveau_drm.h to nouveau_drv.h 2016-05-20 14:43:04 +10:00
nouveau_hwmon.c drm/nouveau/hwmon: add in_min and in_max 2016-07-14 11:53:25 +10:00
nouveau_hwmon.h
nouveau_ioc32.c
nouveau_ioctl.h
nouveau_led.c drm/nouveau/drm/nouveau: add a LED driver for the NVIDIA logo 2016-10-12 17:29:29 +10:00
nouveau_led.h drm/nouveau/drm/nouveau: add a LED driver for the NVIDIA logo 2016-10-12 17:29:29 +10:00
nouveau_nvif.c drm/nouveau: rename nouveau_drm.h to nouveau_drv.h 2016-05-20 14:43:04 +10:00
nouveau_platform.c drm/nouveau/tegra: acquire and enable reference clock if needed 2016-04-06 16:06:51 +10:00
nouveau_platform.h drm/nouveau: rename nouveau_drm.h to nouveau_drv.h 2016-05-20 14:43:04 +10:00
nouveau_prime.c drm/nouveau: rename nouveau_drm.h to nouveau_drv.h 2016-05-20 14:43:04 +10:00
nouveau_reg.h
nouveau_sgdma.c drm/nouveau: rename nouveau_drm.h to nouveau_drv.h 2016-05-20 14:43:04 +10:00
nouveau_ttm.c drm/nouveau: use designated initializers 2016-12-18 14:48:27 +01:00
nouveau_ttm.h
nouveau_usif.c drm/fence: add fence to drm_pending_event 2016-06-03 00:01:59 +02:00
nouveau_usif.h
nouveau_vga.c drm/nouveau: rename nouveau_drm.h to nouveau_drv.h 2016-05-20 14:43:04 +10:00
nouveau_vga.h
nv04_fbcon.c drm/nouveau/fbcon: make use of drm_fb_helper.dev 2016-11-07 14:04:43 +10:00
nv04_fence.c dma-buf: Rename struct fence to dma_fence 2016-10-25 14:40:39 +02:00
nv10_fence.c drm/nouveau/kms/nv50: remove code to support non-atomic page flips 2016-11-07 14:05:01 +10:00
nv10_fence.h drm/nouveau/kms/nv50: remove code to support non-atomic page flips 2016-11-07 14:05:01 +10:00
nv17_fence.c dma-buf: Rename struct fence to dma_fence 2016-10-25 14:40:39 +02:00
nv50_display.c drm/dp: Store drm_device in MST topology manager 2017-01-25 06:01:48 +01:00
nv50_display.h drm/nouveau/kms/nv50: remove code to support non-atomic page flips 2016-11-07 14:05:01 +10:00
nv50_fbcon.c drm/nouveau/fbcon: make use of drm_fb_helper.fb 2016-11-07 14:04:44 +10:00
nv50_fence.c drm/nouveau/kms/nv50: remove code to support non-atomic page flips 2016-11-07 14:05:01 +10:00
nv84_fence.c drm/nouveau/kms/nv50: remove code to support non-atomic page flips 2016-11-07 14:05:01 +10:00
nvc0_fbcon.c drm/nouveau/fbcon: make use of drm_fb_helper.fb 2016-11-07 14:04:44 +10:00
nvc0_fence.c drm/nouveau: rename nouveau_drm.h to nouveau_drv.h 2016-05-20 14:43:04 +10:00