diff --git a/headers/private/graphics/intel_extreme/intel_extreme.h b/headers/private/graphics/intel_extreme/intel_extreme.h index 8fc3ae73ee..23df8cd13b 100644 --- a/headers/private/graphics/intel_extreme/intel_extreme.h +++ b/headers/private/graphics/intel_extreme/intel_extreme.h @@ -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) diff --git a/src/add-ons/accelerants/intel_extreme/mode.cpp b/src/add-ons/accelerants/intel_extreme/mode.cpp index 5cf2a1ed42..6cf97ab5a5 100644 --- a/src/add-ons/accelerants/intel_extreme/mode.cpp +++ b/src/add-ons/accelerants/intel_extreme/mode.cpp @@ -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); } }