Applied patch by Gerald Zajac:
* Fix for a problem of the ProSavage chip when VESA ran 32 bit before. * Better error codes in SetDisplayMode(). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28816 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -332,10 +332,10 @@ SetDisplayMode(display_mode* pMode)
|
|||||||
|
|
||||||
uint32 maxPixelClock;
|
uint32 maxPixelClock;
|
||||||
if ( ! gInfo.GetColorSpaceParams(mode.space, mode.bpp, maxPixelClock))
|
if ( ! gInfo.GetColorSpaceParams(mode.space, mode.bpp, maxPixelClock))
|
||||||
return B_ERROR;
|
return B_BAD_VALUE;
|
||||||
|
|
||||||
if (ProposeDisplayMode(&mode, pMode, pMode) != B_OK)
|
if (ProposeDisplayMode(&mode, pMode, pMode) != B_OK)
|
||||||
return B_ERROR;
|
return B_BAD_VALUE;
|
||||||
|
|
||||||
// Note that for some Savage chips, accelerated drawing is badly messed up
|
// Note that for some Savage chips, accelerated drawing is badly messed up
|
||||||
// when the display width is 1400 because 1400 is not evenly divisible by 32.
|
// when the display width is 1400 because 1400 is not evenly divisible by 32.
|
||||||
@@ -357,7 +357,7 @@ SetDisplayMode(display_mode* pMode)
|
|||||||
// Is there enough frame buffer memory for this mode?
|
// Is there enough frame buffer memory for this mode?
|
||||||
|
|
||||||
if ( ! IsThereEnoughFBMemory(&mode, mode.bpp))
|
if ( ! IsThereEnoughFBMemory(&mode, mode.bpp))
|
||||||
return B_ERROR;
|
return B_NO_MEMORY;
|
||||||
|
|
||||||
TRACE("Set display mode: %dx%d virtual size: %dx%d color depth: %d bpp\n",
|
TRACE("Set display mode: %dx%d virtual size: %dx%d color depth: %d bpp\n",
|
||||||
mode.timing.h_display, mode.timing.v_display,
|
mode.timing.h_display, mode.timing.v_display,
|
||||||
|
|||||||
@@ -525,10 +525,14 @@ Savage_WriteMode(const DisplayModeEx& mode, const SavageRegRec& regRec)
|
|||||||
WriteCrtcReg(0x67, regRec.CR67 & ~0x0e); // no STREAMS yet old and new
|
WriteCrtcReg(0x67, regRec.CR67 & ~0x0e); // no STREAMS yet old and new
|
||||||
|
|
||||||
// Set register SR19 to zero so that the ProSavage chips will start up
|
// Set register SR19 to zero so that the ProSavage chips will start up
|
||||||
// when booting under BeOS using the default boot screen.
|
// when booting under BeOS using the default boot screen, and set register
|
||||||
|
// CR5F to zero so that the ProSavage chips will start up when Haiku boot
|
||||||
|
// screen had a depth of 32 bits/pixel
|
||||||
|
|
||||||
if (si.chipType == S3_PROSAVAGE || si.chipType == S3_TWISTER)
|
if (si.chipType == S3_PROSAVAGE || si.chipType == S3_TWISTER) {
|
||||||
WriteSeqReg(0x19, 0);
|
WriteSeqReg(0x19, 0);
|
||||||
|
WriteCrtcReg(0x5f, 0);
|
||||||
|
}
|
||||||
|
|
||||||
// Clear bit 3 in SR30 so that Savage MX chip will startup. If bit 3 is
|
// Clear bit 3 in SR30 so that Savage MX chip will startup. If bit 3 is
|
||||||
// not cleared, it will startup only if booting under BeOS using the
|
// not cleared, it will startup only if booting under BeOS using the
|
||||||
|
|||||||
Reference in New Issue
Block a user