mirror-linux/drivers/gpu/drm/i915
Kees Cook 189f164e57 Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses
Conversion performed via this Coccinelle script:

  // SPDX-License-Identifier: GPL-2.0-only
  // Options: --include-headers-for-types --all-includes --include-headers --keep-comments
  virtual patch

  @gfp depends on patch && !(file in "tools") && !(file in "samples")@
  identifier ALLOC = {kmalloc_obj,kmalloc_objs,kmalloc_flex,
 		    kzalloc_obj,kzalloc_objs,kzalloc_flex,
		    kvmalloc_obj,kvmalloc_objs,kvmalloc_flex,
		    kvzalloc_obj,kvzalloc_objs,kvzalloc_flex};
  @@

  	ALLOC(...
  -		, GFP_KERNEL
  	)

  $ make coccicheck MODE=patch COCCI=gfp.cocci

Build and boot tested x86_64 with Fedora 42's GCC and Clang:

Linux version 6.19.0+ (user@host) (gcc (GCC) 15.2.1 20260123 (Red Hat 15.2.1-7), GNU ld version 2.44-12.fc42) #1 SMP PREEMPT_DYNAMIC 1970-01-01
Linux version 6.19.0+ (user@host) (clang version 20.1.8 (Fedora 20.1.8-4.fc42), LLD 20.1.8) #1 SMP PREEMPT_DYNAMIC 1970-01-01

Signed-off-by: Kees Cook <kees@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2026-02-22 08:26:33 -08:00
..
display Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
gem Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
gt Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
gvt Convert 'alloc_flex' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
pxp Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
selftests Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
.gitignore
Kconfig
Kconfig.debug drm/i915: Fix selecting CONFIG_DRM_KUNIT_TEST in debug builds 2025-07-25 11:41:55 +03:00
Kconfig.profile
Makefile drm for 7.0-rc1 2026-02-11 12:55:44 -08:00
TODO.txt
i915_active.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
i915_active.h
i915_active_types.h
i915_cmd_parser.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
i915_cmd_parser.h
i915_config.c drm/i915: drop i915 param from i915_fence{, _context}_timeout() 2025-12-30 21:41:15 +02:00
i915_config.h drm/i915: drop i915 param from i915_fence{, _context}_timeout() 2025-12-30 21:41:15 +02:00
i915_debugfs.c drm: include drm_print.h where needed 2025-10-31 10:34:52 +02:00
i915_debugfs.h
i915_debugfs_params.c drm/i915: use drm->debugfs_root for creating debugfs files 2025-08-07 11:30:26 +03:00
i915_debugfs_params.h
i915_deps.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
i915_deps.h
i915_display_pc8.c drm/i915/pc8: Add parent interface for PC8 forcewake tricks 2025-12-19 21:28:48 +02:00
i915_display_pc8.h drm/i915/pc8: Add parent interface for PC8 forcewake tricks 2025-12-19 21:28:48 +02:00
i915_driver.c drm/{i915, xe}: move initial plane calls to parent interface 2025-12-22 15:09:22 +02:00
i915_driver.h drm/{i915, xe}/display: pass parent interface to display probe 2025-11-03 11:55:19 +02:00
i915_drm_client.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
i915_drm_client.h
i915_drv.h Beyond Display related: 2025-12-27 16:27:04 +10:00
i915_edram.c drm/i915/edram: extract i915_edram.[ch] for edram detection 2025-11-21 12:11:14 +02:00
i915_edram.h drm/i915/edram: extract i915_edram.[ch] for edram detection 2025-11-21 12:11:14 +02:00
i915_file_private.h
i915_freq.c drm/i915: split out i915_freq.[ch] 2025-11-21 12:11:49 +02:00
i915_freq.h drm/i915: split out i915_freq.[ch] 2025-11-21 12:11:49 +02:00
i915_gem.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
i915_gem.h drm/i915: move GEM_QUIRK_PIN_SWIZZLED_PAGES to i915_gem.h 2025-06-27 08:15:32 +02:00
i915_gem_evict.c
i915_gem_evict.h
i915_gem_gtt.c
i915_gem_gtt.h
i915_gem_ww.c
i915_gem_ww.h
i915_getparam.c drm: include drm_print.h where needed 2025-10-31 10:34:52 +02:00
i915_getparam.h
i915_gmch.c drm/i915/gmch: split out i915_gmch.[ch] from soc 2025-11-21 12:12:32 +02:00
i915_gmch.h drm/i915/gmch: split out i915_gmch.[ch] from soc 2025-11-21 12:12:32 +02:00
i915_gpu_error.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
i915_gpu_error.h drm/i915/guc: Include the GuC registers in the error state 2025-09-11 11:28:02 -07:00
i915_gtt_view_types.h
i915_hdcp_gsc.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
i915_hdcp_gsc.h drm/{i915,xe}/hdcp: use parent interface for HDCP GSC calls 2025-11-28 10:44:51 +02:00
i915_hwmon.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
i915_hwmon.h
i915_initial_plane.c drm/i915: drop dependency on struct intel_display from i915 initial plane 2025-12-22 15:09:23 +02:00
i915_initial_plane.h drm/{i915, xe}: move initial plane calls to parent interface 2025-12-22 15:09:22 +02:00
i915_ioc32.c
i915_ioc32.h
i915_ioctl.c
i915_ioctl.h
i915_iosf_mbi.h
i915_irq.c drm/{i915,xe}/display: move irq calls to parent interface 2025-11-19 19:33:43 +02:00
i915_irq.h drm/{i915,xe}/display: move irq calls to parent interface 2025-11-19 19:33:43 +02:00
i915_jiffies.h drm/i915: split out separate files for jiffies timeout and wait helpers 2025-10-31 13:08:48 +02:00
i915_list_util.h drm/i915: split out i915_list_util.h 2025-09-12 11:08:45 +03:00
i915_memcpy.c
i915_memcpy.h
i915_mitigations.c
i915_mitigations.h
i915_mm.c drm/i915: track_pfn() -> "pfnmap tracking" 2025-05-22 14:55:37 -07:00
i915_mm.h
i915_mmio_range.c drm/i915: move and rename reg_in_range_table 2025-10-16 15:20:56 -04:00
i915_mmio_range.h drm/i915: move and rename reg_in_range_table 2025-10-16 15:20:56 -04:00
i915_module.c drm: include drm_print.h where needed 2025-10-31 10:34:52 +02:00
i915_panic.c drm/{i915, xe}/panic: move panic handling to parent interface 2025-12-12 15:17:58 +02:00
i915_panic.h drm/{i915, xe}/panic: move panic handling to parent interface 2025-12-12 15:17:58 +02:00
i915_params.c drm/i915: switch to use kernel standard error injection 2025-12-18 11:59:20 +02:00
i915_params.h drm/i915: switch to use kernel standard error injection 2025-12-18 11:59:20 +02:00
i915_pci.c drm/i915: switch to use kernel standard error injection 2025-12-18 11:59:20 +02:00
i915_pci.h
i915_perf.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
i915_perf.h
i915_perf_oa_regs.h
i915_perf_types.h
i915_pmu.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
i915_pmu.h
i915_priolist_types.h
i915_ptr_util.h drm/i915: split out i915_ptr_util.h 2025-09-12 11:08:45 +03:00
i915_pvinfo.h
i915_query.c drm: include drm_print.h where needed 2025-10-31 10:34:52 +02:00
i915_query.h
i915_reg.h drm/i915/dram: Add field ecc_impacting_de_bw 2025-11-06 18:23:18 -03:00
i915_reg_defs.h drm/i915/reg_defs: Add REG_FIELD_MAX wrapper for FIELD_MAX() 2025-09-25 18:38:19 +05:30
i915_request.c drm/i915: drop i915 param from i915_fence{, _context}_timeout() 2025-12-30 21:41:15 +02:00
i915_request.h drm/i915: split out i915_ptr_util.h 2025-09-12 11:08:45 +03:00
i915_scatterlist.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
i915_scatterlist.h
i915_scheduler.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
i915_scheduler.h
i915_scheduler_types.h
i915_selftest.h kernel.h: drop STACK_MAGIC macro 2026-01-31 16:16:04 -08:00
i915_sw_fence.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
i915_sw_fence.h
i915_sw_fence_work.c
i915_sw_fence_work.h
i915_switcheroo.c drm: include drm_print.h where needed 2025-10-31 10:34:52 +02:00
i915_switcheroo.h
i915_syncmap.c Convert 'alloc_flex' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
i915_syncmap.h
i915_sysfs.c drm: include drm_print.h where needed 2025-10-31 10:34:52 +02:00
i915_sysfs.h
i915_tasklet.h
i915_timer_util.c drm/i915: split out i915_timer_util.[ch] 2025-09-12 11:08:45 +03:00
i915_timer_util.h drm/i915: split out i915_timer_util.[ch] 2025-09-12 11:08:45 +03:00
i915_trace.h
i915_trace_points.c
i915_ttm_buddy_manager.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
i915_ttm_buddy_manager.h
i915_user_extensions.c
i915_user_extensions.h
i915_utils.c drm/i915: switch to use kernel standard error injection 2025-12-18 11:59:20 +02:00
i915_utils.h drm/i915/utils: drop unnecessary ifdefs 2025-12-30 21:41:17 +02:00
i915_vgpu.c drm: include drm_print.h where needed 2025-10-31 10:34:52 +02:00
i915_vgpu.h
i915_vma.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
i915_vma.h drm/i915: split out i915_ptr_util.h 2025-09-12 11:08:45 +03:00
i915_vma_resource.c
i915_vma_resource.h
i915_vma_types.h
i915_wait_util.h drm/i915: split out i915_wait_util.h 2025-09-12 11:08:45 +03:00
intel_clock_gating.c drm/i915: use struct drm_device for clock gating funcs 2025-11-25 16:32:10 +02:00
intel_clock_gating.h drm/i915: use struct drm_device for clock gating funcs 2025-11-25 16:32:10 +02:00
intel_cpu_info.c
intel_cpu_info.h
intel_device_info.c
intel_device_info.h
intel_gvt.c drm/i915/gvt: sort and group include directives 2026-01-02 12:17:24 +02:00
intel_gvt.h
intel_gvt_mmio_table.c drm/i915/gvt: sort and group include directives 2026-01-02 12:17:24 +02:00
intel_mchbar_regs.h drm/i915/dram: Fix ICL DIMM_S decoding 2025-11-19 18:55:57 +02:00
intel_memory_region.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
intel_memory_region.h drm/i915: Fix format string truncation warning 2025-12-09 15:53:12 +02:00
intel_pci_config.h
intel_pcode.c drm: include drm_print.h where needed 2025-10-31 10:34:52 +02:00
intel_pcode.h drm/i915/pcode: add struct drm_device based interface 2025-06-23 21:45:16 +03:00
intel_region_ttm.c drm/ttm: Replace multiple booleans with flags in device init 2025-10-31 09:14:35 +00:00
intel_region_ttm.h
intel_runtime_pm.c drm/i915/display: Runtime pm wrappers for display parent interface 2025-11-03 11:55:21 +02:00
intel_runtime_pm.h drm/i915/display: Runtime pm wrappers for display parent interface 2025-11-03 11:55:21 +02:00
intel_step.c drm: include drm_print.h where needed 2025-10-31 10:34:52 +02:00
intel_step.h
intel_uncore.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
intel_uncore.h drm/i915: move and rename reg_in_range_table 2025-10-16 15:20:56 -04:00
intel_uncore_trace.c
intel_uncore_trace.h
intel_wakeref.c drm/i915/wakeref: clean up INTEL_WAKEREF_PUT_* flag macros 2025-12-16 14:04:22 +02:00
intel_wakeref.h drm/i915/wakeref: clean up INTEL_WAKEREF_PUT_* flag macros 2025-12-16 14:04:22 +02:00
vlv_iosf_sb.c drm: include drm_print.h where needed 2025-10-31 10:34:52 +02:00
vlv_iosf_sb.h drm/i915: rename VLV IOSF SB ports parameter to unit_mask 2025-05-13 10:26:45 +03:00
vlv_iosf_sb_reg.h drm/i915: rename vlv_sideband*.[ch] to vlv_iosf_sb*.[ch] 2025-05-13 10:26:44 +03:00
vlv_suspend.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
vlv_suspend.h