mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-10 09:26:10 +00:00
lib/intel_mmio: Fix the fix
commit 16e44f5499e1754dfb10fc62b22675f5aa6ac781 Author: Daniel Vetter <daniel.vetter@ffwll.ch> Date: Wed Apr 3 00:22:41 2013 +0200 lib: fixup register access on gen2/3 THis fix was incorrect for a few reasons: 1. It didn't reflect the state in mmio_data.safe 2. It skipped forcewake on gen6+ which is both incorrect and unnecessary (for gen<6). 3. It had 2 goto done, the second of which was impossible to hit. Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
This commit is contained in:
parent
a08d62257d
commit
57bc7631e1
@ -191,18 +191,15 @@ intel_register_access_init(struct pci_device *pci_dev, int safe)
|
||||
if (mmio_data.inited)
|
||||
return -1;
|
||||
|
||||
if (intel_gen(pci_dev->device_id) >= 6)
|
||||
goto done;
|
||||
|
||||
mmio_data.safe = safe != 0 ? true : false;
|
||||
mmio_data.safe = (safe != 0 && pci_dev->device_id >= 4) ? true : false;
|
||||
mmio_data.i915_devid = pci_dev->device_id;
|
||||
if (mmio_data.safe && intel_gen(pci_dev->device_id) >= 4)
|
||||
if (mmio_data.safe)
|
||||
mmio_data.map = intel_get_register_map(mmio_data.i915_devid);
|
||||
|
||||
if (intel_gen(pci_dev->device_id) >= 6)
|
||||
goto done;
|
||||
|
||||
/* Find where the forcewake lock is */
|
||||
/* Find where the forcewake lock is. Forcewake doesn't exist
|
||||
* gen < 6, but the debugfs should do the right things for us.
|
||||
*/
|
||||
ret = find_debugfs_path("/sys/kernel/debug/dri");
|
||||
if (ret) {
|
||||
ret = find_debugfs_path("/debug/dri");
|
||||
|
Loading…
x
Reference in New Issue
Block a user