mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dave Airlie <airlied@linux.ie>
To: Greg KH <gregkh@suse.de>
Cc: dtor_core@ameritech.net, Vojtech Pavlik <vojtech@suse.cz>,
	Kay Sievers <kay.sievers@vrfy.org>,
	linux-kernel@vger.kernel.org, Hannes Reinecke <hare@suse.de>,
	Patrick Mochel <mochel@digitalimplant.org>
Subject: Re: [RFC] subclasses in sysfs to solve world peace
Date: Sat, 17 Sep 2005 01:48:27 +0100 (IST)	[thread overview]
Message-ID: <Pine.LNX.4.58.0509170146170.18018@skynet> (raw)
In-Reply-To: <20050916215054.GC13920@suse.de>


> Nah, that's a mess.  I think the proposal I had would work for both
> input and block with a minimum of disruption.  Still don't know about
> video though, David said he would take some time this weekend to get me
> some feedback, which is good, as I have to get on a 14 hour plane ride
> soon...
>

Okay from my hazy memories at KS and previous attempts at implementing
this (Patrick might be able to find the piece of paper with the pretty
pictures :-):

For video we need to be able to bind a number of sub-drivers to a toplevel
driver but have them participate in the whole driver architecture
correctly.

I think we need to end up with something like:
	/sys/class/video_adapter
		- /radeon0
			/radeondrm0
			/radeonfb0
			/radeonsomethingIhaventthoughtabout0
		- /radeon1
			/radeondrm1
			/radeonfb1
			/radeonsomethingIhaven'tthoughtabout1
		- /mga0
			/mgadrm0
			/mgafb0
			/mgasomethingIhaventthoughtabout0

The lowlevel driver will be responsible for PCI handling for the card and
will have the list of PCI IDs to bind to, the higher level drivers need to
be dynamically inserted/removed and should be able to have instances of
themselves appear/disappear with hotplugging of the adapters.

My previous attempts at this led me to try to use a bus driver at the
radeon0 level and have my subdrivers appear on the "radeon" bus, also some
work done by Alan Cox on a vga class driver went the same direction, but
this got very unwieldly when I started to actually try and get it working.

To get the above scheme, something like a) start machine with one radeon
adapter, insert radeon_lowlevel module, it brings up
/sys/class/video_adapter/radeon0, insert radeondrm and radeonfb module
above it and you get the radeondrm0 and radeonfb0 subdrivers.
b) hotplug a second radeon, radeon1 appears with drm and fb drivers bound
to it as
well.
c) hotplug mga card, load the subdrivers and have it appear.

Hopefully there is enough info here to figure out if we can fit into your
propsed scheme, there may be an extra level in the sysfs hierarchy above
I'm not really sure, I'm not sure if it would end up as
/sys/class/video_adapter/video0/radeon0/radeondrm0 or
/sys/class/video_adapter/radeon/radeon0/radeondrm0

This is quite different that /sys/class/graphics stuff, it is more for the
lowlevel card drivers than the highlevel interfaces.

Regards,
Dave.

-- 
David Airlie, Software Engineer
http://www.skynet.ie/~airlied / airlied at skynet.ie
Linux kernel - DRI, VAX / pam_smb / ILUG


  parent reply	other threads:[~2005-09-17  0:48 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-16  0:20 Greg KH
2005-09-16  0:58 ` Dmitry Torokhov
2005-09-16  1:46   ` Kay Sievers
2005-09-16  1:58     ` Dmitry Torokhov
2005-09-16 21:54   ` Greg KH
2005-09-16  1:04 ` Kay Sievers
2005-09-16  1:23   ` Dmitry Torokhov
2005-09-16  1:54     ` Kay Sievers
2005-09-16  2:03       ` Dmitry Torokhov
2005-09-16  2:14         ` Kay Sievers
2005-09-16  2:36           ` Dmitry Torokhov
2005-09-16  2:43             ` Kay Sievers
2005-09-16  3:10               ` Dmitry Torokhov
2005-09-16  7:21               ` Dmitry Torokhov
2005-09-16 21:48                 ` Greg KH
2005-09-16 22:55                   ` Dmitry Torokhov
2005-09-16  8:02     ` Vojtech Pavlik
2005-09-16 15:44       ` Dmitry Torokhov
2005-09-16 21:50         ` Greg KH
2005-09-16 22:56           ` Dmitry Torokhov
2005-09-17  0:48           ` Dave Airlie [this message]
2005-09-16 21:49     ` Greg KH
2005-09-16  7:59   ` Vojtech Pavlik
2005-09-16 21:55   ` Greg KH
2005-09-16 22:45     ` Dmitry Torokhov
2005-09-17  0:20 ` Antonino A. Daplas
2005-09-16  1:45 David Lang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.58.0509170146170.18018@skynet \
    --to=airlied@linux.ie \
    --cc=dtor_core@ameritech.net \
    --cc=gregkh@suse.de \
    --cc=hare@suse.de \
    --cc=kay.sievers@vrfy.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mochel@digitalimplant.org \
    --cc=vojtech@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®