OpenCloudOS-Kernel/drivers/gpu/drm/msm
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
..
adreno drm/msm: fix potential null ptr issue in non-iommu case 2017-01-13 10:23:00 -05:00
dsi drm: bridge: Link encoder and bridge in core code 2016-12-18 16:31:45 +05:30
edp drm: bridge: Link encoder and bridge in core code 2016-12-18 16:31:45 +05:30
hdmi drm: bridge: Link encoder and bridge in core code 2016-12-18 16:31:45 +05:30
mdp Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into drm-next 2017-01-27 11:00:42 +10:00
Kconfig drm: add more MMU dependencies 2017-01-11 17:24:58 +01:00
Makefile drm/msm: gpu: Add support for the GPMU 2016-11-28 15:14:16 -05:00
NOTES drm/msm: add mdp5/apq8x74 2014-01-09 14:44:06 -05:00
msm_atomic.c drm/msm: subclass drm_atomic_state 2016-11-27 11:32:27 -05:00
msm_debugfs.c drm/mm: Convert to drm_printer 2016-12-30 12:08:28 +01:00
msm_debugfs.h drm/msm: move debugfs code to it's own file 2016-05-08 10:16:02 -04:00
msm_drv.c Merge branch 'msm-next' of git://people.freedesktop.org/~robclark/linux into drm-next 2016-12-01 09:25:58 +10:00
msm_drv.h drm/msm: convert iova to 64b 2016-11-28 15:14:08 -05:00
msm_fb.c drm: Nuke fb->pixel_format 2016-12-15 14:55:34 +02:00
msm_fbdev.c drm: Rely on mode_config data for fb_helper initialization 2017-02-02 19:12:00 +01:00
msm_fence.c dma-buf: Rename struct fence to dma_fence 2016-10-25 14:40:39 +02:00
msm_fence.h dma-buf: Rename struct fence to dma_fence 2016-10-25 14:40:39 +02:00
msm_gem.c drm/msm: fix potential null ptr issue in non-iommu case 2017-01-13 10:23:00 -05:00
msm_gem.h drm/msm: convert iova to 64b 2016-11-28 15:14:08 -05:00
msm_gem_prime.c drm/msm: change gem->vmap() to get/put 2016-07-16 10:09:07 -04:00
msm_gem_shrinker.c Merge branch 'linus' into locking/core, to pick up fixes 2016-11-22 12:37:38 +01:00
msm_gem_submit.c drm/msm: Verify that MSM_SUBMIT_BO_FLAGS are set 2016-12-29 15:03:00 -05:00
msm_gem_vma.c drm/msm: support multiple address spaces 2016-11-27 11:23:09 -05:00
msm_gpu.c drm/msm: gpu: Add A5XX target support 2016-11-28 15:14:15 -05:00
msm_gpu.h drm/msm: gpu: Add A5XX target support 2016-11-28 15:14:15 -05:00
msm_iommu.c drm/msm: convert iova to 64b 2016-11-28 15:14:08 -05:00
msm_kms.h drm/msm/mdp5: add debugfs to show smp block status 2016-11-27 11:32:34 -05:00
msm_mmu.h drm/msm: convert iova to 64b 2016-11-28 15:14:08 -05:00
msm_perf.c gpu: use %pd 2016-08-07 23:38:48 -04:00
msm_rd.c drm/msm/rd: support for 64b iova 2016-11-28 15:14:08 -05:00
msm_ringbuffer.c drm/msm: Ensure that the hardware write pointer is valid 2016-12-29 15:02:58 -05:00
msm_ringbuffer.h drm/msm: add a3xx gpu support 2013-08-24 14:57:18 -04:00