Bug 27502 - modeset=1 causes fallback to software rendering on RV350 (PowerBook G4)
Summary: modeset=1 causes fallback to software rendering on RV350 (PowerBook G4)
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/r300 (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-06 17:30 UTC by Jeremy Huddleston Sequoia
Modified: 2010-04-07 15:13 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
modeset=0, dmesg (27.85 KB, patch)
2010-04-06 17:30 UTC, Jeremy Huddleston Sequoia
Details | Splinter Review
modeset=0, Xorg.0.log (55.15 KB, text/plain)
2010-04-06 17:30 UTC, Jeremy Huddleston Sequoia
Details
modeset=1, dmesg (27.32 KB, text/plain)
2010-04-06 17:31 UTC, Jeremy Huddleston Sequoia
Details
modeset=1, Xorg.0.log (54.19 KB, text/plain)
2010-04-06 17:31 UTC, Jeremy Huddleston Sequoia
Details
2.6.33.2,radeon,no_radeonfb dmesg (34.77 KB, text/plain)
2010-04-06 19:27 UTC, Jeremy Huddleston Sequoia
Details
2.6.33.2,radeon,no_radeonfb Xorg.0.log (28.79 KB, text/plain)
2010-04-06 19:29 UTC, Jeremy Huddleston Sequoia
Details

Description Jeremy Huddleston Sequoia 2010-04-06 17:30:32 UTC
Created attachment 34736 [details] [review]
modeset=0, dmesg

I have a PowerBook G4 with an RV350

0000:00:10.0 VGA compatible controller: ATI Technologies Inc RV350 [Mobility Radeon 9600 M10]
	Subsystem: ATI Technologies Inc RV350 [Mobility Radeon 9600 M10]
	Flags: bus master, 66MHz, medium devsel, latency 255, IRQ 48
	Memory at b8000000 (32-bit, prefetchable) [size=128M]
	I/O ports at 0400 [size=256]
	Memory at b0000000 (32-bit, non-prefetchable) [size=64K]
	Expansion ROM at b0020000 [size=128K]
	Capabilities: [58] AGP version 2.0
	Capabilities: [50] Power Management version 2
	Kernel driver in use: radeonfb
	Kernel modules: radeon


When loading the radeon kernel module with modeset=1, /dev/dri/card0 is not created, and we fall back on swrast.

When loading the radeon kernel module with modeset=0, /dev/dri/card0 is created, and we have HW rendering
Comment 1 Jeremy Huddleston Sequoia 2010-04-06 17:30:55 UTC
Created attachment 34737 [details]
modeset=0, Xorg.0.log
Comment 2 Jeremy Huddleston Sequoia 2010-04-06 17:31:19 UTC
Created attachment 34738 [details]
modeset=1, dmesg
Comment 3 Jeremy Huddleston Sequoia 2010-04-06 17:31:39 UTC
Created attachment 34739 [details]
modeset=1, Xorg.0.log
Comment 4 Jeremy Huddleston Sequoia 2010-04-06 17:32:15 UTC
This is with the latest 2.3.32 ubuntu kernels as well as vanilla 2.3.32.11
Comment 5 Alex Deucher 2010-04-06 17:36:40 UTC
The drm is failing to load when kms is enabled likely due to radeonfb claiming the device.  try blacklisting radeonfb.
Comment 6 Jeremy Huddleston Sequoia 2010-04-06 18:03:42 UTC
Based on Michael's comments, it looks like radeonfb and radeon can live side-by-side, and radeonfb is needed for console access:

http://lists.x.org/archives/xorg-devel/2009-May/000814.html

I'd rather not blacklist radeonfb and loose console.

Does the KMS support in 2.6.32's radeon driver allow console access without radeonfb, and if so, is there anything special I need to do to use it?
Comment 7 Alex Deucher 2010-04-06 18:10:31 UTC
(In reply to comment #6)
> Based on Michael's comments, it looks like radeonfb and radeon can live
> side-by-side, and radeonfb is needed for console access:
> 
> http://lists.x.org/archives/xorg-devel/2009-May/000814.html

before KMS, the drm coexisted with kernel fb driver since it didn't provide an fb interface itself.  Now the drm is a real driver.

> 
> I'd rather not blacklist radeonfb and loose console.
> 
> Does the KMS support in 2.6.32's radeon driver allow console access without
> radeonfb, and if so, is there anything special I need to do to use it?

The drm provides a kernel fb interface for the console just like radeonfb.  So it's a replacement for radeonfb and then some.
Comment 8 Alex Deucher 2010-04-06 18:12:56 UTC
Although make sure your radeon drm is built with kms support.  It was in staging until 2.6.33, so you have to enable staging drivers to use it.
Comment 9 Alex Deucher 2010-04-06 18:14:45 UTC
Thinking about it more, I suspect you don't have a kms enabled drm, but the drm is failing to load since you've passed the module an invalid option (modeset, which is invalid if your drm doesn't have kms support).
Comment 10 Jeremy Huddleston Sequoia 2010-04-06 18:32:12 UTC
(In reply to comment #9)
> Thinking about it more, I suspect you don't have a kms enabled drm, but the drm
> is failing to load since you've passed the module an invalid option (modeset,
> which is invalid if your drm doesn't have kms support).

No, that isn't the case because it works successfully when I give it the option modeset=0

Also modinfo reports:

parm:           no_wb:Disable AGP writeback for scratch registers (int)
parm:           modeset:Disable/Enable modesetting (int)
parm:           dynclks:Disable/Enable dynamic clocks (int)
parm:           r4xx_atom:Enable ATOMBIOS modesetting for R4xx (int)
parm:           vramlimit:Restrict VRAM for testing (int)
parm:           agpmode:AGP Mode (-1 == PCI) (int)
parm:           gartsize:Size of PCIE/IGP gart to setup in megabytes (32,64, etc)
 (int)
parm:           benchmark:Run benchmark (int)
parm:           test:Run tests (int)
parm:           connector_table:Force connector table (int)
parm:           tv:TV enable (0 = disable) (int)
parm:           new_pll:Select new PLL code for AVIVO chips (int)
parm:           audio:Audio enable (0 = disable) (int)
Comment 11 Jeremy Huddleston Sequoia 2010-04-06 18:33:15 UTC
And I do have staging enabled:

CONFIG_STAGING=y
CONFIG_STAGING_EXCLUDE_BUILD=y
Comment 12 Alex Deucher 2010-04-06 18:46:30 UTC
(In reply to comment #10)
> No, that isn't the case because it works successfully when I give it the option
> modeset=0
>

Ah right.  It's probably radeonfb then.
Comment 13 Jeremy Huddleston Sequoia 2010-04-06 19:27:32 UTC
Created attachment 34745 [details]
2.6.33.2,radeon,no_radeonfb dmesg
Comment 14 Jeremy Huddleston Sequoia 2010-04-06 19:29:27 UTC
Created attachment 34746 [details]
2.6.33.2,radeon,no_radeonfb Xorg.0.log
Comment 15 Jeremy Huddleston Sequoia 2010-04-06 19:29:56 UTC
Ok, I built 2.6.33.2 without radeonfb and enabled KMS on the radeon drm driver.  lspci -v reports:

0000:00:10.0 VGA compatible controller: ATI Technologies Inc RV350 [Mobility Radeon 9600 M10]
	Subsystem: ATI Technologies Inc RV350 [Mobility Radeon 9600 M10]
	Flags: bus master, 66MHz, medium devsel, latency 255, IRQ 48
	Memory at b8000000 (32-bit, prefetchable) [size=128M]
	I/O ports at 0400 [size=256]
	Memory at b0000000 (32-bit, non-prefetchable) [size=64K]
	Expansion ROM at b0020000 [disabled] [size=128K]
	Capabilities: [58] AGP version 2.0
	Capabilities: [50] Power Management version 2
	Kernel driver in use: radeon

The fb mode is completely garbage.  I waited long enough, and eventually X loaded, but I could not read any of the garbled output on the display in console mode.

/dev/dri is present:

root@aerith:~# ls -l /dev/dri*
total 0
crw-rw----+ 1 root video 226,  0 2010-04-06 19:19 card0
crw-rw----  1 root video 226, 64 2010-04-06 19:19 controlD64

but glxinfo shows swrast being used
Comment 16 Jeremy Huddleston Sequoia 2010-04-06 19:31:20 UTC
[    0.392633] platform radeon_cp.0: firmware: requesting radeon/R300_cp.bin
[   60.398776] radeon_cp: Failed to load firmware "radeon/R300_cp.bin"
[   60.411715] radeon 0000:00:10.0: failled initializing CP (-2).
[   60.418207] radeon 0000:00:10.0: Disabling GPU acceleration
Comment 17 Jeremy Huddleston Sequoia 2010-04-06 19:33:36 UTC
# sha1sum /lib/firmware/radeon/R300_cp.bin 
76925e062bc2c06b23ead294bf3fdaedc4a10bdf  /lib/firmware/radeon/R300_cp.bin

# dpkg -S /lib/firmware/radeon/R300_cp.bin 
linux-firmware: /lib/firmware/radeon/R300_cp.bin

# aptitude show linux-firmware
Package: linux-firmware
State: installed
Automatically installed: no
Version: 1.33
Priority: optional
Section: misc
Maintainer: Ubuntu Kernel Team <kernel-team@lists.ubuntu.com>
Uncompressed Size: 16.1M
Conflicts: atmel-firmware
Replaces: atmel-firmware, linux-restricted-common
Provides: atmel-firmware
Description: Firmware for Linux kernel drivers
 This package provides firmware used by Linux kernel drivers.
Comment 18 Pauli 2010-04-06 23:54:14 UTC
> --- Comment #16 from Jeremy Huddleston <jeremyhu@freedesktop.org> 2010-04-06 19:31:20 PDT ---
> [    0.392633] platform radeon_cp.0: firmware: requesting radeon/R300_cp.bin
> [   60.398776] radeon_cp: Failed to load firmware "radeon/R300_cp.bin"
> [   60.411715] radeon 0000:00:10.0: failled initializing CP (-2).
> [   60.418207] radeon 0000:00:10.0: Disabling GPU acceleration

If drm & co modules are in initrd you need the firmware in initrd too.
Updating the initrd should be enough.

If you compiled modules into kernel then you need the firmware in kernel too.
Comment 19 Jeremy Huddleston Sequoia 2010-04-07 15:13:12 UTC
alright.  thanks.  it now reports the hw rendering... although it does not work.  I'll followup in other bugs for cleanliness


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.