How to enable Six overlays in Xavier ?

I am trying to enable six overlays in Xavier like Jetson TX2 using below commands :-

sudo -s

cd /sys/class/graphics/fb0

echo 4 > blank

echo 0x0 > device/win_mask

echo 0x3f > device/win_mask

echo 0 > blank

But not able to enable six overlays.
I also find a way to enable six overlay via changing “win-mask=<0x3f>” in tegra194-p2822-disp.dtsi DTB file.
So, I want to know how to enable overlays in Xavier by using sysfs entry or Is DTB file change is the only option to enable overlays ?
I also seen 2 extra framebuffer node in Xavier, How I can use those /dev/fb1 and /dev/fb2 please suggest any reference for that.

Thanks

I would expect that you could use the additional framebuffers by plugging displays into the USB-C connetors, and then running X windows displays on those nodes.
(The X server may automatically open displays for those nodes when they’re connected; I have not tried this)

Hi,
Please, anyone, respond to my primary Query “How to enable Six overlays in Xavier?”. This query is very important for my further software development.

Thanks

Sorry for late reply. I am checking if the debug node has something wrong.

Is the win-mask in DT working fine?

BTW, did you remember to set win_mask to 0 for other 2 fb?

Yes WayneWWW, I am able to access all Six overlays after DTB modification but when I am trying using sysfs not able to succeed.

When I am trying “echo 0x3f > device/win_mask” then observed error like:-
bash: echo: write error: Invalid argument

and dmesg says:-
[ 122.870220] tegradc 15200000.nvdisplay: win[2] already on fb1
I am not able to understand why this is happening when trying to enable overlays using sysfs.

Please suggest if any proper reason for above error log.

Thanks

No, Currently I am not doing any experiments on fb1 & fb2, because I don’t know how to use them also primary framebuffer is fb0 so, my concentration on fb0 for enabling six overlays.
BTW fb1 and fb2 win-mask is 0xc and 0x30 respectivily in my case.

Hi riteshkumar.p,

Please set fb1 and fb2 win_mask to 0x0 first, then set fb0 win_mask to 0x3f.
Then overlay=1~6 can run success without problem.

Please follow the instruction shared by carolyuu. Thanks.

Hi carolyuu & WayneWWW,
This is working. Thanks for the help.
I tried below commands and able to enable six overlays using sysfs.

sudo su

cd /sys/class/graphics/fb1

echo 0x0 > device/win_mask

cd /sys/class/graphics/fb2

echo 0x0 > device/win_mask

cd /sys/class/graphics/fb0

echo 4 > blank

echo 0x0 > device/win_mask

echo 0x3f > device/win_mask

echo 0 > blank