graphics: Fix GXPix* assignment
authorMatt Fleming <matt.fleming@intel.com>
Tue, 3 Apr 2012 14:30:58 +0000 (15:30 +0100)
committerMatt Fleming <matt.fleming@intel.com>
Tue, 17 Apr 2012 09:58:35 +0000 (10:58 +0100)
commit085157ac96ce448efa69b864863869bdeb4e485e
tree0b05795be3fc16bc8e5fb8390cc5f7a9277a1144
parent9da94301c4986c2085e0e7b7f4551915dc4f3786
graphics: Fix GXPix* assignment

We need assign cols/rows to GXPixCols/GXPixRows separately, we can't
rely on the compiler writing the 32-bit value to two consecutive
16-bit memory locations like the assembly version did. The value we
were storing was actually being truncated by the compiler (see the
warning below),

Also fixup the following warnings,

graphics.c: In function ‘vgasetmode’:
graphics.c:95:18: warning: cast from pointer to integer of different size
graphics.c:102:2: warning: large integer implicitly truncated to unsigned type
graphics.c: In function ‘outputvga’:
graphics.c:222:12: warning: cast from pointer to integer of different size
graphics.c:227:11: warning: cast from pointer to integer of different size
graphics.c: In function ‘vgadisplayfile’:
graphics.c:303:4: warning: passing argument 1 of ‘outputvga’ from incompatible pointer type
graphics.c:213:13: note: expected ‘uint32_t *’ but argument is of type ‘uint8_t *’

Signed-off-by: Matt Fleming <matt.fleming@intel.com>
core/graphics.c