diff --git a/drivers/base/bootvid/i386/pc/pc.h b/drivers/base/bootvid/i386/pc/pc.h index c1a96e797a6..c299a1ecd81 100644 --- a/drivers/base/bootvid/i386/pc/pc.h +++ b/drivers/base/bootvid/i386/pc/pc.h @@ -43,8 +43,11 @@ SetPixel( /* Select the bitmask register and write the mask */ __outpw(VGA_BASE_IO_PORT + GRAPH_ADDRESS_PORT, (PixelMask[Left & 7] << 8) | IND_BIT_MASK); - /* Read the current pixel value and add our color */ - WRITE_REGISTER_UCHAR(PixelPosition, READ_REGISTER_UCHAR(PixelPosition) & Color); + /* Dummy read to load latch registers */ + (VOID)READ_REGISTER_UCHAR(PixelPosition); + + /* Set the new color */ + WRITE_REGISTER_UCHAR(PixelPosition, Color); } VOID diff --git a/drivers/base/bootvid/i386/pc/vga.c b/drivers/base/bootvid/i386/pc/vga.c index b985bc68eb1..3f6c9bc703c 100644 --- a/drivers/base/bootvid/i386/pc/vga.c +++ b/drivers/base/bootvid/i386/pc/vga.c @@ -94,6 +94,8 @@ PrepareForSetPixel(VOID) do { \ /* Select the bitmask register and write the mask */ \ __outpw(VGA_BASE_IO_PORT + GRAPH_ADDRESS_PORT, ((_PixelMask) << 8) | IND_BIT_MASK); \ + /* Dummy read to load latch registers */ \ + (VOID)READ_REGISTER_UCHAR((_PixelPtr)); \ /* Set the new color */ \ WRITE_REGISTER_UCHAR((_PixelPtr), (UCHAR)(_TextColor)); \ } while (0);