Letux Kernel

Issue 441: enable TV-Out

Reported by Nikolaus Schaller, May 2, 2013

is missing functionality.

Did work on 2.6.32.

Comment 1 by Nikolaus Schaller, Jul 28, 2013

Labels: Milestone:3.10

Comment 2 by Nikolaus Schaller, Jul 31, 2013

Priority reduced
Labels: Priority:Low Priority:Critical

Comment 3 by Nikolaus Schaller, Sep 2, 2013

We should add it back in 3.12 using the display-new drivers.

An example can be found here:

 









































































https://git.kernel.org/cgit/linux/kernel/git/tomba/linux.git/commit/?h=3.12/dss-legacy-removal&id=c78fb21decade8511b252ab8d60f8c93315eb271
Labels: Priority:Medium Milestone:3.12 Priority:Low Milestone:3.10
Summary: enable TV-Out

Comment 4 by Nikolaus Schaller, Sep 24, 2013

It is now included in the code and we find a 
/sys/platform/device/omapdss/display0 pointing to the analog 
connector. But trying to enable it by

root@gta04:~# echo 0 
>/sys/devices/platform/omapdss/display0/enabled
root@gta04:~# echo 1 
>/sys/devices/platform/omapdss/display0/enabled
-bash: echo: write error: No such device
root@gta04:~# 

fails.

Comment 5 by Nikolaus Schaller, Sep 25, 2013

The problem mentioned above has been fixed and we can see composite 
video signals coming out of the DM3730.

Two issues have to be solved:
* configuring the DM3730 (DEVCONF) for AC-Bias and Bypass mode
* enabling/disabling the OPA362

Comment 6 by Nikolaus Schaller, Sep 25, 2013

I have observed another strange issue - in relation with X11.

Symptom: if TVout is compiled into the Kernel 
(CONFIG_DISPLAY_CONNECTOR_ANALOG_TV=y) the X.org server will find 
both, the LCD and the TVout as a potential monitor (listed in the 
log).

[    27.536] (II) omapfb(0): overlayPoolInit: Found 1 framebuffers, 
3 overlays and 2 managers
[    27.536] (II) omapfb(0): Printing probed modes for output tv
[    27.536] (II) omapfb(0): Modeline "720x574"x25.0   
13.50  720 732 788 864  574 579 615 625 (15.6 kHz P)
[    27.536] (II) omapfb(0): Printing probed modes for output lcd
[    27.536] (II) omapfb(0): Modeline "480x640"x65.7   
22.15  480 504 488 520  640 644 642 648 (42.6 kHz P)
[    27.537] (II) omapfb(0): Output tv connected
[    27.537] (II) omapfb(0): Output lcd connected

Then, it will echo the physical screen dimensions specified in 
/etc/X11/xorg.conf for the LCD:

[    27.537] (--) omapfb(0): Virtual size is 480x640 (pitch 480)
[    27.538] (**) omapfb(0):  Mode "480x640": 22.2 MHz, 
42.6 kHz, 65.7 Hz
[    27.538] (II) omapfb(0): Modeline "480x640"x65.7   
22.15  480 504 488 520  640 644 642 648 (42.6 kHz P)
[    27.538] (**) omapfb(0): Display dimensions: (43, 57) mm
[    27.538] (**) omapfb(0): DPI set to (283, 285)

But finally it will set-up the omapfb with a screen dimension almost 
3 times as large (factor 2.995) as specified.

should be:

[    27.764] (II) GLX: Initialized DRISWRAST GL provider for screen 
0
[    27.767] (II) omapfb(0): Setting screen physical size to 127 x 
169
[    28.243] (II) Using input driver 'evdev' for 'Touchscreen'

The result is that applications using WidthMMOfScreen() and 
HighthMMOfScreen() will get wrong values and if they are not pixel 
based but on millimeters such an application will scale down their 
display.

It is unclear what is wrong:
* kernel driver - it is known that it swaps display0/display1 
compared to older kernels
* xorg.conf - we may have to tie the monitor settings to the LCD 
display (Output "lcd" vs. "tv"?) and make the 
LCD the default
* X-server may not be prepared for dynamically changing dss display 
names in /sys - and may take the first one it finds for the final 
initalization
* a mix of all

Comment 7 by Nikolaus Schaller, Sep 26, 2013

After a log discussion with the OMAPDSS maintainer it is clear what 
we have to do:

1. write an amplifier-opa362.c driver that controls GPIO23 if 
enabled/disabled
2. update the board file to set up a VENC -> OPA362 -> 
connector-analog-tv pipeline
3. debug this until it works
4. move the code that writes to DEVCONF1 register to VENC enable 
(and set to reasonable values on disable - there is a CAUTION note 
in the DM3730 TM how to reduce leakage)
5. add .invert, .bypass, .acen properties to the VENC (or omapdss) 
platform data
5a. if I got the proposal correctly we should pass a pointer to the 
DEVCONF1 register as well (check for NULL)
6. process them as needed in the VENC enable/disable code
7. remove the direct write to DEVCONF1 register from board_init() 
and set the VENC platform data
8. remove the invert property and backpropagation mechanism from 
connector-analog-tv
9. if all that works we are done
10. submit these patches to the maintainer

Steps 1 and 2 have already been done (branch 3.12-wip-tvout).

Comment 8 by Nikolaus Schaller, Sep 27, 2013

Ok, the problem with Xlib WidthMMOfScreen() has been solved by an 
updated xorg.conf:

http://git.goldelico.com/?p=gta04-rootfs.git;a=blob;f=debian/config/e
tc/X11/xorg.conf.b1;hb=HEAD

Comment 9 by Nikolaus Schaller, Oct 1, 2013

Status: Accepted
Owner: marekb

Comment 10 by Nikolaus Schaller, Oct 4, 2013

TVout with opa362 driver now works!

Comment 11 by Nikolaus Schaller, Oct 12, 2013

Status: Fixed

Created: 10 years 11 months ago by Nikolaus Schaller

Updated: 10 years 6 months ago

Status: Fixed

Owner: Marek Belisko

Labels:
Type:Defect
Priority:Medium
Milestone:3.12