[PATCH v4 64/80] drm/omap: dsi: cleanup channel usages

Tomi Valkeinen tomi.valkeinen at ti.com
Tue Dec 1 11:23:06 UTC 2020


On 01/12/2020 02:17, Laurent Pinchart wrote:
> Hi Tomi,
> 
> Thank you for the patch.
> 
> On Tue, Nov 24, 2020 at 02:45:22PM +0200, Tomi Valkeinen wrote:
>> The "channel" usage in omap dsi driver is super confusing. We have three
>> different "channels":
>>
>> 1) DSI virtual channel ID. This is a number from 0 to 3, included in the
>> packet payload.
>>
>> 2) VC. This is a register block in the DSI IP. There are four of those
>> blocks. A VC is a DSI "pipeline", with defined fifo settings, data
>> source (cpu or dispc), and some other settings. It has no relation to
>> the 1).
> 
> Lovely that it's called VC :-)

Yes. There are 4 VC blocks. My guess is that initially the HW designers meant that one HW VC block
is used for one DSI channel (DSI supports 4 channels). But at least I cannot see how the HW could be
used that way.

>> 3) dispc channel. It's the "pipeline" number dispc uses to send pixel
>> data.
>>
>> To clean this up use the following names for each of the above: 1)
>> "channel" 2) "vc" 3) "dispc_channel"
> 
> 1) and 2) will still be prone to confusion :-S Would it help to name 2)
> hw_vc or something similar ?

The omap dsi driver uses "vc" and "channel" consistently after this patch, and afaics in the DRM
framework it's always "channel". So I kind of agree with you but I hope this is enough. Otherwise
I'll spend lots of hours solving the conflicts after rename... Well, a new rename patch could be
done later on top if needed.

>> This patch is mostly about renaming things, but as in some places 1) and
>> 2) have gotten mixed up, additional changes were needed to untangle
>> them. This is mostly just adding a new parameter to some functions so
>> that we pass both the vc and the channel.
> 
> It would ease review if this could be split in two patches.

Ok. I'll see if I can split this up without a huge amount of work. They are a bit tangled up... But
I agree, this is a bit too big patch.

 Tomi

-- 
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki


More information about the dri-devel mailing list