On 2013-11-27 12:54, Thierry Reding wrote: >> I am not sure about hardwiring devices to virtual channels. >> There could be devices which uses more than one virtual channel, >> in fact exynos-drm docs suggests that such hardware exists. > > In that case, why not make them two logically separate devices within > the kernel. We need the channel number so that the device can be > addressed in the first place, so I don't see what's wrong with using > that number in the device's name. > > The whole point of this patch is to add MIPI DSI bus infrastructure, and > the virtual channel is one of the fundamental aspects of that bus, so I > think we need to make it an integral part of the implementation. (I speak here more in the context of OMAP display subsystem and CDF, and this might not be totally applicable to DRM). In my opinion, DSI shouldn't be though of in the same way as other buses. In most of the cases, there's just one DSI peripheral connected. This peripheral may answer to multiple DSI VC IDs, though. I don't like the idea of having to split one device driver into multiple drivers, just to manage multiple DSI VC IDs. In some rare cases (I've never seen one in production) there may be a DSI hub, and one or two DSI peripherals behind it. But the hub is not really a hub, but a router, and the router requires configuration. The case here is not really one DSI bus with two or more peripherals, but two or more independent 1-to-1 DSI buses. I have never seen a pure hub, i.e. something that would just forward/broadcast the DSI packet to two or more DSI peripherals. So I think we should consider DSI as a one-to-one link, and let the DSI peripheral manage the VC IDs as it wants. I don't see any benefit in trying to create a similar linux bus for DSI as we have for, say, i2c or spi. >> I can also imagine scenarios when dynamic virtual channel (re-)association >> can be useful and DSI specs are not against it AFAIK. > > How is that going to work? There's no hotplug support or similar in DSI, > so why would anyone want to reassign virtual channels. > > Supposing even that we wanted to support this eventually, I think a more > appropriate solution would be to completely remove the device and add a > new one, because that also takes care of keeping the channel number > embedded within the struct mipi_dsi_device up to date. > >> reg property means device is at fixed virtual channel. >> DSI specs says nothing about it IMHO. > > Without that fixed virtual channel number we can't use the device in the > first place. How are you going to address the device if you don't know > its virtual channel? The DSI peripheral driver must know the VC IDs. Often they are hardcoded values, and they can be defined in the driver code. I don't see why the DSI host driver would need to know the VC IDs, as it can't really do anything independently with the peripheral anyway. All the transactions should be started by the DSI peripheral driver. Tomi
Attachment:
signature.asc
Description: OpenPGP digital signature
_______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/dri-devel