diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2013-05-27 19:37:46 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2013-05-27 19:37:46 +0000 |
commit | f4776e93764b01609af1bcb5cb174708f40a3dce (patch) | |
tree | ffd3285679b61ed0519f6ba23e2cf18572af11b3 | |
parent | 924366743c6fb26895c4a5771ce786141dd049fa (diff) |
Correctly specify the visible part of the rightmost tile when the current
resolution is not a multiple of the tile size, in emulation (text) mode.
The usual 1280x1024 resolution ended up with the correct value, by chance,
but a width of 1600 would be wrong. (X11 was running fine)
Tested on the 1600x1024 resolution of the 1600SW display. Thanks to Johan
Sanchez for lending me a 1600SW monitor and an adapter board.
-rw-r--r-- | sys/arch/sgi/dev/gbe.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/arch/sgi/dev/gbe.c b/sys/arch/sgi/dev/gbe.c index b142fb545b2..8efeeba9fd3 100644 --- a/sys/arch/sgi/dev/gbe.c +++ b/sys/arch/sgi/dev/gbe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gbe.c,v 1.17 2012/10/03 22:46:09 miod Exp $ */ +/* $OpenBSD: gbe.c,v 1.18 2013/05/27 19:37:45 miod Exp $ */ /* * Copyright (c) 2007, 2008, 2009 Joel Sing <jsing@openbsd.org> @@ -739,8 +739,8 @@ gbe_setup(struct gbe_softc *gsc) ((screen->depth >> 4) << GBE_FB_SIZE_TILE_DEPTH_SHIFT) | ((screen->width / tile_width) << GBE_FB_SIZE_TILE_WIDTH_SHIFT) | - ((screen->width % tile_width != 0) ? - (screen->height / GBE_TILE_HEIGHT) : 0)); + (((screen->width % tile_width) >> (screen->depth >> 4)) / + 32)); bus_space_write_4(gsc->iot, gsc->ioh, GBE_FB_SIZE_PIXEL, screen->height << GBE_FB_SIZE_PIXEL_HEIGHT_SHIFT); |