Re: Howto configure borderless 4:3 tv-out on n900?

2010-03-23 Thread Javier S. Pedro
Till Harbaum / Lists wrote:

 The problem is the horizontal stretch. You can't write to
 /sys/devices/platform/omapdss/overlay2/input_size and by checking what
 the media player does i found out that it actually changes this to
 640x480 when playing a 4:3 video. Unfortunately the /sys interface
 doesn't allow to write these, so i'll have a look at the ioctls next.

Yes, the ioctls will allow you to change the fb size, thus implicitly
change the associated overlays' input_size. There's a nice cmd line 
utility (fbset) to do this (which is not packaged but I plan to do), 
and we've been toying with this for emus (see IRC).

Unfortunately, I doubt you can change the SGX framebuffer size without
restarting the SGX or crashing hildon-desktop at least. So this is 
limited to programs that have the extra framebuffer device in mind.

-- 
Javier

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Howto configure borderless 4:3 tv-out on n900?

2010-03-20 Thread Till Harbaum / Lists
Hi,

thanks for your reply. I fiddled a little bit around with this. 

It's pretty easy to stretch the image vertically to full screen. You just
need to set
echo 640,480  /sys/devices/platform/omapdss/overlay2/output_size
and 
echo 42,30  /sys/devices/platform/omapdss/overlay2/position
The media player does the same.

The problem is the horizontal stretch. You can't write to 
/sys/devices/platform/omapdss/overlay2/input_size and by checking
what the media player does i found out that it actually changes this
to 640x480 when playing a 4:3 video. Unfortunately the /sys interface
doesn't allow to write these, so i'll have a look at the ioctls next.

Till

Am Freitag 19 März 2010 schrieb Frantisek Dufka:
 I don't know if there is some high level api but a lot of things can be 
 done either via framebuffer ioctl or via changing stuff in 
 /sys/dev/ices/platform/omapdss/ see
 
 http://gitorious.org/linux-omap-dss2/linux/blobs/master/Documentation/arm/OMAP/DSS
 
 Having full PAL or NTSC with no translation/scaling would be good both 
 for games and video playback too.
 
 So far I have only succeeded to change the default 800x480 - TV scaling 
 to be a bit better so it is no longer fuzzy due to extra downscaling. On 
 my TV I can get exactly 480 lines visible in PAL mode which makes 
 reading text much better.
 http://talk.maemo.org/showthread.php?p=461660#post461660
 
 
 For NTSC output (640x480) it would be enough to render to part of the 
 screen and set the size and offset accordingly. For full PAL it would 
 need resizing framebuffer to get more lines (ioctl?).
 
 I wonder how OMAP3 display controller features (gfx,vid1,vid2 planes, 
 scaling, mirroring, rotation, tv-out) are mapped to Xv and other X APIs.
 
 Frantisek
 

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Howto configure borderless 4:3 tv-out on n900?

2010-03-19 Thread Frantisek Dufka
I don't know if there is some high level api but a lot of things can be 
done either via framebuffer ioctl or via changing stuff in 
/sys/dev/ices/platform/omapdss/ see


http://gitorious.org/linux-omap-dss2/linux/blobs/master/Documentation/arm/OMAP/DSS

Having full PAL or NTSC with no translation/scaling would be good both 
for games and video playback too.


So far I have only succeeded to change the default 800x480 - TV scaling 
to be a bit better so it is no longer fuzzy due to extra downscaling. On 
my TV I can get exactly 480 lines visible in PAL mode which makes 
reading text much better.

http://talk.maemo.org/showthread.php?p=461660#post461660


For NTSC output (640x480) it would be enough to render to part of the 
screen and set the size and offset accordingly. For full PAL it would 
need resizing framebuffer to get more lines (ioctl?).


I wonder how OMAP3 display controller features (gfx,vid1,vid2 planes, 
scaling, mirroring, rotation, tv-out) are mapped to Xv and other X APIs.


Frantisek
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


RE: Howto configure borderless 4:3 tv-out on n900?

2010-03-19 Thread roope.jarvinen
 

Hi,

I suggest you play around with xvattr (http://freshmeat.net/projects/xvattr/), 
which you can use to set various Xv extension attributes, like 
XV_OMAP_TVOUT_SCALE and XV_OMAP_TVOUT_WIDESCREEN. I'm not sure if you can find 
it any maemo repository, but you can compile it from source as it is freely 
available in fresmeat.

--Roope



-Original Message-
From: maemo-developers-boun...@maemo.org 
[mailto:maemo-developers-boun...@maemo.org] On Behalf Of ext 
Till Harbaum / Lists
Sent: 18 March, 2010 21:37
To: maemo-developers@maemo.org
Subject: Howto configure borderless 4:3 tv-out on n900?

Hi,

there seems to be an API to change the behaviour of the TV 
output on the n900. At least the media player uses it to e.g. 
display things with a different layout on the internal screen 
and the tv-out.

I am asking this because i think it's a great thing to add to 
all those 640x480 (4:3) programs and especially emulators. The 
problem these have is that the have a black border left and 
right to accomodate for the 800x480 main screen and on tv-out 
they get another top and bottom border to display the entire 
internal display contents on the tv-out. The result is a 4:3 
image on the 4:3 tv-out with black borders on all four sides 
and with pixels being lost. This isn't useful at all.

I would be really cool if these applications could just 
request the tv.out to zoom/crop the 4:3 tv-output. That way 
most emulated games would run full screen and without any pixel loss.

How can this be achieved?

Till
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Howto configure borderless 4:3 tv-out on n900?

2010-03-19 Thread Attila Csipa
On Friday 19 March 2010 09:16:14 Frantisek Dufka wrote:
 I don't know if there is some high level api but a lot of things can be
 done either via framebuffer ioctl or via changing stuff in
 /sys/dev/ices/platform/omapdss/ see

 http://gitorious.org/linux-omap-dss2/linux/blobs/master/Documentation/arm/O
MAP/DSS

 Having full PAL or NTSC with no translation/scaling would be good both
 for games and video playback too.

Can you (or anyone with intimate knowledge) chip in with some comments of how 
playing with these can (not) affect the devices (or what gets attached to 
them) ? I would like to play with this a bit, but don't want to burn down my 
DDP N900 with some weird video sync setting (been bitten by some unrelated 
hardware happily setting parameters that burned the video out down :) 

Regards,
Attila
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Howto configure borderless 4:3 tv-out on n900?

2010-03-19 Thread Frantisek Dufka

Attila Csipa wrote:

Can you (or anyone with intimate knowledge) chip in with some comments of how 
playing with these can (not) affect the devices (or what gets attached to 
them) ?


Well as long as you only write 'pal' or 'ntsc' to 
/sys/devices/platform/omapdss/display1/timings nothing should go wrong.
It is not needed to mess with tv-out signal timings. It is only about 
what pixel data gets sent via tv-out (setting data source, position, 
size, scaling).

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Howto configure borderless 4:3 tv-out on n900?

2010-03-19 Thread Javier S. Pedro
Attila Csipa wrote:

 Can you (or anyone with intimate knowledge) chip in with some comments
 of how playing with these can (not) affect the devices (or what gets
 attached to them) ? I would like to play with this a bit, but don't want
 to burn down my DDP N900 with some weird video sync setting (been bitten
 by some unrelated hardware happily setting parameters that burned the
 video out down :)

Curiously enough, this very Monday I discovered that we could use the dispc
for scaling (in emulators, etc) and have been doing tests for the entire
week. You can do weird things like cloning the fb0 (the fb where the sgx
renders) to multiple overlays while resizing one of them, and up so far
everything still works normally after reboot.

I wouldn't touch the lcd timings, and, as fanoush said, you can only
write pal or ntsc to the tv-out device timings field.


Now that the topic has been raised, I'd like to share what I've been
considering for usage of the dispc in 2d games:
- The system seems to use fb0 for sgx, and fb1 for xv surfaces.
- The system seems to use overlay0 as the base overlay, overlay1 for xv
apps: camera, media player (still have to check what happens when a 
single app has more than one xv surface, if that's even possible), and
overlay2 for resizing the tv output.
- Thus, when the system is not connected to tv-out, an app could 
potentially use some ioctls to initialize fb2, then use sysfs to connect it
to overlay2 and draw it scaled on the lcd (and also, much like xv, use a
special transparent color key on fb0).
When the system is connected to tv-out, this app could save overlay2
state and push his own settings when foregrounded, then restore the
previous ovly2 state when backgrounded.

It could even work :), or so I think.

-- 
Javier

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Howto configure borderless 4:3 tv-out on n900?

2010-03-18 Thread Till Harbaum / Lists
Hi,

there seems to be an API to change the behaviour of the TV output on the n900. 
At least the media player uses it to e.g. display things with a different 
layout on the internal screen and the tv-out.

I am asking this because i think it's a great thing to add to all those 640x480 
(4:3) programs and especially emulators. The problem these have is that the 
have a black border left and right to accomodate for the 800x480 main screen 
and on tv-out they get another top and bottom border to display the entire 
internal display contents on the tv-out. The result is a 4:3 image on the 4:3 
tv-out with black borders on all four sides and with pixels being lost. This 
isn't useful at all.

I would be really cool if these applications could just request the tv.out to 
zoom/crop the 4:3 tv-output. That way most emulated games would run full screen 
and without any pixel loss.

How can this be achieved?

Till
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers