exynos-linux-stable/drivers/gpu/drm
Michal Hocko 0222bac3b4
treewide: use kv[mz]alloc* rather than opencoded variants
There are many code paths opencoding kvmalloc.  Let's use the helper
instead.  The main difference to kvmalloc is that those users are
usually not considering all the aspects of the memory allocator.  E.g.
allocation requests <= 32kB (with 4kB pages) are basically never failing
and invoke OOM killer to satisfy the allocation.  This sounds too
disruptive for something that has a reasonable fallback - the vmalloc.
On the other hand those requests might fallback to vmalloc even when the
memory allocator would succeed after several more reclaim/compaction
attempts previously.  There is no guarantee something like that happens
though.

This patch converts many of those places to kv[mz]alloc* helpers because
they are more conservative.

Link: http://lkml.kernel.org/r/20170306103327.2766-2-mhocko@kernel.org
Signed-off-by: Michal Hocko <mhocko@suse.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com> # Xen bits
Acked-by: Kees Cook <keescook@chromium.org>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Acked-by: Andreas Dilger <andreas.dilger@intel.com> # Lustre
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com> # KVM/s390
Acked-by: Dan Williams <dan.j.williams@intel.com> # nvdim
Acked-by: David Sterba <dsterba@suse.com> # btrfs
Acked-by: Ilya Dryomov <idryomov@gmail.com> # Ceph
Acked-by: Tariq Toukan <tariqt@mellanox.com> # mlx4
Acked-by: Leon Romanovsky <leonro@mellanox.com> # mlx5
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Anton Vorontsov <anton@enomsg.org>
Cc: Colin Cross <ccross@android.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Ben Skeggs <bskeggs@redhat.com>
Cc: Kent Overstreet <kent.overstreet@gmail.com>
Cc: Santosh Raspatur <santosh@chelsio.com>
Cc: Hariprasad S <hariprasad@chelsio.com>
Cc: Yishai Hadas <yishaih@mellanox.com>
Cc: Oleg Drokin <oleg.drokin@intel.com>
Cc: "Yan, Zheng" <zyan@redhat.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Cc: David Miller <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2023-02-21 00:20:54 +03:00
..
amd drm/amd/display: remove duplicated assignment to grph_obj_type 2020-03-20 09:07:44 +01:00
arc drm/arcpgu: Accommodate adv7511 switch to DRM bridge 2016-11-11 04:31:35 +03:00
arm drm/arm/hdlcd: Allow a bit of clock tolerance 2019-07-10 09:55:30 +02:00
armada drm/armada: fix colorkey mode property 2018-08-24 13:12:37 +02:00
ast drm/ast: Fix connector leak during driver unload 2018-12-21 14:11:39 +01:00
atmel-hlcdc drm: atmel-hlcdc: enable clock before configuring timing engine 2020-02-14 16:31:07 -05:00
bochs drm/bochs: downgrade pci_request_region failure from error to warning 2020-04-13 10:32:51 +02:00
bridge drm/bridge: analogix-anx78xx: silence -EPROBE_DEFER warnings 2020-01-04 13:39:01 +01:00
cirrus drm/drivers: add support for using the arch wc mapping API. 2016-10-26 16:48:01 +10:00
etnaviv drm/etnaviv: replace MMU flush marker with flush sequence 2020-04-13 10:32:52 +02:00
exynos drm/exynos: dsi: fix workaround for the legacy clock name 2020-04-02 17:20:22 +02:00
fsl-dcu drm/fsl-dcu: enable IRQ before drm_atomic_helper_resume() 2017-12-09 22:01:46 +01:00
gma500 drm/gma500: Fixup fbdev stolen size usage evaluation 2020-02-28 15:42:16 +01:00
hisilicon drm/hisilicon: Ensure LDI regs are properly configured. 2017-12-05 11:24:35 +01:00
i2c
i810 drm/i810: Prevent underflow in ioctl 2019-12-21 10:41:37 +01:00
i915 drm/i915/gen9: Clear residual context state on context switch 2020-01-14 20:04:32 +01:00
imx drm/imx: only send event on crtc disable if kept disabled 2019-07-10 09:55:46 +02:00
mediatek drm/mediatek: handle events when enabling/disabling crtc 2020-02-28 15:42:27 +01:00
mga drm/mga: remove device_is_agp callback 2017-04-12 12:41:20 +02:00
mgag200 gpu: drm: mgag200: mgag200_main:- Handle error from pci_iomap 2017-11-21 09:23:26 +01:00
msm This is the 4.9.219 stable release 2020-04-13 13:00:22 +02:00
nouveau treewide: use kv[mz]alloc* rather than opencoded variants 2023-02-21 00:20:54 +03:00
omapdrm drm/omap: fix memory barrier bug in DMM driver 2018-11-21 09:25:56 +01:00
panel drm/panel: simple: Fix panel_simple_dsi_probe 2019-08-04 09:33:36 +02:00
qxl drm: qxl: Don't alloc fbdev if emulation is not supported 2018-03-22 09:17:36 +01:00
r128
radeon radeon: insert 10ms sleep in dce5_crtc_load_lut 2020-02-28 15:42:40 +01:00
rcar-du drm: rcar-du: Handle event when disabling CRTCs 2018-03-22 09:17:47 +01:00
rockchip drm/rockchip: Properly adjust to a true clock in adjusted_mode 2019-08-04 09:33:38 +02:00
savage drm/savage: dereferencing an error pointer 2017-01-19 20:17:58 +01:00
shmobile
sis
sti drm/sti: do not remove the drm_bridge that was never added 2020-01-29 10:24:00 +01:00
sun4i drm/sun4i: Set device driver data at bind time for use in unbind 2019-05-16 19:43:43 +02:00
tdfx
tegra drm/tegra: dpaux: Fix error handling 2017-01-19 20:17:58 +01:00
tilcdc drm/tilcdc: ensure nonatomic iowrite64 is not used 2018-03-24 11:00:24 +01:00
ttm This is the 4.9.89 stable release 2018-03-22 09:54:47 +01:00
udl udl-kms: fix crash due to uninitialized memory 2018-09-05 09:20:09 +02:00
vc4 drm/vc4: Fix compilation error reported by kbuild test bot 2019-05-02 09:32:02 +02:00
vgem
via mm: replace get_user_pages() write/force parameters with gup_flags 2016-10-19 08:11:43 -07:00
virtio drm/virtio: fix bounds check in virtio_gpu_cmd_get_capset() 2020-01-29 10:24:01 +01:00
vmwgfx drm/vmwgfx: prevent memory leak in vmw_cmdbuf_res_add 2020-02-28 15:42:34 +01:00
ati_pcigart.c
drm_agpsupport.c
drm_atomic.c This is the 4.9.117 stable release 2018-08-03 08:50:05 +02:00
drm_atomic_helper.c BACKPORT: drm/fence: add in-fences support 2017-05-23 15:47:18 -07:00
drm_auth.c drm: set is_master to 0 upon drm_new_set_master() failure 2018-12-08 13:05:06 +01:00
drm_blend.c
drm_bridge.c
drm_bufs.c drm/bufs: Fix Spectre v1 vulnerability 2019-02-12 19:44:50 +01:00
drm_cache.c
drm_color_mgmt.c
drm_connector.c drm: Don't race connector registration 2017-06-17 06:41:53 +02:00
drm_context.c
drm_crtc.c BACKPORT: drm/fence: add drm_crtc_create_fence() 2017-05-23 15:47:18 -07:00
drm_crtc_helper.c
drm_crtc_helper_internal.h
drm_crtc_internal.h BACKPORT: drm/fence: add drm_crtc_create_fence() 2017-05-23 15:47:18 -07:00
drm_debugfs.c
drm_dma.c
drm_dp_aux_dev.c
drm_dp_dual_mode_helper.c drm/i915: Fix LSPCON TMDS output buffer enabling from low-power state 2018-04-29 11:31:56 +02:00
drm_dp_helper.c drm/psr: Fix missed entry in PSR setup time table. 2018-06-06 16:44:38 +02:00
drm_dp_mst_topology.c drm_dp_mst_topology: fix broken drm_dp_sideband_parse_remote_dpcd_read() 2020-04-13 10:32:59 +02:00
drm_drv.c drm: drm_minor_register(): Clean up debugfs on failure 2017-11-15 15:53:12 +01:00
drm_edid.c drm/edid: Add 6 bpc quirk for SDC panel in Lenovo G50 2019-10-29 09:15:23 +01:00
drm_edid_load.c
drm_encoder.c
drm_encoder_slave.c
drm_fb_cma_helper.c BACKPORT: drm/fb_cma_helper: Add drm_fb_cma_prepare_fb() helper 2017-05-23 15:47:18 -07:00
drm_fb_helper.c drm/fb-helper: Ignore the value of fb_var_screeninfo.pixclock 2019-01-23 08:10:57 +01:00
drm_flip_work.c
drm_fops.c This is the 4.9.180 stable release 2019-05-31 08:40:27 -07:00
drm_fourcc.c
drm_framebuffer.c
drm_gem.c drm/i915: Prevent writing into a read-only object via a GGTT mmap 2019-11-12 19:16:16 +01:00
drm_gem_cma_helper.c
drm_global.c
drm_hashtab.c
drm_info.c drm: Print device information again in debugfs 2016-10-17 16:20:53 +10:00
drm_internal.h
drm_ioc32.c
drm_ioctl.c drm/ioctl: Fix Spectre v1 vulnerabilities 2018-12-29 13:40:16 +01:00
drm_irq.c drm: Defer disabling the vblank IRQ until the next interrupt (for instant-off) 2018-03-22 09:17:39 +01:00
drm_kms_helper_common.c
drm_legacy.h
drm_lock.c
drm_memory.c
drm_mipi_dsi.c
drm_mm.c drm: Apply range restriction after color adjustment when allocation 2017-11-30 08:39:13 +00:00
drm_mode_object.c
drm_modes.c drm/modes: Prevent division by zero htotal 2019-02-15 08:07:38 +01:00
drm_modeset_helper.c
drm_modeset_lock.c drm: Require __GFP_NOFAIL for the legacy drm_modeset_lock_all 2018-02-25 11:05:41 +01:00
drm_of.c
drm_panel.c
drm_pci.c
drm_plane.c BACKPORT: drm/fence: add in-fences support 2017-05-23 15:47:18 -07:00
drm_plane_helper.c
drm_platform.c
drm_prime.c drm: Fix up kerneldoc for new drm_gem_dmabuf_export() 2016-10-10 11:19:42 +02:00
drm_probe_helper.c drm: Flush output polling on shutdown 2019-10-05 12:30:11 +02:00
drm_property.c drm: limit to INT_MAX in create_blob ioctl 2020-01-12 11:24:12 +01:00
drm_rect.c
drm_scatter.c
drm_simple_kms_helper.c drm: simple_kms_helper: Add prepare_fb and cleanup_fb hooks 2016-10-05 15:18:02 +02:00
drm_sysfs.c
drm_trace.h
drm_trace_points.c
drm_vm.c
drm_vma_manager.c
Kconfig BACKPORT: drm/fence: add in-fences support 2017-05-23 15:47:18 -07:00
Makefile