Skip to contentSkip to conversation

drm/bochs: downgrade pci_request_region failure from error to warning

PATCH Superseded Gerd Hoffmann 2 participants 3 messages Feb 7, 2020

Subsystems (3)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 drm/bochs: downgrade pci_request_region failure from error to warning

Shutdown of firmware framebuffer has a bunch of problems. Because of this the framebuffer region might still be reserved even after drm_fb_helper_remove_conflicting_pci_framebuffers() returned.

Don't consider pci_request_region() failure for the framebuffer region as fatal error to workaround this issue.

---
 drivers/gpu/drm/bochs/bochs_hw.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/bochs/bochs_hw.c +1 -2
index b615b7dfdd9d..a387efa9e559 100644
@@ -157,8 +157,7 @@ int bochs_hw_init(struct drm_device *dev)
 	}
 
 	if (pci_request_region(pdev, 0, "bochs-drm") != 0) {
-		DRM_ERROR("Cannot request framebuffer\n");
-		return -EBUSY;
+		DRM_WARN("Cannot request framebuffer, boot framebuffer still active?\n");
 	}
 
 	bochs->fb_map = ioremap(addr, size);
Signature · 1 line
2.18.1
#1 lore raw

Hi

Am 07.02.20 um 12:57 schrieb Gerd Hoffmann:

Quoted 3 lines

Shutdown of firmware framebuffer has a bunch of problems. Because of this the framebuffer region might still be reserved even after drm_fb_helper_remove_conflicting_pci_framebuffers() returned.

Out of curiosity: what's going wrong here?

Best regards
Thomas

Quoted 25 lines

Don't consider pci_request_region() failure for the framebuffer region as fatal error to workaround this issue.

---
 drivers/gpu/drm/bochs/bochs_hw.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/bochs/bochs_hw.c +1 -2
index b615b7dfdd9d..a387efa9e559 100644
@@ -157,8 +157,7 @@ int bochs_hw_init(struct drm_device *dev)
 	}
 
 	if (pci_request_region(pdev, 0, "bochs-drm") != 0) {
-		DRM_ERROR("Cannot request framebuffer\n");
-		return -EBUSY;
+		DRM_WARN("Cannot request framebuffer, boot framebuffer still active?\n");
 	}
 
 	bochs->fb_map = ioremap(addr, size);
Signature · 6 lines
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer
#2 lore raw
Quoted 8 lines · Thomas Zimmermann

Hi

Am 07.02.20 um 12:57 schrieb Gerd Hoffmann:

Quoted 3 lines

Shutdown of firmware framebuffer has a bunch of problems. Because of this the framebuffer region might still be reserved even after drm_fb_helper_remove_conflicting_pci_framebuffers() returned.

Out of curiosity: what's going wrong here?

Very short version: userspace keeping /dev/fb0 open delays firmware framebuffer deinit.

Long version by Daniel Vetter:
https://www.spinics.net/lists/linux-fbdev/msg28178.html

cheers,
Gerd