Panajev2001a
GAF's Pleasant Genius
This post is for those of you that if you use the FULL SCREEN version of the 480p-to-1080p resolutions modes you find portion of the picture "exceeding" the bounds of the monitor and if you do not use those modes you have large black borders around the picture.
If you follow PS3 Linux quite closely you might have found the fix already, but some of you might have not or did not care too much about getting their hands dirty with a custom kernel or re-compiling their kernel.
WARNING: Panajev should not be blamed if you have to re-install Linux on your PS3. I can tell you this guide has worked for me (and I do not see why it should give you problems with your system), but your mileage might always vary.
If you decide to compile the kernel pulled from Geoff Levand's tree (CELL/PS3 focused tree), you can follow this great guide here carefully:
http://www.renderstate.de/?p=9
If you run Fedora (I am running Fedora 7), you might want to pay attention to the end of the tutorial in which you copy back vmlinux to the /boot directory and configure the kboot.conf file. This is really horrible nitpicking, but keeping things consistent with the standard Fedora 7 naming convention should help you to do this process again in the future)
Fedora users will have to do something slightly different (for starters they have the /etc/yaboot.conf file to worry about and not the kboot.conf file, while the author seems to be using YDL).
Example of what I am saying:
cp vmlinux /boot/vmlinux-2.6.22-rc7-g9b6d7171
should be (on your Fedora installation)
cp vmlinux /boot/vmlinuz-2.6.22-rc7-g9b6d7171
(just check the /boot directory for the naming of all kernel images)
and the thing about the yaboot.conf file (the videomode I set assumes you want to use 720p with the FULL_SCREEN flag set to 0, to prevent overscan problems):
That is what you need to add in the yaboot.conf file: put it before the other kernels to make sure it boots first.
Like it is mentioned in the guide, the 2.6.23-rc3-g2733ff47-dirty string you see here is the name resulting after the make modules_install procedure has finished when "I executed it on my system" and on your system at the time you follow the kernel customization guide you might receive a different value which you will have to use in a consistent manner.
At the end of this post I have placed my yaboot.conf file hoping it might be of some help to those who have some doubts (please do ask questions, if I know the answer I will reply asap
and if I do not know the answer I will tell you so too
).
Well, for everybody playing with either the custom kernel sources or the fedora PPC kernel (which supports the PS3), the file you want to look at to fix the "black borders around the screen" problem is the following:
/usr/src/linux/drivers/video/ps3fb.c (assuming you set the linux symlink appropriately as the guide specified)
so open it with vi, gedit, or your editor of choice and look for PS3FB_RES_FULL.
You'll first work on this section:
the line I edited, compared to the original version, is only the 1280x720 line in that quote. The other values are all default values (the conservative set of values for 1080p is {1920, 1080, 64, 32, 0}, but this is not the only thing you have to change in this file so pay attention to the rest of this post).
More conservative values are 38 and 18 for the margins and the final values depend on your TV (on mine 36 and 18 worked better).
The values 36 and 18 refer to the black borders margin_x and margin_y used on the sides of the screen (to prevent relevant portion of the image to be displayed out of the sides of the screen).
The values of margin_x and margin_y are to be intended as follows:
On the left and right sides of the picture to be displayed on the screen there is a border which is margin_x pixels wide (so in total the border is margin_x * 2 wide horizontally).
On the top and bottom sides of the picture to be displayed on the screen there is a border which is margin_y pixels wide (so in total the border is margin_y * 2 wide vertically).
The other section you must edit is the following one (in the same file):
Again here I only edited the 720p line (I use ps3fb mode 3) compared to the original file (do not go touch the "full resolution" versions of those resolution further down in the file though).
The values I edited are these two: 1208, 684 ... are they special ? Yes.
You can think of those values in the following way: 1280 - (margin_x*2), 720 - (margin_y*2)
Of course you might say: "hey, to find the best values I need to recompile the kernel tons of times!!!!!!!!! It's slow!!!!!!!". Do not panic, there is a short-cut:
Go back in /usr/src/linux/ (inside this directory or inside /usr/src/ps3-linux to keep the custom kernel updated run the command git pull once in a while and then follow the same procedure outlined in the guide to compile the kernel [with the minor modifications for Fedora users as I have posted in this thread, well if you use Fedora as your Linux distribution that is):
go inside the drivers/video/ directory and delete the ps3fb.o file.
Now edit the ps3fb.c file again and repeat the procedure you used to compile the kernel outlined in the guide I linked to in this thread from here:
forward (do not repeat the earlier steps just to optimize the values of the black borders or else it will take much longer to compile the kernel although it can mae you feel safe hehe
).
Other guides I have used writing this post:
http://www.ps3news.com/forums/ps3-l...-screen-modes-remove-black-borders-66944.html
http://www.ps3hax.com/forum/gentoo-linux/267-ps3videomode-ps3fb-driver-2.html
http://www.cellperformance.com/articles/2007/01/howto_huge_tlb_pages_on_ps3_li.html
For further reference:
this is my yaboot.conf file:
If you follow PS3 Linux quite closely you might have found the fix already, but some of you might have not or did not care too much about getting their hands dirty with a custom kernel or re-compiling their kernel.
WARNING: Panajev should not be blamed if you have to re-install Linux on your PS3. I can tell you this guide has worked for me (and I do not see why it should give you problems with your system), but your mileage might always vary.
If you decide to compile the kernel pulled from Geoff Levand's tree (CELL/PS3 focused tree), you can follow this great guide here carefully:
http://www.renderstate.de/?p=9
If you run Fedora (I am running Fedora 7), you might want to pay attention to the end of the tutorial in which you copy back vmlinux to the /boot directory and configure the kboot.conf file. This is really horrible nitpicking, but keeping things consistent with the standard Fedora 7 naming convention should help you to do this process again in the future)
Fedora users will have to do something slightly different (for starters they have the /etc/yaboot.conf file to worry about and not the kboot.conf file, while the author seems to be using YDL).
Example of what I am saying:
cp vmlinux /boot/vmlinux-2.6.22-rc7-g9b6d7171
should be (on your Fedora installation)
cp vmlinux /boot/vmlinuz-2.6.22-rc7-g9b6d7171
(just check the /boot directory for the naming of all kernel images)
and the thing about the yaboot.conf file (the videomode I set assumes you want to use 720p with the FULL_SCREEN flag set to 0, to prevent overscan problems):
Code:
image=/vmlinuz-2.6.23-rc3-g2733ff47-dirty
label=2.6.23-rc3-g2733ff47-dirty_36_18
read-only
initrd=/initrd-2.6.23-rc3-g2733ff47-dirty.img
append="video=ps3fb:mode:3 rhgb quiet root=LABEL=/"
That is what you need to add in the yaboot.conf file: put it before the other kernels to make sure it boots first.
Like it is mentioned in the guide, the 2.6.23-rc3-g2733ff47-dirty string you see here is the name resulting after the make modules_install procedure has finished when "I executed it on my system" and on your system at the time you follow the kernel customization guide you might receive a different value which you will have to use in a consistent manner.
At the end of this post I have placed my yaboot.conf file hoping it might be of some help to those who have some doubts (please do ask questions, if I know the answer I will reply asap
Well, for everybody playing with either the custom kernel sources or the fedora PPC kernel (which supports the PS3), the file you want to look at to fix the "black borders around the screen" problem is the following:
/usr/src/linux/drivers/video/ps3fb.c (assuming you set the linux symlink appropriately as the guide specified)
so open it with vi, gedit, or your editor of choice and look for PS3FB_RES_FULL.
You'll first work on this section:
Code:
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, 36, 18 , 0},
{ 1920, 1080, 116, 58 , 0},
the line I edited, compared to the original version, is only the 1280x720 line in that quote. The other values are all default values (the conservative set of values for 1080p is {1920, 1080, 64, 32, 0}, but this is not the only thing you have to change in this file so pay attention to the rest of this post).
More conservative values are 38 and 18 for the margins and the final values depend on your TV (on mine 36 and 18 worked better).
The values 36 and 18 refer to the black borders margin_x and margin_y used on the sides of the screen (to prevent relevant portion of the image to be displayed out of the sides of the screen).
The values of margin_x and margin_y are to be intended as follows:
On the left and right sides of the picture to be displayed on the screen there is a border which is margin_x pixels wide (so in total the border is margin_x * 2 wide horizontally).
On the top and bottom sides of the picture to be displayed on the screen there is a border which is margin_y pixels wide (so in total the border is margin_y * 2 wide vertically).
The other section you must edit is the following one (in the same file):
Code:
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
},
Again here I only edited the 720p line (I use ps3fb mode 3) compared to the original file (do not go touch the "full resolution" versions of those resolution further down in the file though).
The values I edited are these two: 1208, 684 ... are they special ? Yes.
You can think of those values in the following way: 1280 - (margin_x*2), 720 - (margin_y*2)
Of course you might say: "hey, to find the best values I need to recompile the kernel tons of times!!!!!!!!! It's slow!!!!!!!". Do not panic, there is a short-cut:
Go back in /usr/src/linux/ (inside this directory or inside /usr/src/ps3-linux to keep the custom kernel updated run the command git pull once in a while and then follow the same procedure outlined in the guide to compile the kernel [with the minor modifications for Fedora users as I have posted in this thread, well if you use Fedora as your Linux distribution that is):
go inside the drivers/video/ directory and delete the ps3fb.o file.
Now edit the ps3fb.c file again and repeat the procedure you used to compile the kernel outlined in the guide I linked to in this thread from here:
Part II - Continued
make make modules_install
forward (do not repeat the earlier steps just to optimize the values of the black borders or else it will take much longer to compile the kernel although it can mae you feel safe hehe
Other guides I have used writing this post:
http://www.ps3news.com/forums/ps3-l...-screen-modes-remove-black-borders-66944.html
http://www.ps3hax.com/forum/gentoo-linux/267-ps3videomode-ps3fb-driver-2.html
http://www.cellperformance.com/articles/2007/01/howto_huge_tlb_pages_on_ps3_li.html
For further reference:
this is my yaboot.conf file:
Code:
# yaboot.conf generated by anaconda
boot=/dev/sda
init-message=Welcome to Fedora!\nHit <TAB> for boot options
partition=1
timeout=80
install=/usr/lib/yaboot/yaboot
delay=5
enablecdboot
enableofboot
enablenetboot
nonvram
mntpoint=/boot/yaboot
usemount
image=/vmlinuz-2.6.23-rc3-g2733ff47-dirty
label=2.6.23-rc3-g2733ff47-dirty_36_18
read-only
initrd=/initrd-2.6.23-rc3-g2733ff47-dirty.img
append="video=ps3fb:mode:3 rhgb quiet root=LABEL=/"
image=/vmlinuz-2.6.23-rc3-g966fd9c0
label=2.6.23-rc3-g966fd9c0
read-only
initrd=/initrd-2.6.23-rc3-g966fd9c0.img
append="video=ps3fb:mode:3 rhgb quiet root=LABEL=/"
image=/vmlinuz-2.6.22.4-65.fc7
label=2.6.22.4-65.fc7
read-only
initrd=/initrd-2.6.22.4-65.fc7.img
append="video=ps3fb:mode:3 rhgb quiet root=LABEL=/"
image=/vmlinuz-2.6.22.1-41.fc7
label=linux_2.6.22.1_41
read-only
initrd=/initrd-2.6.22.1-41.fc7.img
append="video=ps3fb:mode:3 rhgb quiet root=LABEL=/"