linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [Bugme-new] [Bug 12712] New: s2disk hangs with nvidiafb
@ 2009-02-22 10:47 Sergei S.
       [not found] ` <20090222150504.a77dc9b3.krzysztof.h1@poczta.fm>
  0 siblings, 1 reply; 8+ messages in thread
From: Sergei S. @ 2009-02-22 10:47 UTC (permalink / raw)
  To: Krzysztof Helt; +Cc: Andrew Morton, linux-fbdev-devel, bugme-daemon

Hello.

By the way.

[drivers/video/vesafb.c
static int __init vesafb_probe(struct platform_device *dev)]

	if (!request_mem_region(vesafb_fix.smem_start, size_total, "vesafb")) {
		printk(KERN_WARNING
		       "vesafb: cannot reserve video memory at 0x%lx\n",
			vesafb_fix.smem_start);
		/* We cannot make this fatal. Sometimes this comes from magic
		   spaces our resource handlers simply don't know about */
	}

Is there any reason not to make vesafb request_mem_region fail fatal?

In case we already have framebuffer at 0xc0000000 and framebuffer_alloc failed -
we'll release non-vesafb memory region.

	info = framebuffer_alloc(sizeof(u32) * 256, &dev->dev);
	if (!info) {
		release_mem_region(vesafb_fix.smem_start, size_total);
		return -ENOMEM;
	}


So, what do you think about the idea to check num_registered_fb when request_mem_region 
fails?
----------------------------------------------------
...а теперь оплатить широкополосный доступ
в сеть »нтернет ByFly можно электронными деньгами EasyPay.
http://www.easypay.by/

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Linux-fbdev-devel mailing list
Linux-fbdev-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-fbdev-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread
* Re: [Bugme-new] [Bug 12712] New: s2disk hangs with nvidiafb
@ 2009-02-21 23:23 Sergei S.
  0 siblings, 0 replies; 8+ messages in thread
From: Sergei S. @ 2009-02-21 23:23 UTC (permalink / raw)
  To: Krzysztof Helt; +Cc: Andrew Morton, linux-fbdev-devel, bugme-daemon

Mon, 16 Feb 2009 20:59:47 +0100
   Krzysztof Helt <krzysztof.h1@poczta.fm> wrote:

> Interesting, you have two framebuffers running on a single card. Does the s2disk
> works for you if you select nvidiafb and turn off vesa framebuffer?
>

Hello.

Let's see dmesg:
[    1.502011] nvidiafb: CRTC 0 is currently programmed for DFP
[    1.502022] nvidiafb: Using DFP on CRTC 0
[    1.502031] nvidiafb: Panel size is 1280 x 800
[    1.502040] nvidiafb: Panel is LVDS
[    1.505580] nvidiafb: MTRR set to ON
[    1.505599] fbcvt: 1280x800@60: CVT Name - 1.024MA-R
[    1.505856] fbcon: NV1d (fb0) is primary device
[    1.657379] nvidiafb: Flat panel dithering disabled
[    1.658735] Console: switching to colour frame buffer device 160x50
[    1.659929] nvidiafb: PCI nVidia NV1d framebuffer (64MB @ 0xC0000000)
[    1.660099] vesafb: cannot reserve video memory at 0xc0000000
[    1.660386] vesafb: framebuffer at 0xc0000000, mapped to 0xfd180000, using 6144k, 
total 131072k
[    1.660419] vesafb: mode is 1024x768x32, linelength=4096, pages=1
[    1.660445] vesafb: protected mode interface info at c000:d5d0
[    1.660471] vesafb: pmi: set display start = c00cd606, set palette = c00cd670
[    1.660498] vesafb: pmi: ports = 3b4 3b5 3ba 3c0 3c1 3c4 3c5 3c6 3c7 3c8 3c9 3cc 3ce 
3cf 3d0 3d1 3d2 3d3 3d4 3d5 3da
[    1.660714] vesafb: scrolling: redraw
[    1.660734] vesafb: Truecolor: size=8:8:8:8, shift=24:16:8:0
[    1.660825] fb1: VESA VGA frame buffer device


The problem ("two framebuffers running on a single card") is at drivers/video/vesafb.c

static int __init vesafb_probe(struct platform_device *dev)


vesafb ignores allocation failure at 0xc0000000.

	if (!request_mem_region(vesafb_fix.smem_start, size_total, "vesafb")) {
		printk(KERN_WARNING
		       "vesafb: cannot reserve video memory at 0x%lx\n",
			vesafb_fix.smem_start);
		/* We cannot make this fatal. Sometimes this comes from magic
		   spaces our resource handlers simply don't know about */
	}


So, my proposal is something like this:

	if (!request_mem_region(vesafb_fix.smem_start, size_total, "vesafb")) {
		printk(KERN_WARNING
		       "vesafb: cannot reserve video memory at 0x%lx\n",
			vesafb_fix.smem_start);
		/* We cannot make this fatal. Sometimes this comes from magic
		   spaces our resource handlers simply don't know about */

/*NOTE : discuss*/
		if(num_registered_fb) {
			printk(KERN_ERR
				"vesafb: abort, cannot reserve video memory at 0x%lx. registered framebuffers count 
%d\n",
				vesafb_fix.smem_start, num_registered_fb);
			return -EBUSY;
		}
	}

num_registered_fb is declared in fbmem.c

Is that acceptable solution?

I can't make all tests, since I have PC with single video card.

2.6.29-rc5-git3

dmesg with vesafb and nvidiafb:
[    1.492009] nvidiafb: CRTC 0 is currently programmed for DFP
[    1.492020] nvidiafb: Using DFP on CRTC 0
[    1.492029] nvidiafb: Panel size is 1280 x 800
[    1.492038] nvidiafb: Panel is LVDS
[    1.495566] nvidiafb: MTRR set to ON
[    1.495585] fbcvt: 1280x800@60: CVT Name - 1.024MA-R
[    1.495838] fbcon: NV1d (fb0) is primary device
[    1.647295] nvidiafb: Flat panel dithering disabled
[    1.648649] Console: switching to colour frame buffer device 160x50
[    1.649847] nvidiafb: PCI nVidia NV1d framebuffer (64MB @ 0xC0000000)
[    1.650028] vesafb: cannot reserve video memory at 0xc0000000
[    1.650054] vesafb: abort, cannot reserve video memory at 0xc0000000. registered 
framebuffers count 1
[    1.650092] vesafb: probe of vesafb.0 failed with error -16


s2disk still fails (it works OK without nvidiafb).
System just hangs before switching to console.
I'll try to figure out.


dmesg with vesafb only:
[    0.769928] vesafb: framebuffer at 0xc0000000, mapped to 0xf8080000, using 6144k, 
total 131072k
[    0.769946] vesafb: mode is 1024x768x32, linelength=4096, pages=1
[    0.769957] vesafb: protected mode interface info at c000:d5d0
[    0.769968] vesafb: pmi: set display start = c00cd606, set palette = c00cd670
[    0.769980] vesafb: pmi: ports = 3b4 3b5 3ba 3c0 3c1 3c4 3c5 3c6 3c7 3c8 3c9 3cc 3ce 
3cf 3d0 3d1 3d2 3d3 3d4 3d5 3da
[    0.770013] vesafb: scrolling: redraw
[    0.770021] vesafb: Truecolor: size=8:8:8:8, shift=24:16:8:0
[    0.829735] Console: switching to colour frame buffer device 128x48
[    0.889953] fb0: VESA VGA frame buffer device

s2disk - OK.

Best regards,
Sergey
----------------------------------------------------
...а теперь оплатить широкополосный доступ
в сеть »нтернет ByFly можно электронными деньгами EasyPay.
http://www.easypay.by/

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Linux-fbdev-devel mailing list
Linux-fbdev-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-fbdev-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread
[parent not found: <bug-12712-10286@http.bugzilla.kernel.org/>]

end of thread, other threads:[~2009-02-27  7:54 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-22 10:47 [Bugme-new] [Bug 12712] New: s2disk hangs with nvidiafb Sergei S.
     [not found] ` <20090222150504.a77dc9b3.krzysztof.h1@poczta.fm>
2009-02-23  8:24   ` Bender aka Sergei S.
2009-02-27  7:55   ` Bender aka Sergei S.
  -- strict thread matches above, loose matches on Subject: below --
2009-02-21 23:23 Sergei S.
     [not found] <bug-12712-10286@http.bugzilla.kernel.org/>
2009-02-15 19:17 ` Andrew Morton
2009-02-15 21:11   ` Sergei S.
2009-02-16 19:59     ` Krzysztof Helt
2009-02-16 22:56       ` Sergei S.

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).