On Mon, Dec 09, 2013 at 05:05:20PM +0200, Tomi Valkeinen wrote: > On 2013-12-09 15:10, Thierry Reding wrote: [...] > > But even if you have a tree of one-to-one links, you still need some way > > to address the individual nodes in the tree. The VC ID is the only way > > by which you can address a node. I don't see how you can possible send > > packets to more than one node if you keep sending packets to the same > > address. Where does the missing information magically come from? > > From the DSI hub. > > In the example case below, let's say the DSI panel 1 driver is told to > send a configuration packet to the panel. The panel driver would call a > dsi_transmit op, giving as arguments the VC number 0, and the packet data. > > That call would go to the DSI hub driver. It knows how it routes the > packets (the routing configuration is either hardcoded or passed via DT > data), and then calls dsi_transmit op on SoC DSI, with VC number 2 and > the packet data.
So it is the DSI hub driver that translates VC 0 to VC 2? How does it know that VC 0 should be VC 2 but not VC 3? Does the panel 2 driver pass in a different VC as panel 1? > >> For the sake of discussion, let's consider a simple DSI hub setup: > >> > >> SoC DSI -> DSI Hub -> DSI panel 1 > >> -> DSI panel 2 > >> > >> The hub would use, say VC0 for hub configuration, and it'd route VC2 to > >> panel 1 and VC3 to panel2. Both panels would use VC0, so the hub would > >> translate the VC ID accordingly. > >> > >> How would you represent this in Linux? > > > > You keep saying that devices use various VC IDs (VC0 for hub config, VC2 > > and VC3 for panels 1 and 2 in this case). But those are exactly the > > addresses. You've got to have some way within the kernel to store those. > > > > Given the limited address space of DSI there's no way to accurately > > represent the hierarchy of the above in the bus/device numbering. But > > that doesn't mean you can't assign addresses (VC IDs) to the devices. In > > fact you've given examples yourself. > > Yes, but I guess the difference in our views is that I see the VC IDs as > "link local" and routing is done by the hubs as they see fit. In other > words, if I'm not mistaken, you'd have a Linux DSI bus with three > devices in the bus, each having its own VC ID, whereas I'd have a DSI > "link" between the SoC and the hub, without any general information > about the VC IDs used, and two additional DSI links, from the DSI hub to > each panel. It's really the same thing. If you define VC IDs in a link local manner you don't need them at all. What's the point in having them if you can only reach a single device anyway.