Linux only allows one device driver to attach to a device like the
radeon. Right now this driver is radeonfb. When DRM loads it uses the
radeon hardware without attaching to it and informing the kernel. What
DRM is doing is not compatible with hotplug. DRM enables the
framebuffer without reserving it's PCI address. Since the kernel
doesn't know about this a hotplug device can get assigned an address
on top of the framebuffer. That would cause a hardware conflict and
probably result in a reboot.

My solution to this is to make radeon DRM depend on radeonfb. radeonfb
properly attaches to the device and marks everything in use. I chose
this method because Xegl wants radeonfb loaded and this scheme has
minimal code impact.

The attached patch is against the current 2.6 kernel source. After
applying it loading radeon will also cause radeonfb to be loaded. Note
that loading radeonfb does not activate fbconsole. You have to also
load the fbconsole module for that. radeonfb should just sit passively
in memory and not effect your normal VGA console or DRM. If you are
are non-x86 the patch doesn't really do much since you already had
radeonfb loaded.

[EMAIL PROTECTED] linux-merge]# lsmod
Module                  Size  Used by
radeonfb               86720  0
i2c_algo_bit            8200  1 radeonfb
cfbcopyarea             3840  1 radeonfb
radeon                 73088  1 radeonfb
drm                    56084  1 radeon
cfbimgblt               2944  1 radeonfb
cfbfillrect             3712  1 radeonfb
softcursor              1920  1 radeonfb
fb                     36136  2 radeonfb,softcursor

The patch also contains some demo code showing how radeon DRM can
remove some duplicated code and use the version in radeonfb.

Can everyone please try this patch out and see if loading radeonfb
causes any problems on your system. Having radeonfb loaded on x86 is
not a normal case. Radeon Xegl is going to depend on having both
radeon and radeonfb loaded so I need to know if this will cause
problems.

For a quicker check you can just do modprobe radeonfb from a console
(not a xterm). That will load the current radonfb driver but it will
also blank your console font. The blank is from a problem in radeonfb
that is fixed in the patch. Type /sbin/setsysfont and the font will be
restored and you can then check for any other issues.

-- 
Jon Smirl
[EMAIL PROTECTED]

Attachment: patch1
Description: Binary data

Reply via email to