Re: Add a "enable" sysfs attribute to the pci devices to allow userspace (Xorg) to enable devices without doing foul direct access

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 5/2/06, Arjan van de Ven <[email protected]> wrote:
> An alternate way to fix this problem is to write a device driver that
> attaches to hardware with PCI class VGA.

and then that sucks too because in linux only 1 driver can bind to a device,
AND you're limited to only vga devices.


There are many other ways to solve this problem. There are two rules
that need to be followed.
1) One driver per device
2) Stop mucking with hardware without having a driver loaded.

There are many other solutions to this problem that follow the Linux
driver model. For example build skeleton fbdev drivers for all of the
VGA device PCI IDs (they are enumerated in the X code). These drivers
can just be empty fbdev drivers, the fbdev core will supply the
open/enable logic. DRM already knows how to coordinate with fbdev so
that there aren't multiple drivers binding to the hardware.

You could do the generic VGA class binding after all of the other
drivers are loaded. And only bind to the free devices.

We could modify the driver system to allow a PCI class binding and a
device specific binding. The device specific binding would override
the class binding.

All of these have been proposed before. In my opinion an 'enable'
attribute is the worst solution in the bunch.

--
Jon Smirl
[email protected]
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux