<div dir="ltr"><div dir="ltr"><br></div><div dir="ltr"><br><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jul 11, 2019 at 12:51 AM Christian Mauderer <<a href="mailto:list@c-mauderer.de" target="_blank">list@c-mauderer.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 10/07/2019 12:53, Christian Mauderer wrote:<br>
> <br>
> <br>
> On 10/07/2019 12:38, Vijay Kumar Banerjee wrote:<br>
>><br>
>><br>
>> On Wed, Jul 10, 2019 at 12:40 PM Christian Mauderer<br>
>> <<a href="mailto:christian.mauderer@embedded-brains.de" target="_blank">christian.mauderer@embedded-brains.de</a><br>
>> <mailto:<a href="mailto:christian.mauderer@embedded-brains.de" target="_blank">christian.mauderer@embedded-brains.de</a>>> wrote:<br>
>><br>
>>     On 09/07/2019 21:13, Vijay Kumar Banerjee wrote:<br>
>>     > Hello all, <br>
>>     ><br>
>>     > First the status :<br>
>>     > * The fbd has been ported and it's attaching with the fb0 devie.<br>
>>     There's<br>
>>     >    an fb0 device entry created. <br>
>>     > * In the following commit I have added mmap to libbsd. This works<br>
>>     like a<br>
>>     > wrapper to the mmap in cpukit<br>
>>     ><br>
>>     : <a href="https://github.com/thelunatic/rtems-libbsd/commit/a8fc3b2b6840465029a000cc4169e9efbd551097" rel="noreferrer" target="_blank">https://github.com/thelunatic/rtems-libbsd/commit/a8fc3b2b6840465029a000cc4169e9efbd551097</a><br>
>>     ><br>
>>     > Blocker : <br>
>>     > * After the fb0 is created and mmap is added, I don't see anything on<br>
>>     >   the screen. From the FreeBSD, it seemed like the VT driver is needed<br>
>>     > and that is responsible for turning on the screen. So I have ported a<br>
>>     > minimal version of the VT with only the initialization and<br>
>>     allocate parts:<br>
>>     ><br>
>>     <a href="https://github.com/thelunatic/rtems-libbsd/commit/95279e116717973525b581ae2e9550d1d3b8e1ba" rel="noreferrer" target="_blank">https://github.com/thelunatic/rtems-libbsd/commit/95279e116717973525b581ae2e9550d1d3b8e1ba</a><br>
>>     ><br>
>>     > But even after porting the VT driver which initializes well ( As the<br>
>>     > message during booting says). I don't see anything on the screen.<br>
>>     > I need some ideas on what is missing or how to debug this. <br>
>>     ><br>
>>     > The app I'm using to test framebuffer is pushed here :<br>
>>     > <a href="https://github.com/thelunatic/rtems-bbb/tree/master/apps/fb-sample" rel="noreferrer" target="_blank">https://github.com/thelunatic/rtems-bbb/tree/master/apps/fb-sample</a><br>
>>     ><br>
>>     > Any idea regarding this is greatly appreciated.<br>
>>     ><br>
>>     > Thanks,<br>
>>     > Vijay<br>
>>     ><br>
>><br>
>>     Hello Vijay,<br>
>><br>
>>     did you have a look at the SPI of the HDMI framer? What is it used for<br>
>>     according to the data sheet? Is it necessary for the driver?<br>
>><br>
>> Hi,<br>
>> From the datasheet, it seems that the SPI1_CS0 and SPI1_D0 pins are <br>
>> configured as I2S interface for the audio. I think this is not necessary <br>
>> and it is enabled only for a few selected resolutions that support audio. <br>
>><br>
>>     From our chat discussions and my own tests I know that the screen is<br>
>>     still not receiving a signal. So I would assume some quite basic<br>
>>     problem. If your new mmap wouldn't work, you should still get at least a<br>
>>     black screen.<br>
>><br>
>> I was also hoping that VT will do the initialization and turn the screen On.<br>
>> There might be something useful that I omitted during the porting. If you <br>
>> can please review the commit, I can send it in the devel.<br>
> <br>
> I think in this case it's enough on your github repo.<br>
> <br>
> I haven't found anything yet. I'll try to have a more detailed look as<br>
> soon as possible. But I'll be busy with some other topics today<br>
> (including the evening). So most likely I can't tell much till tomorrow.<br>
> <br>
> You might want to have a look whether you find some documentation for<br>
> the graphics IP core in the TI chip. It could be interesting to have<br>
> some documentation to see the basic steps. Maybe this gives a hint. An<br>
> alternative could be to look at some other drivers (Linux, maybe U-Boot<br>
> or some embedded systems if there is one) to find out something more.<br>
> There should be some sequence for the setup. If you know that sequence<br>
> you can try to find it in the libbsd driver and see whether all steps<br>
> are done.<br>
> <br>
<br>
Although I don't have put much time into it today I had a look at the<br>
original commit that added the FreeBSD am335x_lcd driver:<br>
8cfe669b84fdbf7d9f1312c50c39b663d68be85c<br>
<br>
The author added not only am335x_lcd.c but am335x_lcd_syscons.c too.<br>
>From a look at it, most of it is a system console (like the name<br>
suggests) and won't be useful for the current step. But the syscons_init<br>
caught my eye:<br>
<br>
There is a call to vid_register in it. This function is declared in<br>
sys/dev/fb/fbreg.h and defined in sys/dev/fb/fb.c. According to the<br>
comment in the c file it "Registers a video adapter". I haven't seen a<br>
call to that function in the ported code.<br>
<br></blockquote><div>I have imported the file but I can't reach any am335x_syscons* functions</div><div>from the debugger. The am335x_syscons_configure is supposed to call</div><div>the init function which calls the vid_register. The am335x_syscons creates</div><div>a DATA_SET with the macro VIDEO_DRIVER with the configure function.</div><div>Is it supposed to be linked somewhere that I'm missing?   </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
So maybe it would be worth a try to port the lcd_syscons.c too. Maybe<br>
even instead of the (not working) VT driver. Like for the VT, you most<br>
likely can just remove everything that's console related in case it<br>
makes problems. The relevant function should be syscons_init.<br>
<br>
Best regards<br>
<br>
Christian<br>
</blockquote></div>
</div>