Add indexed color mode support for SandyBridge.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42851 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -254,6 +254,8 @@ struct intel_free_graphics_memory {
|
||||
#define PCH_TRANSCODER_B_VTOTAL 0xe100c // INTEL_DISPLAY_B_VTOTAL
|
||||
#define PCH_TRANSCODER_B_VBLANK 0xe1010 // INTEL_DISPLAY_B_VBLANK
|
||||
#define PCH_TRANSCODER_B_VSYNC 0xe1014 // INTEL_DISPLAY_B_VSYNC
|
||||
#define PCH_DISPLAY_A_PALETTE 0x4a000 // INTEL_DISPLAY_A_PALETTE
|
||||
#define PCH_DISPLAY_B_PALETTE 0x4a800 // INTEL_DISPLAY_B_PALETTE
|
||||
|
||||
#define PCH_LVDS_DETECTED (1 << 1)
|
||||
#define PCH_INTERRUPT_VBLANK_PIPEA (1 << 7)
|
||||
|
||||
@@ -1259,8 +1259,11 @@ intel_set_indexed_colors(uint count, uint8 first, uint8 *colors, uint32 flags)
|
||||
uint32 color = colors[0] << 16 | colors[1] << 8 | colors[2];
|
||||
colors += 3;
|
||||
|
||||
write32(INTEL_DISPLAY_A_PALETTE + first * sizeof(uint32), color);
|
||||
write32(INTEL_DISPLAY_B_PALETTE + first * sizeof(uint32), color);
|
||||
bool isSNB = gInfo->shared_info->device_type.InGroup(INTEL_TYPE_SNB);
|
||||
write32((isSNB ? PCH_DISPLAY_A_PALETTE : INTEL_DISPLAY_A_PALETTE)
|
||||
+ first * sizeof(uint32), color);
|
||||
write32((isSNB ? PCH_DISPLAY_B_PALETTE : INTEL_DISPLAY_B_PALETTE)
|
||||
+ first * sizeof(uint32), color);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user