1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/gpu/drm/i915/gt
John Harrison 11ce8fd8fd drm/i915/uc: Fix two issues with over-size firmware files
In the case where a firmware file is too large (e.g. someone
downloaded a web page ASCII dump from github...), the firmware object
is released but the pointer is not zerod. If no other firmware file
was found then release would be called again leading to a double kfree.

Also, the size check was only being applied to the initial firmware
load not any of the subsequent attempts. So move the check into a
wrapper that is used for all loads.

Fixes: 016241168d ("drm/i915/uc: use different ggtt pin offsets for uc loads")
Signed-off-by: John Harrison <John.C.Harrison@Intel.com>
Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Alan Previn <alan.previn.teres.alexis@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Matt Roper <matthew.d.roper@intel.com>
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Matthew Auld <matthew.auld@intel.com>
Cc: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221221193031.687266-4-John.C.Harrison@Intel.com
(cherry picked from commit 4071d98b29)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2022-12-30 03:04:45 -05:00
..
selftests
shaders drm/i915: Include asm sources for {ivb, hsw}_clear_kernel.c 2020-06-29 11:29:12 +03:00
uc drm/i915/uc: Fix two issues with over-size firmware files 2022-12-30 03:04:45 -05:00
gen2_engine_cs.c drm/i915: Only include i915_reg.h from .c files 2022-02-02 07:59:54 -08:00
gen2_engine_cs.h drm/i915/gt: Split low level gen2-7 CS emitters 2020-06-02 10:42:00 +01:00
gen6_engine_cs.c drm/i915/gt: Move engine registers to their own header 2022-01-11 14:03:25 -08:00
gen6_engine_cs.h drm/i915/gt: Split low level gen2-7 CS emitters 2020-06-02 10:42:00 +01:00
gen6_ppgtt.c drm/i915/gt: Use i915_vm_put on ppgtt_create error paths 2022-09-27 11:05:33 +01:00
gen6_ppgtt.h drm/i915: Create a dummy object for gen6 ppgtt 2021-11-19 17:38:03 +00:00
gen6_renderstate.c drm/i915/gt: SPDX cleanup 2021-03-24 19:30:34 +01:00
gen7_renderclear.c drm/i915: Move GT registers to their own header file 2022-02-02 07:59:14 -08:00
gen7_renderclear.h
gen7_renderstate.c drm/i915/gt: SPDX cleanup 2021-03-24 19:30:34 +01:00
gen8_engine_cs.c drm/i915/gt: Fix platform prefix 2022-10-03 07:15:11 -07:00
gen8_engine_cs.h drm/i915/gt: Fix platform prefix 2022-10-03 07:15:11 -07:00
gen8_ppgtt.c drm/i915: enable PS64 support for DG2 2022-10-14 18:08:04 +01:00
gen8_ppgtt.h drm/i915: Reduce the number of objects subject to memcpy recover 2021-09-24 08:19:16 +02:00
gen8_renderstate.c drm/i915/gt: SPDX cleanup 2021-03-24 19:30:34 +01:00
gen9_renderstate.c drm/i915/gt: SPDX cleanup 2021-03-24 19:30:34 +01:00
hsw_clear_kernel.c
intel_breadcrumbs.c drm/i915/gt: Only kick the signal worker if there's been an update 2022-07-12 17:44:43 -04:00
intel_breadcrumbs.h drm/i915/guc: Direct all breadcrumbs for a class to single breadcrumbs 2021-07-27 17:31:35 -07:00
intel_breadcrumbs_types.h drm/i915/guc: Direct all breadcrumbs for a class to single breadcrumbs 2021-07-27 17:31:35 -07:00
intel_context.c drm/i915/guc: Fix revocation of non-persistent contexts 2022-10-10 08:48:48 +01:00
intel_context.h drm/i915/guc: Delay disabling guc_id scheduling for better hysteresis 2022-10-26 17:29:43 -07:00
intel_context_param.h drm/i915/gem: Set the watchdog timeout directly in intel_context_set_gem (v2) 2021-07-08 19:43:49 +02:00
intel_context_sseu.c drm/i915/lrc: move lrc_get_runtime() to intel_lrc.c 2022-02-17 15:42:09 +02:00
intel_context_types.h drm/i915/guc: Remove intel_context:number_committed_requests counter 2022-10-26 17:29:47 -07:00
intel_engine.h drm/i915/guc: Limit scheduling properties to avoid overflow 2022-10-24 12:11:59 -07:00
intel_engine_cs.c GVT Changes: 2022-11-23 09:15:44 +10:00
intel_engine_heartbeat.c drm/i915: Make the heartbeat play nice with long pre-emption timeouts 2022-10-24 12:12:36 -07:00
intel_engine_heartbeat.h drm/i915: Reset GPU immediately if submission is disabled 2021-07-27 17:31:45 -07:00
intel_engine_pm.c drm/i915: Add ww ctx to i915_gem_object_trylock 2021-12-21 13:27:29 +01:00
intel_engine_pm.h drm/i915/guc: Take engine PM when a context is pinned with GuC submission 2021-10-15 10:37:26 -07:00
intel_engine_regs.h drm/i915/perf: Fix noa wait predication for DG2 2022-10-27 12:35:59 -07:00
intel_engine_stats.h drm/i915/pmu: Add a name to the execlists stats 2021-10-28 11:02:18 -07:00
intel_engine_types.h drm/i915/mtl: add initial definitions for GSC CS 2022-11-07 11:03:35 -08:00
intel_engine_user.c drm/i915/mtl: don't expose GSC command streamer to the user 2022-11-07 11:03:57 -08:00
intel_engine_user.h drm/i915/gt: SPDX cleanup 2021-03-24 19:30:34 +01:00
intel_execlists_submission.c drm for 6.2: 2022-12-13 11:59:58 -08:00
intel_execlists_submission.h drm/i915/guc: GuC virtual engines 2021-07-27 17:31:28 -07:00
intel_ggtt.c drm/i915/mtl: Handle wopcm per-GT and limit calculations. 2022-11-14 10:11:47 -08:00
intel_ggtt_fencing.c drm/i915: Partial abandonment of legacy DRM logging macros 2022-11-10 12:35:46 +00:00
intel_ggtt_fencing.h drm/i915/gt: SPDX cleanup 2021-03-24 19:30:34 +01:00
intel_ggtt_gmch.c drm/i915/gt: Re-do the intel-gtt split 2022-06-22 15:52:56 -07:00
intel_ggtt_gmch.h drm/i915/gt: Re-do the intel-gtt split 2022-06-22 15:52:56 -07:00
intel_gpu_commands.h drm/i915/perf: Determine gen12 oa ctx offset at runtime 2022-10-27 12:36:13 -07:00
intel_gsc.c drm/i915/huc: track delayed HuC load with a fence 2022-10-03 11:29:17 -07:00
intel_gsc.h drm/i915/gsc: allocate extended operational memory in LMEM 2022-09-12 15:23:11 +03:00
intel_gt.c drm/i915: fix TLB invalidation for Gen12.50 video and compute engines 2022-12-30 03:04:32 -05:00
intel_gt.h drm/i915/mtl: PERF_LIMIT_REASONS changes for MTL 2022-09-16 11:40:08 -04:00
intel_gt_buffer_pool.c drm/i915: split out i915_gem_internal.h from i915_drv.h 2022-02-11 12:52:50 +02:00
intel_gt_buffer_pool.h drm/i915: Defer pin calls in buffer pool until first use by caller. 2021-03-24 17:27:20 +01:00
intel_gt_buffer_pool_types.h Merge tag 'drm-intel-gt-next-2021-04-06' of git://anongit.freedesktop.org/drm/drm-intel into drm-next 2021-04-08 12:46:12 +10:00
intel_gt_clock_utils.c drm/i915: Fix cs timestamp frequency for cl/bw 2022-11-02 08:53:59 +02:00
intel_gt_clock_utils.h drm/i915/gt: Consolidate the CS timestamp clocks 2020-12-23 21:10:41 +00:00
intel_gt_debugfs.c drm/i915/gt: Cleanup interface for MCR operations 2022-06-17 08:05:40 -07:00
intel_gt_debugfs.h drm/i915/debugfs: Do not return '0' if there is nothing to return 2022-03-22 10:08:20 +00:00
intel_gt_engines_debugfs.c drm/i915: rename debugfs_engines files 2021-09-18 23:33:22 -07:00
intel_gt_engines_debugfs.h drm/i915: rename debugfs_engines files 2021-09-18 23:33:22 -07:00
intel_gt_irq.c drm/i915/guc: handle interrupts from media GuC 2022-11-14 10:11:47 -08:00
intel_gt_irq.h drm/i915/gt: Move CS interrupt handler to the backend 2021-05-25 15:14:40 +02:00
intel_gt_mcr.c drm/i915/gt: Correct kerneldoc for intel_gt_mcr_wait_for_reg() 2022-12-09 14:59:46 -05:00
intel_gt_mcr.h drm/i915/gt: Manage uncore->lock while waiting on MCR register 2022-11-23 11:37:51 -05:00
intel_gt_pm.c GVT Changes: 2022-11-23 09:15:44 +10:00
intel_gt_pm.h drm/i915/gt: Ignore TLB invalidations on idle engines 2022-08-08 13:14:47 -04:00
intel_gt_pm_debugfs.c drm/i915/mtl: C6 residency and C state type for MTL SAMedia 2022-11-17 10:47:12 -05:00
intel_gt_pm_debugfs.h drm/i915/debugfs: Do not return '0' if there is nothing to return 2022-03-22 10:08:20 +00:00
intel_gt_pm_irq.c drm/i915/mtl: Use primary GT's irq lock for media GT 2022-09-12 15:23:12 +03:00
intel_gt_pm_irq.h drm/i915/gt: SPDX cleanup 2021-03-24 19:30:34 +01:00
intel_gt_regs.h GVT Changes: 2022-11-23 09:15:44 +10:00
intel_gt_requests.c drm/i915: Never return 0 if not all requests retired 2022-11-29 12:30:10 -05:00
intel_gt_requests.h drm/i915: use linux/stddef.h due to "isystem: trim/fixup stdarg.h and other headers" 2021-09-06 09:31:23 +02:00
intel_gt_sysfs.c drm/i915: Fix CFI violations in gt_sysfs 2022-10-27 19:14:53 +02:00
intel_gt_sysfs.h drm/i915: Fix CFI violations in gt_sysfs 2022-10-27 19:14:53 +02:00
intel_gt_sysfs_pm.c drm/i915/gt: Use RC6 residency types as arguments to residency functions 2022-11-17 10:46:58 -05:00
intel_gt_sysfs_pm.h drm/i915/gt: Create per-tile RC6 sysfs interface 2022-03-21 08:37:42 +00:00
intel_gt_types.h drm/i915/mtl: Handle wopcm per-GT and limit calculations. 2022-11-14 10:11:47 -08:00
intel_gtt.c Merge drm/drm-next into drm-intel-next 2022-11-14 14:32:34 -05:00
intel_gtt.h drm/i915/xehp: Create separate reg definitions for new MCR registers 2022-10-17 10:12:54 -07:00
intel_hwconfig.h drm/i915/guc: Add fetch of hwconfig blob 2022-03-17 19:51:48 -07:00
intel_llc.c drm/i915/slpc: Let's fix the PCODE min freq table setup for SLPC 2022-09-06 14:51:43 -04:00
intel_llc.h drm/i915/gt: SPDX cleanup 2021-03-24 19:30:34 +01:00
intel_llc_types.h drm/i915/gt: SPDX cleanup 2021-03-24 19:30:34 +01:00
intel_lrc.c drm/i915/gt: Document function to decode register state context 2022-10-03 07:14:46 -07:00
intel_lrc.h drm/i915/perf: Fix OA filtering logic for GuC mode 2022-10-27 12:35:56 -07:00
intel_lrc_reg.h drm/i915/gt: Move engine registers to their own header 2022-01-11 14:03:25 -08:00
intel_migrate.c drm/i915/migrate: fix corner case in CCS aux copying 2022-12-14 12:56:55 -05:00
intel_migrate.h drm/i915: Avoid using the i915_fence_array when collecting dependencies 2021-12-22 08:14:30 +01:00
intel_migrate_types.h drm/i915/gt: Pipelined page migration 2021-06-17 14:23:05 +01:00
intel_mocs.c drm/i915/gt: Always use MCR functions on multicast registers 2022-10-17 10:15:47 -07:00
intel_mocs.h drm/i915/gt: Add "intel_" as prefix in set_mocs_index() 2021-09-20 08:23:27 -07:00
intel_ppgtt.c Merge drm/drm-next into drm-intel-next 2022-08-29 15:14:59 +03:00
intel_rc6.c drm/i915/mtl: C6 residency and C state type for MTL SAMedia 2022-11-17 10:47:12 -05:00
intel_rc6.h drm/i915/gt: Use RC6 residency types as arguments to residency functions 2022-11-17 10:46:58 -05:00
intel_rc6_types.h drm/i915/gt: Use RC6 residency types as arguments to residency functions 2022-11-17 10:46:58 -05:00
intel_region_lmem.c Merge drm/drm-next into drm-intel-next 2022-08-29 15:14:59 +03:00
intel_region_lmem.h drm/i915: Kill the fake lmem support 2022-02-18 22:31:46 -08:00
intel_renderstate.c drm/i915: call i915_request_await_object from _i915_vma_move_to_active 2022-11-16 09:27:26 +00:00
intel_renderstate.h drm/i915: Break out dma_resv ww locking utilities to separate files 2021-06-17 14:22:59 +01:00
intel_reset.c drm/i915/guc: Don't deadlock busyness stats vs reset 2022-11-04 13:45:45 -07:00
intel_reset.h drm/i915/guc: Don't deadlock busyness stats vs reset 2022-11-04 13:45:45 -07:00
intel_reset_types.h drm/i915/gt: Remove repeated words from comments 2021-03-24 19:30:35 +01:00
intel_ring.c drm/i915: remove single-use GEM_DEBUG_EXEC() 2022-05-09 14:16:29 +03:00
intel_ring.h drm/i915/gt: Pipelined page migration 2021-06-17 14:23:05 +01:00
intel_ring_submission.c drm/i915: stop including i915_irq.h from i915_trace.h 2022-11-11 13:05:19 +02:00
intel_ring_types.h drm/i915/gt: SPDX cleanup 2021-03-24 19:30:34 +01:00
intel_rps.c drm/i915/mtl: Modify CAGF functions for MTL 2022-11-17 10:46:37 -05:00
intel_rps.h drm/i915: Use GEN12_RPSTAT register for GT freq 2022-11-17 10:46:29 -05:00
intel_rps_types.h drm/i915/rps: Centralize computation of freq caps 2022-04-07 18:55:08 +05:30
intel_sa_media.c drm/i915/mtl: Hook up interrupts for standalone media 2022-09-12 15:23:12 +03:00
intel_sa_media.h drm/i915/xelpmp: Expose media as another GT 2022-09-12 15:23:12 +03:00
intel_sseu.c drm/i915/perf: Move gt-specific data from i915->perf to gt->perf 2022-10-27 12:36:30 -07:00
intel_sseu.h drm/i915/pvc: Add SSEU changes 2022-06-02 07:21:09 -07:00
intel_sseu_debugfs.c drm/i915/sseu: Disassociate internal subslice mask representation from uapi 2022-06-02 07:20:59 -07:00
intel_sseu_debugfs.h drm/i915: Move sseu debugfs under gt/ 2020-07-08 21:40:15 +01:00
intel_timeline.c drm/i915: don't include drm_cache.h in i915_drv.h 2022-02-14 13:19:37 +02:00
intel_timeline.h Merge tag 'drm-intel-gt-next-2021-04-06' of git://anongit.freedesktop.org/drm/drm-intel into drm-next 2021-04-08 12:46:12 +10:00
intel_timeline_types.h Merge tag 'drm-intel-gt-next-2021-04-06' of git://anongit.freedesktop.org/drm/drm-intel into drm-next 2021-04-08 12:46:12 +10:00
intel_wopcm.c drm/i915/mtl: Handle wopcm per-GT and limit calculations. 2022-11-14 10:11:47 -08:00
intel_wopcm.h drm/i915/mtl: Handle wopcm per-GT and limit calculations. 2022-11-14 10:11:47 -08:00
intel_workarounds.c drm/i915: Fix workarounds on Gen2-3 2022-11-23 11:37:55 -05:00
intel_workarounds.h drm/i915: Make wa list per-gt 2021-09-20 08:06:36 -07:00
intel_workarounds_types.h drm/i915: Partial abandonment of legacy DRM logging macros 2022-11-10 12:35:46 +00:00
ivb_clear_kernel.c
mock_engine.c drm/i915: Add ww ctx to i915_gem_object_trylock 2021-12-21 13:27:29 +01:00
mock_engine.h drm/i915/gt: SPDX cleanup 2021-03-24 19:30:34 +01:00
selftest_context.c drm/i915/gt: Use to_gt() helper 2021-12-17 21:50:06 -08:00
selftest_engine.c drm/i915/gt: Use to_gt() helper 2021-12-17 21:50:06 -08:00
selftest_engine.h drm/i915/gt: SPDX cleanup 2021-03-24 19:30:34 +01:00
selftest_engine_cs.c drm/i915/selftests: Run the perf MI_BB tests on gen4/5 2022-11-02 08:55:56 +02:00
selftest_engine_heartbeat.c drm/i915/gt: Use to_gt() helper 2021-12-17 21:50:06 -08:00
selftest_engine_heartbeat.h drm/i915/selftest: Fix hangcheck self test for GuC submission 2021-07-27 17:32:23 -07:00
selftest_engine_pm.c drm/i915/selftest: Bump up sample period for busy stats selftest 2022-11-23 11:46:51 -05:00
selftest_execlists.c drm/i915: call i915_request_await_object from _i915_vma_move_to_active 2022-11-16 09:27:26 +00:00
selftest_gt_pm.c drm/i915/selftests: Test RING_TIMESTAMP on gen4/5 2022-11-02 08:54:59 +02:00
selftest_hangcheck.c drm/i915/selftests: add igt_vma_move_to_active_unlocked 2022-11-16 09:27:32 +00:00
selftest_llc.c drm/i915/pcode: Extend pcode functions for multiple gt's 2022-05-20 09:11:27 +01:00
selftest_llc.h drm/i915/gt: SPDX cleanup 2021-03-24 19:30:34 +01:00
selftest_lrc.c drm/i915/selftests: add igt_vma_move_to_active_unlocked 2022-11-16 09:27:32 +00:00
selftest_migrate.c drm/i915: move i915_coherent_map_type() to i915_gem_pages.c and un-inline 2022-09-26 12:21:08 +03:00
selftest_mocs.c drm/i915/selftests: add igt_vma_move_to_active_unlocked 2022-11-16 09:27:32 +00:00
selftest_rc6.c drm/i915/gt: Use RC6 residency types as arguments to residency functions 2022-11-17 10:46:58 -05:00
selftest_rc6.h drm/i915/gt: SPDX cleanup 2021-03-24 19:30:34 +01:00
selftest_reset.c drm/i915/gt: Use to_gt() helper for GGTT accesses 2022-01-05 10:33:44 -08:00
selftest_ring.c drm/i915/gt: Incrementally check for rewinding 2020-06-16 11:34:23 +03:00
selftest_ring_submission.c drm/i915/gt: Use to_gt() helper 2021-12-17 21:50:06 -08:00
selftest_rps.c drm/i915: call i915_request_await_object from _i915_vma_move_to_active 2022-11-16 09:27:26 +00:00
selftest_rps.h drm/i915/gt: Fix up clock frequency 2020-04-27 17:34:33 +01:00
selftest_slpc.c drm/i915/guc/slpc: Add selftest for slpc tile-tile interaction 2022-11-11 20:18:33 +05:30
selftest_timeline.c drm/i915: Use str_yes_no() 2022-03-02 08:48:13 -08:00
selftest_workarounds.c drm/i915: call i915_request_await_object from _i915_vma_move_to_active 2022-11-16 09:27:26 +00:00
shmem_utils.c drm/i915/gt: Add helper for shmem copy to iosys_map 2022-02-25 15:23:18 -08:00
shmem_utils.h drm/i915/gt: Add helper for shmem copy to iosys_map 2022-02-25 15:23:18 -08:00
st_shmem_utils.c drm/i915/gt: Keep a no-frills swappable copy of the default context state 2020-04-29 19:02:37 +01:00
sysfs_engines.c drm/i915/guc: Limit scheduling properties to avoid overflow 2022-10-24 12:11:59 -07:00
sysfs_engines.h