[PATCH v2 5/5] nova-core: test configuration routine.

Zhi Wang posted 5 patches 3 months, 3 weeks ago
[PATCH v2 5/5] nova-core: test configuration routine.
Posted by Zhi Wang 3 months, 3 weeks ago
Signed-off-by: Zhi Wang <zhiw@nvidia.com>
---
 drivers/gpu/nova-core/driver.rs | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/nova-core/driver.rs b/drivers/gpu/nova-core/driver.rs
index edc72052e27a..48538aa72dfd 100644
--- a/drivers/gpu/nova-core/driver.rs
+++ b/drivers/gpu/nova-core/driver.rs
@@ -67,6 +67,10 @@ fn probe(pdev: &pci::Device<Core>, _info: &Self::IdInfo) -> Result<Pin<KBox<Self
         let bar_clone = Arc::clone(&devres_bar);
         let bar = bar_clone.access(pdev.as_ref())?;
 
+        let config = pdev.config_space()?;
+
+        dev_info!(pdev.as_ref(), "Nova Core GPU driver read pci {:x}.\n", config.read16(0));
+
         let this = KBox::pin_init(
             try_pin_init!(Self {
                 gpu <- Gpu::new(pdev, devres_bar, bar),
-- 
2.47.3
Re: [PATCH v2 5/5] nova-core: test configuration routine.
Posted by Zhi Wang 3 months, 3 weeks ago
On Thu, 16 Oct 2025 21:02:50 +0000
Zhi Wang <zhiw@nvidia.com> wrote:

Hi guys:

To avoid misunderstanding, this is just meant for folks to test, not for
merging. I will drop this one in the next re-spin.

Z.

> Signed-off-by: Zhi Wang <zhiw@nvidia.com>
> ---
>  drivers/gpu/nova-core/driver.rs | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/gpu/nova-core/driver.rs
> b/drivers/gpu/nova-core/driver.rs index edc72052e27a..48538aa72dfd
> 100644 --- a/drivers/gpu/nova-core/driver.rs
> +++ b/drivers/gpu/nova-core/driver.rs
> @@ -67,6 +67,10 @@ fn probe(pdev: &pci::Device<Core>, _info:
> &Self::IdInfo) -> Result<Pin<KBox<Self let bar_clone =
> Arc::clone(&devres_bar); let bar = bar_clone.access(pdev.as_ref())?;
>  
> +        let config = pdev.config_space()?;
> +
> +        dev_info!(pdev.as_ref(), "Nova Core GPU driver read pci
> {:x}.\n", config.read16(0)); +
>          let this = KBox::pin_init(
>              try_pin_init!(Self {
>                  gpu <- Gpu::new(pdev, devres_bar, bar),
Re: [PATCH v2 5/5] nova-core: test configuration routine.
Posted by Danilo Krummrich 3 months, 3 weeks ago
On Fri Oct 17, 2025 at 6:55 AM CEST, Zhi Wang wrote:
> On Thu, 16 Oct 2025 21:02:50 +0000
> Zhi Wang <zhiw@nvidia.com> wrote:
>
> Hi guys:
>
> To avoid misunderstanding, this is just meant for folks to test, not for
> merging. I will drop this one in the next re-spin.

I suggest adding it to samples/rust/rust_driver_pci.rs instead. :)