linux/drivers/gpu/drm/msm
David Herrmann 0cdbe8ac69 drm/gem: remove misleading gfp parameter to get_pages()
drm_gem_get_pages() currently allows passing a 'gfp' parameter that is
passed to shmem combined with mapping_gfp_mask(). Given that the default
mapping_gfp_mask() is GFP_HIGHUSER, it is _very_ unlikely that anyone will
ever make use of that parameter. In fact, all drivers currently pass
redundant flags or 0.

This patch removes the 'gfp' parameter. The only reason to keep it is to
remove flags like __GFP_WAIT. But in its current form, it can only be used
to add flags. So to remove __GFP_WAIT, you'd have to drop it from the
mapping_gfp_mask, which again is stupid as this mask is used by shmem-core
for other allocations, too.

If any driver ever requires that parameter, we can introduce a new helper
that takes the raw 'gfp' parameter. The caller'd be responsible to combine
it with mapping_gfp_mask() in a suitable way. The current
drm_gem_get_pages() helper would then simply use mapping_gfp_mask() and
call the new helper. This is what shmem_read_mapping_pages{_gfp,} does
right now.

Moreover, the gfp-zone flag-usage is not obvious: If you pass a modified
zone, shmem core will WARN() or even BUG(). In other words, the following
must be true for 'gfp' passed to shmem_read_mapping_pages_gfp():
    gfp_zone(mapping_gfp_mask(mapping)) == gfp_zone(gfp)
Add a comment to drm_gem_read_pages() explaining that constraint.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
2014-07-08 00:29:53 +02:00
..
adreno drm/msm: add perf logging debugfs 2014-06-02 07:36:21 -04:00
dsi drm/msm: resync generated headers 2014-01-09 14:38:59 -05:00
hdmi drm/msm/hdmi: use gpio and HPD polling 2014-05-30 15:32:42 -04:00
mdp drm/msm/mdp5: fix error return value 2014-06-02 07:36:30 -04:00
Kconfig drm/msm: update for ARCH_MSM -> ARCH_QCOM 2014-05-30 15:37:54 -04:00
Makefile drm/msm: add perf logging debugfs 2014-06-02 07:36:21 -04:00
msm_drv.c drm: add drm_fb_helper_restore_fbdev_mode_unlocked() 2014-06-05 10:02:40 +10:00
msm_drv.h drm/msm: add perf logging debugfs 2014-06-02 07:36:21 -04:00
msm_fb.c drm/msm: split out msm_kms.h 2014-01-09 14:44:04 -05:00
msm_fbdev.c drm/msm: default to XR24 rather than AR24 2014-04-25 08:58:23 -04:00
msm_gem_prime.c drm/msm: prime support 2013-11-01 12:39:44 -04:00
msm_gem_submit.c drm/msm: add rd logging debugfs 2014-06-02 07:36:11 -04:00
msm_gem.c drm/gem: remove misleading gfp parameter to get_pages() 2014-07-08 00:29:53 +02:00
msm_gem.h drm/msm: add rd logging debugfs 2014-06-02 07:36:11 -04:00
msm_gpu.c drm/msm: add perf logging debugfs 2014-06-02 07:36:21 -04:00
msm_gpu.h drm/msm: add perf logging debugfs 2014-06-02 07:36:21 -04:00
msm_iommu.c drm/msm: add a330/apq8x74 2014-01-09 14:44:06 -05:00
msm_kms.h drm/msm: add mdp5/apq8x74 2014-01-09 14:44:06 -05:00
msm_mmu.h drm/msm: add support for non-IOMMU systems 2014-01-09 14:38:58 -05:00
msm_perf.c drm/msm: add perf logging debugfs 2014-06-02 07:36:21 -04:00
msm_rd.c drm/msm: add rd logging debugfs 2014-06-02 07:36:11 -04:00
msm_ringbuffer.c drm/msm: add a3xx gpu support 2013-08-24 14:57:18 -04:00
msm_ringbuffer.h drm/msm: add a3xx gpu support 2013-08-24 14:57:18 -04:00
NOTES drm/msm: add mdp5/apq8x74 2014-01-09 14:44:06 -05:00