summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2023-11-29 18:01:52 +1000
committerDave Airlie <airlied@redhat.com>2023-11-30 08:42:17 +1000
commit9696f9149166e192dd9a47c1ffca26ece2bd6ef5 (patch)
tree09f45916b71ff569155d2b2af1bac899540e06eb
parent430460341cc22bc4b6a37ebbf031edbf6595f8c8 (diff)
nova: load a firmware and print it's size
-rw-r--r--drivers/gpu/drm/nova/nova_drv.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nova/nova_drv.rs b/drivers/gpu/drm/nova/nova_drv.rs
index 510692ea43d7..e9314cdfb289 100644
--- a/drivers/gpu/drm/nova/nova_drv.rs
+++ b/drivers/gpu/drm/nova/nova_drv.rs
@@ -15,6 +15,7 @@ use kernel::{
device::{self, Device, RawDevice},
dma, driver,
error::code::*,
+ firmware::{Firmware},
io_mem::IoMem,
new_mutex, new_spinlock, pci,
pci::define_pci_id_table,
@@ -60,6 +61,12 @@ impl pci::Driver for NovaDevice {
0x190 => pr_info!("AD100"),
_ => return Err(ENODEV)
}
+
+ let mut fw = Firmware::new();
+ match fw.request(c_str!("nvidia/ad102/gsp/booter_load-535.113.01.bin"), _dev) {
+ Err(e) => return Err(e),
+ Ok(()) => pr_info!("loaded fw: {} ", fw.size())
+ }
Ok(())
}