Hack against the blank console problem:
Leave the CLUT alone on ancient cards. At least this leaves us with a semi working console (red and blue are flipped). Leave an example of what seems to be happening but disable it because colors are better than 444 bit greyscale.
This commit is contained in:
parent
786a747d1e
commit
80cc774264
|
@ -181,12 +181,36 @@ static void legacy_crtc_load_lut(struct drm_crtc *crtc)
|
|||
dac2_cntl |= RADEON_DAC2_PALETTE_ACC_CTL;
|
||||
WREG32(RADEON_DAC_CNTL2, dac2_cntl);
|
||||
|
||||
WREG8(RADEON_PALETTE_INDEX, 0);
|
||||
for (i = 0; i < 256; i++) {
|
||||
WREG32(RADEON_PALETTE_30_DATA,
|
||||
(radeon_crtc->lut_r[i] << 20) |
|
||||
(radeon_crtc->lut_g[i] << 10) |
|
||||
(radeon_crtc->lut_b[i] << 0));
|
||||
/*
|
||||
* At least the RV100 [vendor 1002 product 515e (rev. 0x02)]
|
||||
* has an old style palette
|
||||
*/
|
||||
if (ASIC_IS_RV100(rdev)) {
|
||||
#ifdef notyet
|
||||
/*
|
||||
* Leave CLUT alone for now. The code below gives us a
|
||||
* nice 444 grayscale, but we are not in true color mode
|
||||
* anymore and I don't have any docs how to do this right.
|
||||
*/
|
||||
WREG8(RADEON_PALETTE_INDEX, 0);
|
||||
for (i = 0; i < 256; i++) {
|
||||
#define R(x) (radeon_crtc->lut_r[i] >> 2)
|
||||
#define G(x) (radeon_crtc->lut_g[i] >> 2)
|
||||
#define B(x) (radeon_crtc->lut_b[i] >> 2)
|
||||
WREG32(RADEON_PALETTE_DATA, ((R(i) << 16)
|
||||
| (G(i) << 8) | B(i)) << 4);
|
||||
}
|
||||
#else
|
||||
printf("%s: unknown DAC, can't set lookup table\n", __func__);
|
||||
#endif
|
||||
} else {
|
||||
WREG8(RADEON_PALETTE_INDEX, 0);
|
||||
for (i = 0; i < 256; i++) {
|
||||
WREG32(RADEON_PALETTE_30_DATA,
|
||||
(radeon_crtc->lut_r[i] << 20) |
|
||||
(radeon_crtc->lut_g[i] << 10) |
|
||||
(radeon_crtc->lut_b[i] << 0));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue