diff options
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/gsp_phys_gpu.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/kernel/gsp_phys_gpu.c b/kernel/gsp_phys_gpu.c index 0936cf4..a507793 100644 --- a/kernel/gsp_phys_gpu.c +++ b/kernel/gsp_phys_gpu.c @@ -369,13 +369,17 @@ static int gsp_phys_probe(struct pci_dev *pdev, const struct pci_device_id *id) phys.enabled = true; /* - * Read-only observability for the host->GPU DMA path: the previous - * driver's remove clears PCI_COMMAND_MASTER and this probe does not - * set it (no pci_set_master here on purpose yet), so any GPU-initiated - * sysmem DMA (the FWSEC generic-BL code/data fetch) would never - * complete. Log the command register at claim so the state is - * provable from the cycle log. + * The bootloader fetches its code/data over host-sysmem DMA before + * FWSEC runs, so the claimed GPU needs bus-master. The previous + * driver's remove path clears PCI_COMMAND_MASTER through + * pci_disable_device(), and pci_enable_device() alone does not + * restore it; without master the first bootloader DMA never + * completes. Set it and log the resulting command register at claim + * so the state is provable from the cycle log. The probe error path + * and remove both go through gsp_phys_unmap(), whose + * pci_disable_device() clears master again. */ + pci_set_master(pdev); pci_read_config_word(pdev, PCI_COMMAND, &pci_cmd); pr_info("gsp-phys: claim PCI_COMMAND=0x%04x [bus_master=%s mem=%s io=%s] dev->is_busmaster=%u\n", pci_cmd, pci_cmd & PCI_COMMAND_MASTER ? "on" : "OFF", |
