[SeaBIOS] [PATCH] bochsvga: fallback to stdvga if dispi interface isn't present

Kevin O'Connor kevin at koconnor.net
Thu Sep 5 14:47:02 CEST 2013


On Thu, Sep 05, 2013 at 11:18:48AM +0200, Gerd Hoffmann wrote:
> Signed-off-by: Gerd Hoffmann <kraxel at redhat.com>
> ---
>  vgasrc/bochsvga.c | 67 +++++++++++++++++++++++++++++++++++++++----------------
>  1 file changed, 48 insertions(+), 19 deletions(-)
> 
> diff --git a/vgasrc/bochsvga.c b/vgasrc/bochsvga.c
> index b0ba1ec..9a0479c 100644
> --- a/vgasrc/bochsvga.c
> +++ b/vgasrc/bochsvga.c
> @@ -91,6 +91,8 @@ static struct bochsvga_mode
>      { 0x18c, { MM_DIRECT, 2560, 1600, 32, 8, 16, SEG_GRAPH } },
>  };
>  
> +static int dispi_found VAR16 = 0;
> +
>  static int is_bochsvga_mode(struct vgamode_s *vmode_g)
>  {
>      return (vmode_g >= &bochsvga_modes[0].info
> @@ -100,9 +102,10 @@ static int is_bochsvga_mode(struct vgamode_s *vmode_g)
>  struct vgamode_s *bochsvga_find_mode(int mode)
>  {
>      struct bochsvga_mode *m = bochsvga_modes;
> -    for (; m < &bochsvga_modes[ARRAY_SIZE(bochsvga_modes)]; m++)
> -        if (GET_GLOBAL(m->mode) == mode)
> -            return &m->info;
> +    if (dispi_found)

This needs to be GET_GLOBAL(dispi_found).  Otherwise, it is okay with
me.

-Kevin



More information about the SeaBIOS mailing list