-
Lucas De Marchi authored
In several places intel_register_access_init() is called with fd == -1 as argument, even if it's passing a certain pci_dev, as e.g. the one returned by intel_get_pci_device(). Those don't actually operate for the same device. The fd is used for taking the forcewake, however if fd == -1, then it always use <debugfs>/dri/0, which is not correct. intel_get_pci_device() may not be the right function to use, but this can be fixed later - for now it will at least use the same pci device for taking the forcewake. For intel_reg, Before: $ # with runtime pm already taken $ sudo ./build/tools/intel_reg read 0x2358 (0x00002358): 0x00000000 $ # without runtime pm $ sudo ./build/tools/intel_reg read 0x2358 (0x00002358): 0xffffffff After: $ sudo ./build/tools/intel_reg read 0x2358 (0x00002358): 0xc3945002 Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://lore.kernel.org/r/20240926041651.412396-4-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
f0ee2e62
Loading