This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

THS8200-FB Initializtion Issue

Other Parts Discussed in Thread: THS8200

Hi Guys,

Am working on interfacing an another encoder to the DM355. The problem is that this encoder uses I2C and thus is coded as a device_init call just like the THS8200. The moment I boot up the board, and issue a fbset command, the timings in the same are all zero. Debugging this, I found that the FB driver gets initialized with 0 values before the encoder driver and as a result, i get the fb structure populated with zeros.

1. Can anyone let me know if this is the same with the THS card? If someone sets the fb structure using the fbset command at the kernel prompt, it then reflects the actual values.

2. I moved the encoder driver from drivers/media/video/davinci/ to the drivers/video folder and added it to be compiled bfore the FB driver. Is this the right thing to do(in terms of methodology accpeted universlly by the open source community)?

Thanx!

Sundar

  • 1.  not sure id I would call it the kernel prompt, but you can use fbset at the Linux prompt or user space application.  See the following wiki article for more details

    http://wiki.davincidsp.com/index.php?title=LSP1.20_Kernel_Boot_Arguments_for_the_Frame_Buffer_Driver

    and yes, this should work regardsless of encoder attached (e.g. THS8200).  Of course the THS8200 driver needs to support the resolution as well and I believe that at the moment, only 720p and 1080i are supported by THS8200.  What resolution are you working with?

  • Juan,

    Thanx for the quick reply.

    I would put out the details, so that this clears off any doubts. is a bit long story :)

    1. All the encoder devices in the drivers/media/video folder except the THS8200 use a subsys_init call; which ensures that they get loaded up at the aub-system init level. The THS8200 gets loaded by a device_init call which is OK considering that I would want the I2C sub-system to be inited and OK before I ping the TH8200. The Davinci FB driver uses module_init which means that this will get loaded after the the ones by subsys_init.

    2. According to the new encoder manager interface, any video mode of type vid_enc_mode (a look-alike of the fb_videomode) that is supported by the encoders, whenever selected against a particular output/mode, the FB driver converts that current mode using the video_mode_to_fb_var(please forgive as this isnt the exact name!) and maintains that as the current mode for the fb_info members. It becomes the responsibility of the Encoder Mgr to communicate such platform dependencies to either the FB/V4L2 layer.

    3. I found that if I use a fbset -i command as the first command on the linux prompt, the timings values are all zeros. However, immediately, the fb_var structure gets populated with the exact values, because by that time, the encoder manager mode to fb_var conversion code gets called and the fb_var has the correct values.

    4. So, in a case of only THS8200 card, I cannot have the default values loaded up by boot time itself. The DaVinci probe gets called earlier than the ths8200_init.

    5. I moved the ths8200_encoder.c to the drivers/video and added it in the makefile prior to davincifb.c and at this point, the fb_var structures get the correct values by default at the load time itself.

    Are the above points valid?

    Thanx!

  • Guys, any takers for what I wrote above??

    :)