diff options
author | Danilo Krummrich <dakr@redhat.com> | 2024-05-17 22:08:55 +0200 |
---|---|---|
committer | Danilo Krummrich <dakr@kernel.org> | 2024-08-13 16:17:25 +0200 |
commit | 904585b12c778822d5d26a9e5e753381a8092f03 (patch) | |
tree | a8b90f11f0740a374474eb7c302970425cc8af8b | |
parent | 20c2b0351ede60391b8147a076edba3308d1fbf4 (diff) |
nova: fw: copy firmware to vmalloc buffer
Signed-off-by: Danilo Krummrich <dakr@redhat.com>
-rw-r--r-- | drivers/gpu/drm/nova/gpu.rs | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/gpu/drm/nova/gpu.rs b/drivers/gpu/drm/nova/gpu.rs index d2cc45b6b636..f3dc126b0b12 100644 --- a/drivers/gpu/drm/nova/gpu.rs +++ b/drivers/gpu/drm/nova/gpu.rs @@ -1,7 +1,8 @@ // SPDX-License-Identifier: GPL-2.0 use kernel::{ - device, devres::Devres, error::code::*, firmware, fmt, pci, prelude::*, str::CString, sync::Arc, + alloc::flags::*, device, devres::Devres, error::code::*, firmware, fmt, pci, prelude::*, + str::CString, sync::Arc, }; use crate::driver::Bar0; @@ -52,9 +53,9 @@ pub(crate) struct GpuSpec { /// Structure encapsulating the firmware blobs required for the GPU to operate. #[allow(dead_code)] pub(crate) struct Firmware { - booter_load: firmware::Firmware, - booter_unload: firmware::Firmware, - gsp: firmware::Firmware, + booter_load: VVec<u8>, + booter_unload: VVec<u8>, + gsp: VVec<u8>, } /// Structure holding the resources required to operate the GPU. @@ -149,9 +150,9 @@ impl Firmware { let gsp = firmware::Firmware::request(&fw_gsp_path, dev)?; Ok(Firmware { - booter_load, - booter_unload, - gsp, + booter_load: booter_load.copy(GFP_KERNEL)?, + booter_unload: booter_unload.copy(GFP_KERNEL)?, + gsp: gsp.copy(GFP_KERNEL)?, }) } } |