Re: [PATCH v4 3/3] drm/tidss: Add OLDI bridge support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On 18/03/25 19:05, Sverdlin, Alexander wrote:
> Hi Aradhya!
> 
> On Sun, 2024-11-24 at 20:06 +0530, Aradhya Bhatia wrote:
>> From: Aradhya Bhatia <a-bhatia1@xxxxxx>
>>
>> The AM62x and AM62Px SoCs feature 2 OLDI TXes each, which makes it
>> possible to connect them in dual-link or cloned single-link OLDI display
>> modes. The current OLDI support in tidss_dispc.c can only support for
>> a single OLDI TX, connected to a VP and doesn't really support
>> configuration of OLDIs in the other modes. The current OLDI support in
>> tidss_dispc.c also works on the principle that the OLDI output can only
>> be served by one, and only one, DSS video-port. This isn't the case in
>> the AM62Px SoC, where there are 2 DSS controllers present that share the
>> OLDI TXes.
>>
>> Having their own devicetree and their own bridge entity will help
>> support the various display modes and sharing possiblilities of the OLDI
>> hardware.
>>
>> For all these reasons, add support for the OLDI TXes as DRM bridges.
> 
> ...
> 
>> +int tidss_oldi_init(struct tidss_device *tidss)
>> +{
>> +	struct tidss_oldi *oldi;
>> +	struct device_node *child;
>> +	struct drm_bridge *bridge;
>> +	u32 parent_vp, oldi_instance, companion_instance;
>> +	enum tidss_oldi_link_type link_type = OLDI_MODE_UNSUPPORTED;
>> +	struct device_node *oldi_parent;
>> +	int ret = 0;
>> +
>> +	tidss->num_oldis = 0;
>> +
>> +	oldi_parent = of_get_child_by_name(tidss->dev->of_node, "oldi-transmitters");
>> +	if (!oldi_parent)
>> +		/* Return gracefully */
>> +		return 0;
>> +
>> +	for_each_child_of_node(oldi_parent, child) {
> 
> Would for_each_available_child_of_node() make sense here so that
> k3-am62-main.dtsi would have both ports with status = "disabled" and
> the users will enable one or another?
> 

Thank you for the suggestion!

for_each_available_child_of_node() does seem to be the better option.
I will send another revision.


-- 
Regards
Aradhya





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux