Removing Overscan / Borders

FluffyLob

Active Member
Hi all,

Just wanted to share the progress that's been made in removing the ugly borders and / or overscan when running linux.

To recap the problem - if your TV overscans a 720p/1080i feed, you have the choice of feeding true 720p and putting up with the overscan, or a reduced resolution (1188x644 or something) by ommiting the "-f" switch on ps3videomode - then you get fugly borders, but at least you can see everything.

Minkey, over on ps3hax.com put forward the idea of changing those values in the framebuffer driver source. I just got around to testing that theory and it seems to work great. If you want to give it a go, you'll need to fetch the source for a ps3-linux kernel and edit the ps3fb.c file before compiling the kernel. The changes to the file are:

Set the margin values for the 720p scaled mode in the static const struct ps3fb_res_table ps3fb_res section to a lower number than default, as so:

{ 1280, 720, 30, 10 , 0},

and also make the corresponding changes in static const struct fb_videomode ps3fb_modedb as so:

/* 720p */
"720p", 60, 1220, 700, 13481, 298, 148, 57, 44, 80, 5,

The first change indicates the number of pixels on each side to remove from the original 1280x720 feed - so in the example above, 30 pixels from each side (left and right), and 10 pixels from each end (top and bottom) - for a total of 60 pixels removed in width and 20 in height. That gives you the figures for the second change (1280-60=1220 and 720-20=700). The best figures for you will depend on the specific screen you're using. Experiment with different numbers.

For info on rebuilding the kernel, I pretty much just followed the guide here:
http://julipedia.blogspot.com/2007/03/building-updated-kernel-for-ps3.html
Although I was building on the PS3 so didn't need to worry about any of the cross-compiling stuff.

So far I've checked that the kernel boots, the command line (non-X) part fills the screen, as does KDE. I haven't checked if there's a performance hit after making the change yet.

Oh, I did this under Gentoo, and had to be running 64bit userland to get the kernel to compile - although it may be possible to compile it in 32bit userland, I couldn't figure it out :)

Now, if only we could have a bit more video performance! :)

Chris
 
R

RE*AC*TOR

Guest
That sounds great. Is there anyway someone could recompile the kernel in this way to be redistributed, so everyone doesn't have to?

Or could you try to draw up a step-by-step guide?

Also could you just do:

{ 1280, 720, 0, 0 , 0}

/* 720p */
"720p", 60, 1280, 720, 13481, 298, 148, 57, 44, 80, 5,
 

FluffyLob

Active Member
My kernel building skills aren't the best in the world - I'm still getting some errors on boot up (most likely due to not compiling in support for certain things) so mine isn't really ready for sharing. I'll keep plugging away though.

Also could you just do:

{ 1280, 720, 0, 0 , 0}

/* 720p */
"720p", 60, 1280, 720, 13481, 298, 148, 57, 44, 80, 5,

You could, but then you'd get the same overscan as if you ran ps3videomode with the -f switch - at least that's what I got. The workaround here centres around choosing the right resolution to fill your specific screen: Too low gives you borders, too high gives overscan.

Chris
 

The latest video from AVForums

Samsung QN95B 4K QLED TV Review
Subscribe to our YouTube channel
Support AVForums with Patreon

Top Bottom