Hi,
On 11/11/06, Marco Trillo <marcotrillo gmail.com> wrote:
> But there is still a problem: although the monitor is
set up
> correctly, the driver thinks it's still running at 640
x 480
> resolution mode, and so it creates a 640 x 480 display:
>
> radeonfb0: display 0: virtual resolution 640x480 at 32
bpp
> radeonfb0: port 0: physical 1024x768 89Hz
> radeonfb0: port 1: physical 1024x768 89Hz
>
> So it creates a small box of 640 x 480 pixels at the
left edge of the
> screen, and the rest of the 1024 x 768 space is not
used (it appears
> filled with a blue-ish color).
Well, I finally got it working ! (a patch is attached)
'radeonfb.c' has some checks to pickup a virtual resolution
larger
than the physical resolution, so if there are multiple
monitors
present, the smaller one will use panning.
But there were some places (like when the default videomode
is
selected) when that check wasn't made.
I tried to fix this, a diff to the 'radeonfb.c' file is
attached
(hopefully Gmail won't base64-encode the patch).
It works fine now for me ! Hope it doesn't break anything !
The relevant dmesg section with the new patch is:
radeonfb_pickres picked 640x480
radeonfb0: port 0: physical 1024x768 89Hz
radeonfb0: port 1: physical 1024x768 89Hz
radeonfb0: display 0: virtual resolution 1024x768 at 32 bpp
--
-Marco
Index: radeonfb.c
============================================================
=======
RCS file: /cvsroot/src/sys/dev/pci/radeonfb.c,v
retrieving revision 1.6
diff -u -r1.6 radeonfb.c
--- radeonfb.c 7 Oct 2006 21:36:12 -0000 1.6
+++ radeonfb.c 14 Nov 2006 21:36:34 -0000
 -716,22
+716,34 
/* for text mode, we pick a resolution that won't
* require panning */
radeonfb_pickres(dp, &dp->rd_virtx,
&dp->rd_virty, 0);
-
- aprint_normal("%s: display %d: "
- "virtual resolution %dx%d at %d bppn",
- XNAME(sc), i, dp->rd_virtx, dp->rd_virty,
dp->rd_bpp);
+ DPRINTF(("radeonfb_pickres picked %dx%dn",
dp->rd_virtx,
+ dp->rd_virty));
/* now select the *video mode* that we will use */
for (j = 0; j < dp->rd_ncrtcs; j++) {
const struct videomode *vmp;
vmp = radeonfb_port_mode(dp->rd_crtcs[j].rc_port,
dp->rd_virtx, dp->rd_virty);
+
+ /*
+ * make sure we use the largest virtual resolution,
+ * the smaller monitor will pan
+ */
+ if (dp->rd_virtx < vmp->hdisplay ||
+ dp->rd_virty < vmp->vdisplay) {
+ dp->rd_virtx = vmp->hdisplay;
+ dp->rd_virty = vmp->vdisplay;
+ }
dp->rd_crtcs[j].rc_videomode = *vmp;
printf("%s: port %d: physical %dx%d %dHzn",
XNAME(sc), j, vmp->hdisplay, vmp->vdisplay,
DIVIDE(DIVIDE(vmp->dot_clock * 1000,
vmp->htotal), vmp->vtotal));
}
+
+ aprint_normal("%s: display %d: "
+ "virtual resolution %dx%d at %d
bppn",
+ XNAME(sc), i, dp->rd_virtx,
dp->rd_virty, dp->rd_bpp);
/* N.B.: radeon wants 64-byte aligned stride */
dp->rd_stride = dp->rd_virtx * dp->rd_bpp / 8;
|