B_SET_INDEXED_COLORS is now working correctly for B_CMAP8, IOW you can now use

8 bit modes with this driver as well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17339 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2006-05-05 16:17:11 +00:00
parent 2bbc6df8dc
commit 94f8a931c8
2 changed files with 14 additions and 2 deletions

View File

@ -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)

View File

@ -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);
}
}