[Cbe-oss-dev] ps3fb.c changes and black borders
Geert Uytterhoeven
Geert.Uytterhoeven at sonycom.com
Tue Nov 27 02:07:36 EST 2007
On Fri, 23 Nov 2007, Goffredo Marocchi wrote:
> I have noticed the latest changes regarding the fb driver in the git repo:
>
> (small portion)
>
> "
> -struct ps3fb_res_table {
> - u32 xres;
> - u32 yres;
> - u32 xoff;
> - u32 yoff;
> - u32 type;
> -};
> -#define PS3FB_RES_FULL 1
> -static const struct ps3fb_res_table ps3fb_res[] = {
> - /* res_x,y margin_x,y full */
> - { 720, 480, 72, 48 , 0},
> - { 720, 576, 72, 58 , 0},
> - { 1280, 720, 78, 38 , 0},
> - { 1920, 1080, 116, 58 , 0},
> "
Those were removed because all information contained there could be obtained in
some other way.
> A lot of us could not use the FULL SCREEN option because of overscan
> issues on our TV's but then the regular modes would have very thick
> black borders around the picture which wasted a lot of TV screen estate.
>
> Editing the margin_x and margin_y in that table as well as appropriately
> modifying the related line(s) in this table:
>
> "
>
> static const struct fb_videomode ps3fb_modedb[] = {
>
> /* 60 Hz broadcast modes (modes "1" to "5") */
> {
> /* 480i */
> "480i", 60, 576, 384, 74074, 130, 89, 78, 57, 63, 6,
> FB_SYNC_BROADCAST, FB_VMODE_INTERLACED
> }, {
> /* 480p */
> "480p", 60, 576, 384, 37037, 130, 89, 78, 57, 63, 6,
> FB_SYNC_BROADCAST, FB_VMODE_NONINTERLACED
> }, {
> /* 720p */
> "720p", 60, 1208, 684, 13481, 298, 148, 57, 44, 80, 5,
> FB_SYNC_BROADCAST, FB_VMODE_NONINTERLACED
> }, {
> /* 1080i */
> "1080i", 60, 1688, 964, 13481, 264, 160, 94, 62, 88, 5,
> FB_SYNC_BROADCAST, FB_VMODE_INTERLACED
> }, {
> /* 1080p */
> "1080p", 60, 1688, 964, 6741, 264, 160, 94, 62, 88, 5,
> FB_SYNC_BROADCAST, FB_VMODE_NONINTERLACED
>
> },
>
> "
>
> http://forum.beyond3d.com/showthread.php?t=43859
>
> Modifying both tables appropriately a user could minimize those black
> borders.
>
> Am I right saying that with the new ps3fb.c file we won't be able to
> pull that "hack" any longer ?
No.
The first good news is that you no longer have to care about ps3fb_res[].
You can still modify ps3fb_modedb[] to achieve what you want.
> Will there be a different/better way to achieve our goal of minimal and
> not over conservative black borders ?
The second good news is that now you can also use fbset to tune the width of
the borders. Examples:
- If you want to increase the left margin of the 720p mode by 5 pixels:
| # fbset
|
| mode "1124x644-60"
| # D: 74.178 MHz, H: 44.957 kHz, V: 59.942 Hz
| geometry 1124 644 1124 644 32
^^^^
old xres
| timings 13481 298 148 57 44 80 5
^^^
old left margin
| bcast true
| accel true
| rgba 8/16,8/8,8/0,8/24
| endmode
|
| # fbset -xres 1129 -left 293
- If you want to move the visible part of the screen, you can use e.g.
`fbset -move left'
Even better, ps3fb now does automatic rounding (uprounding) of
parameters if they don't fit.
If you add an empty mode to /etc/fb.modes, e.g.
| mode "null"
| geometry 1 1 1 1 0
| timings 0 0 0 0 0 0 0
| endmode
you can even let ps3fb round it up to whatever resolution you want, like
| # fbset null -xres 800 -yres 600
With kind regards,
Geert Uytterhoeven
Software Architect
Sony Network and Software Technology Center Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium
Phone: +32 (0)2 700 8453
Fax: +32 (0)2 700 8622
E-mail: Geert.Uytterhoeven at sonycom.com
Internet: http://www.sony-europe.com/
Sony Network and Software Technology Center Europe
A division of Sony Service Centre (Europe) N.V.
Registered office: Technologielaan 7 · B-1840 Londerzeel · Belgium
VAT BE 0413.825.160 · RPR Brussels
Fortis Bank Zaventem · Swift GEBABEBB08A · IBAN BE39001382358619
More information about the cbe-oss-dev
mailing list