Hi Tomi On 03/05/25 14:14, Tomi Valkeinen wrote: > On 02/05/2025 14:52, Devarsh Thakkar wrote:
>> Hi, >> >> <snip> >> Ok I see what you mean to say.....although functionally it is working >> fine but from readability point of view it is confusing since both >> functions use same argument name i.e hw_plane in two different contexts. >> In that case, I would propose to use hw_id as arg name for all >> dispc_k3_vid* functions, will that be okay ? > > I'd prefer to have all the dispc functions take the same kind of index. > Why? Even all dispc functions are not named with same prefix. 1) dispc_vid* functions act on VID* base directly and here plane indexing would be w.r.t which VID* base we are using e.g VID vs VIDL 2) dispc_k3_vid* functions act on common region bits which are related to VID pipelines and plane indexing would signify vid base w.r.t common register space i.e. COMMON_VID_IRQ0 vs COMMON_VID_IRQ1. As they both act on different register base and refer it in different contexts (VID* base vs COMMON_VID* base) and have also been named differently anyway, I feel it is okay and legitimate to use hw_id for dispc_k3_vid* functions (which would signify vid* indexing w.r.t common region) and hw_plane for dispc_vid* functions (which would signify vid* base w.r.t VID* regions mapped in device-tree). Regards Devarsh > Tomi >