Skip to contentSkip to conversation

drm/cirrus: Use non-hybrid PCI devres API

PATCH Applied Philipp Stanner 3 participants 5 messages Apr 17, 2025 – May 9, 2025

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/cirrus: Use non-hybrid PCI devres API

cirrus enables its PCI device with pcim_enable_device(). This, implicitly, switches the function pci_request_regions() into managed mode, where it becomes a devres function.

The PCI subsystem wants to remove this hybrid nature from its interfaces. To do so, users of the aforementioned combination of functions must be ported to non-hybrid functions.

Replace the call to sometimes-managed pci_request_regions() with one to the always-managed pcim_request_all_regions().

---
 drivers/gpu/drm/tiny/cirrus-qemu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/tiny/cirrus-qemu.c +1 -1
index 52ec1e4ea9e5..1ff678e26aa1 100644
@@ -681,7 +681,7 @@ static int cirrus_pci_probe(struct pci_dev *pdev,
 	if (ret)
 		return ret;
 
-	ret = pci_request_regions(pdev, DRIVER_NAME);
+	ret = pcim_request_all_regions(pdev, DRIVER_NAME);
 	if (ret)
 		return ret;
 
Signature · 1 line
2.48.1
Reviewed-by on v1 1/1
#1 lore raw

Philipp Stanner <[email protected]> writes:

Hello Philipp,

Quoted 8 lines

cirrus enables its PCI device with pcim_enable_device(). This, implicitly, switches the function pci_request_regions() into managed mode, where it becomes a devres function.

The PCI subsystem wants to remove this hybrid nature from its interfaces. To do so, users of the aforementioned combination of functions must be ported to non-hybrid functions.

Quoted 5 lines

Replace the call to sometimes-managed pci_request_regions() with one to the always-managed pcim_request_all_regions().

---

Signature · 5 lines
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat
#2 lore raw
Quoted 13 lines · Javier Martinez Canillas

Philipp Stanner <[email protected]> writes:

Hello Philipp,

Quoted 9 lines

cirrus enables its PCI device with pcim_enable_device(). This, implicitly, switches the function pci_request_regions() into managed
mode, where it becomes a devres function.

The PCI subsystem wants to remove this hybrid nature from its interfaces. To do so, users of the aforementioned combination of functions must be ported to non-hybrid functions.

Quoted 9 lines
Quoted 6 lines

Replace the call to sometimes-managed pci_request_regions() with one to
the always-managed pcim_request_all_regions().

---

Who's in charge of applying this? Any objections with me just putting it into drm-misc-next?

P.

#3 lore raw

Philipp Stanner <[email protected]> writes:

Hello Philipp,

Quoted 18 lines · Javier Martinez Canillas
Quoted 17 lines

Philipp Stanner <[email protected]> writes:

Hello Philipp,

Quoted 13 lines

cirrus enables its PCI device with pcim_enable_device(). This, implicitly, switches the function pci_request_regions() into managed
mode, where it becomes a devres function.

The PCI subsystem wants to remove this hybrid nature from its interfaces. To do so, users of the aforementioned combination of functions must be ported to non-hybrid functions.

Replace the call to sometimes-managed pci_request_regions() with one to
the always-managed pcim_request_all_regions().

Quoted 9 lines
Quoted 5 lines
Quoted 2 lines

---

Who's in charge of applying this? Any objections with me just putting it into drm-misc-next?

Sure, go ahead.

Quoted 2 lines

P.

Signature · 5 lines
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat
#4 lore raw
Quoted 30 lines · Javier Martinez Canillas

Philipp Stanner <[email protected]> writes:

Hello Philipp,

Quoted 26 lines · Javier Martinez Canillas
Quoted 24 lines

Philipp Stanner <[email protected]> writes:

Hello Philipp,

Quoted 10 lines

cirrus enables its PCI device with pcim_enable_device(). This, implicitly, switches the function pci_request_regions() into managed
mode, where it becomes a devres function.

The PCI subsystem wants to remove this hybrid nature from its interfaces. To do so, users of the aforementioned combination of
functions must be ported to non-hybrid functions.

Quoted 7 lines

Replace the call to sometimes-managed pci_request_regions() with
one to
the always-managed pcim_request_all_regions().

---

Quoted 6 lines
Quoted 4 lines

Who's in charge of applying this? Any objections with me just putting
it into drm-misc-next?

Sure, go ahead.

Applied, thx

Quoted 4 lines
Quoted 3 lines

P.