diff --git a/headers/private/graphics/intel_extreme/intel_extreme.h b/headers/private/graphics/intel_extreme/intel_extreme.h index 0fcd88ff26..dfec428ff2 100644 --- a/headers/private/graphics/intel_extreme/intel_extreme.h +++ b/headers/private/graphics/intel_extreme/intel_extreme.h @@ -172,6 +172,8 @@ struct intel_free_graphics_memory { #define DISPLAY_CONTROL_RGB16 (5UL << 26) #define DISPLAY_CONTROL_RGB32 (7UL << 26) +#define INTEL_DISPLAY_PALETTE 0x0a000 + #define INTEL_DISPLAY_PIPE_CONTROL 0x70008 #define DISPLAY_PIPE_ENABLED (1UL << 31) diff --git a/src/add-ons/accelerants/intel_extreme/mode.cpp b/src/add-ons/accelerants/intel_extreme/mode.cpp index f45a096c1a..b9f93da772 100644 --- a/src/add-ons/accelerants/intel_extreme/mode.cpp +++ b/src/add-ons/accelerants/intel_extreme/mode.cpp @@ -386,8 +386,18 @@ intel_get_timing_constraints(display_timing_constraints *constraints) void -intel_set_indexed_colors(uint count, uint8 first, uint8 *colorData, uint32 flags) +intel_set_indexed_colors(uint count, uint8 first, uint8 *colors, uint32 flags) { - TRACE(("intel_set_indexed_colors()\n")); + TRACE(("intel_set_indexed_colors(colors = %p, first = %u)\n", colors, first)); + + if (colors == NULL) + return; + + for (; count-- > 0; first++) { + uint32 color = colors[0] << 16 | colors[1] << 8 | colors[2]; + colors += 3; + + write32(INTEL_DISPLAY_PALETTE + first * sizeof(uint32), color); + } }