drm/bochs: downgrade pci_request_region failure from error to warning
Subsystems (3)
PATCH v3 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 | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/gpu/drm/bochs/bochs_hw.c +2 -4
@@ -157,10 +157,8 @@ int bochs_hw_init(struct drm_device *dev) size =min (size, mem); } -if (pci_request_region (pdev,0 ,"bochs-drm" ) !=0 ) { -DRM_ERROR ("Cannot request framebuffer\n" ); -return -EBUSY ; - } +if (pci_request_region (pdev,0 ,"bochs-drm" ) !=0 ) +DRM_WARN ("Cannot request framebuffer, boot fb still active?\n" ); bochs->fb_map =ioremap (addr, size);if (bochs->fb_map ==NULL ) {
Signature · 1 line
2.18.2
Hi Gred.
drivers/gpu/drm/bochs/bochs_hw.c int bochs_hw_init(struct drm_device *dev)
Quoted 18 lines · Gerd Hoffmann
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.Reported-by Marek Marczykowski-Górecki <[email protected]>Signed-off-by Gerd Hoffmann <[email protected]>--- drivers/gpu/drm/bochs/bochs_hw.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)drivers/gpu/drm/bochs/bochs_hw.c +0
-0@@ -157,10 +157,8 @@ int bochs_hw_init(struct drm_device *dev)
There is a drm_device avilable.
drivers/gpu/drm/bochs/bochs_hw.c int bochs_hw_init(struct drm_device *dev) · line 161
Quoted 9 lines
drivers/gpu/drm/bochs/bochs_hw.c +2
-4size =min (size, mem); } -if (pci_request_region (pdev,0 ,"bochs-drm" ) !=0 ) { -DRM_ERROR ("Cannot request framebuffer\n" ); -return -EBUSY ; - } +if (pci_request_region (pdev,0 ,"bochs-drm" ) !=0 ) +DRM_WARN ("Cannot request framebuffer, boot fb still active?\n" );
So you could use drm_WARN() which is what is preferred these days. With this fixed:
Sam
Hi,
Quoted 3 lines
drivers/gpu/drm/bochs/bochs_hw.c int bochs_hw_init(struct drm_device *dev) · line 161
Quoted 2 lines
drivers/gpu/drm/bochs/bochs_hw.c +2
-0+if (pci_request_region (pdev,0 ,"bochs-drm" ) !=0 ) +DRM_WARN ("Cannot request framebuffer, boot fb still active?\n" );So you could use
drm_WARN()which is what is preferred these days.
Nope, this isn't yet in -fixes.
cheers,
Gerd
Quoted 7 lines · Gerd Hoffmann
Hi,
Quoted 3 lines
drivers/gpu/drm/bochs/bochs_hw.c int bochs_hw_init(struct drm_device *dev) · line 161
Quoted 2 lines
drivers/gpu/drm/bochs/bochs_hw.c +2
-0+if (pci_request_region (pdev,0 ,"bochs-drm" ) !=0 ) +DRM_WARN ("Cannot request framebuffer, boot fb still active?\n" );So you could use
drm_WARN()which is what is preferred these days.Nope, this isn't yet in -fixes.
Ups, did not see this was for -fixes.
My ack stands without ths change then.
Sam
Quoted 3 lines · Gerd Hoffmann
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.
Is that still the fbdev lifetime fun where the cleanup might be delayed if the char device node is still open?
-Daniel
Quoted 30 lines
Don't consider
pci_request_region()failure for the framebuffer region as fatal error to workaround this issue.Reported-by Marek Marczykowski-Górecki <[email protected]>Signed-off-by Gerd Hoffmann <[email protected]>--- drivers/gpu/drm/bochs/bochs_hw.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)drivers/gpu/drm/bochs/bochs_hw.c +2
-4@@ -157,10 +157,8 @@ int bochs_hw_init(struct drm_device *dev) size =min (size, mem); } -if (pci_request_region (pdev,0 ,"bochs-drm" ) !=0 ) { -DRM_ERROR ("Cannot request framebuffer\n" ); -return -EBUSY ; - } +if (pci_request_region (pdev,0 ,"bochs-drm" ) !=0 ) +DRM_WARN ("Cannot request framebuffer, boot fb still active?\n" ); bochs->fb_map =ioremap (addr, size);if (bochs->fb_map ==NULL ) {Signature · 1 line
2.18.2
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch
Quoted 7 lines · Daniel Vetter
Quoted 3 lines · Gerd Hoffmann
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.Is that still the fbdev lifetime fun where the cleanup might be delayed if the char device node is still open?
Yes.
cheers,
Gerd
Daniel Vetter
Reviewed-byQuoted 11 lines · Gerd Hoffmann
Quoted 7 lines · Daniel Vetter
Quoted 3 lines · Gerd Hoffmann
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.Is that still the fbdev lifetime fun where the cleanup might be delayed if the char device node is still open?
Yes.
In that case I think a FIXME comment that this should be upgraded again to a full error once fbdev unloading is fixed should be added. With that:
I guess you might want a cc: stable on this too?
-Daniel
Quoted 8 lines
cheers,
Gerd_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch