Author: mcayland Date: Mon Aug 19 09:40:35 2013 New Revision: 1216 URL: http://tracker.coreboot.org/trac/openbios/changeset/1216
Log: video: remove video_set_color()
Since all of the colour state is now held in Forth, remove the hack that was video_set_color(). Anything that needs to change the pallette (including MOL) can just call "color!" on the driver package.
Signed-off-by: Mark Cave-Ayland mark.cave-ayland@ilande.co.uk
Modified: trunk/openbios-devel/drivers/tcx.fs trunk/openbios-devel/drivers/vga.fs trunk/openbios-devel/forth/device/display.fs trunk/openbios-devel/include/libopenbios/video.h trunk/openbios-devel/libopenbios/video_common.c
Modified: trunk/openbios-devel/drivers/tcx.fs ============================================================================== --- trunk/openbios-devel/drivers/tcx.fs Mon Aug 19 09:40:33 2013 (r1215) +++ trunk/openbios-devel/drivers/tcx.fs Mon Aug 19 09:40:35 2013 (r1216) @@ -145,6 +145,8 @@
r dup 2dup bljoin r> tcx-dac + l!
;
+external + : color! ( r g b c# -- ) 0 dac! ( r g b ) swap rot ( b g r ) @@ -153,6 +155,8 @@ 4 dac! ( ) ;
+headerless + \ \ Mapping \ @@ -169,14 +173,6 @@ dac-map fb-map ;
-external - -: hw-set-color - color! -; - -headerless - \ \ Installation \
Modified: trunk/openbios-devel/drivers/vga.fs ============================================================================== --- trunk/openbios-devel/drivers/vga.fs Mon Aug 19 09:40:33 2013 (r1215) +++ trunk/openbios-devel/drivers/vga.fs Mon Aug 19 09:40:35 2013 (r1216) @@ -135,7 +135,7 @@ \ Perhaps for neatness this there should be a separate molvga.fs \ but let's leave it here for now.
-: hw-set-color ( r g b index -- ) +: color! ( r g b index -- ) mol-color! ;
@@ -143,16 +143,12 @@
\ Standard VGA
-: hw-set-color ( r g b index -- ) +: color! ( r g b index -- ) vga-color! ;
[THEN]
-: color! ( r g b index -- ) - hw-set-color -; - : fill-rectangle ( color_ind x y width height -- ) fb8-fillrect ; @@ -168,7 +164,7 @@ c@ swap 1+ \ ( table start r table-g ) dup c@ swap 1+ \ ( table start r g table-b ) c@ 3 pick \ ( table start r g b index ) - hw-set-color \ ( table start ) + color! \ ( table start ) 1+ swap 3 + swap \ ( table+3 start+1 ) loop
Modified: trunk/openbios-devel/forth/device/display.fs ============================================================================== --- trunk/openbios-devel/forth/device/display.fs Mon Aug 19 09:40:33 2013 (r1215) +++ trunk/openbios-devel/forth/device/display.fs Mon Aug 19 09:40:35 2013 (r1216) @@ -399,7 +399,7 @@ 1 pick @ ff00 and d# 8 rshift 2 pick @ ff and i - s" hw-set-color" $find if + s" color!" $find if execute else 2drop
Modified: trunk/openbios-devel/include/libopenbios/video.h ============================================================================== --- trunk/openbios-devel/include/libopenbios/video.h Mon Aug 19 09:40:33 2013 (r1215) +++ trunk/openbios-devel/include/libopenbios/video.h Mon Aug 19 09:40:35 2013 (r1216) @@ -21,7 +21,6 @@
void setup_video(void); unsigned long video_get_color(int col_ind); -void video_set_color(int ind, unsigned long color); void video_mask_blit(void); void video_invert_rect(void); void video_fill_rect(void);
Modified: trunk/openbios-devel/libopenbios/video_common.c ============================================================================== --- trunk/openbios-devel/libopenbios/video_common.c Mon Aug 19 09:40:33 2013 (r1215) +++ trunk/openbios-devel/libopenbios/video_common.c Mon Aug 19 09:40:35 2013 (r1216) @@ -43,35 +43,6 @@ return 0; }
-void -video_set_color( int ind, unsigned long color ) -{ - xt_t hw_xt = 0; - - if( !VIDEO_DICT_VALUE(video.ih) || ind < 0 || ind > 255 ) - return; - video.pal[ind] = color; - - /* Call the low-level hardware setter in the - display package */ - hw_xt = find_ih_method("hw-set-color", VIDEO_DICT_VALUE(video.ih)); - if (hw_xt) { - PUSH((color >> 16) & 0xff); // Red - PUSH((color >> 8) & 0xff); // Green - PUSH(color & 0xff); // Blue - PUSH(ind); - PUSH(hw_xt); - fword("execute"); - } - - /* Call the low-level palette update if required */ - hw_xt = find_ih_method("hw-refresh-palette", VIDEO_DICT_VALUE(video.ih)); - if (hw_xt) { - PUSH(hw_xt); - fword("execute"); - } -} - /* ( fbaddr maskaddr width height fgcolor bgcolor -- ) */
void