View Single Post
Old 26-Nov-2007, 21:27   #6
Panajev2001a
Senior Member
 
Join Date: Mar 2002
Posts: 3,153
Send a message via MSN to Panajev2001a
Default UPDATE: let's use fbset!

Recently the ps3fb.c file changed quite a bit and at first I thought the current black borders fix could not be performed.

On the CBE-OSS-DEV mailing list I learned that it is not the case and that there was an even better way to perform what we tried to do in this thread thanks to a kind Sony Software Architect:

Code:
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 decrease 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
So,

(I use ps3videomode -v 3 which is 720p non full-screen @60 Hz)

1.) first step:

add the following into /etc/fb.modes

Code:
mode "ps3_fb"
    geometry 1 1 1 1 0
    timings 0 0 0 0 0 0 0
endmode
2.) second step:

add the following (all into one line with a new line after it) into /etc/rc.local

Code:
fbset ps3_fb -a -xres 1208 -left 256 -right 106 -yres 684 -upper 37 -lower 24
Well, actually before doing that, read through the following if you are a bit unsure about what to do:

the xres, yres (these first two values define the resolution you want to set with fbset) and the related left, right, upper, and lower values (these last four define the black borders around the picture) are very good values for my set, but they might not be the best values for your set.

Take notice of the output of fbset first (you have to run it as root):

Code:
| # 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
Values of the geometry line are:

xres yres virtual_xres virtual_yres color_depth


Values of the timings line (minus the last two and the first one... you should not need to play with them... left margin = left black border):

left_margin right_margin upper_margin lower_margin


The difference between the new xres and yres values (the new values you want to specify) and their respective original values has to be taken into account when setting the margins: in my case for example I have increased xres by 84 pixels and yres by 40 so I had to reduce by 42 pixels the values of the left and right margins and by 20 pixels the values of the upper and lower margins.

Finally, a nice kernel hacks independent way of reducing the black borders problem down to something manageable .


Edit: Update:

http://linux.about.com/library/cmd/blcmdl5_fb.modes.htm (nice diagram about the various margins and other parameters you play with using fbset)

http://linux.about.com/library/cmd/blcmdl8_fbset.htm (fbset man pages)
__________________
"Any idea worth a damn is already patented... twice" -Mfa

Last edited by Panajev2001a; 15-Dec-2007 at 11:26.
Panajev2001a is online now   Reply With Quote