[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 2/2] efi/boot: make sure chosen mode is set even if firmware tell it is



On 03.10.2019 15:49, Igor Druzhinin wrote:
> If a bootloader is using native driver instead of EFI GOP it might
> reset graphics mode to be different from what firmware thinks it
> currently is. Set chosen mode unconditionally to fix this possible
> misalignment.
> 
> Observed with EFI GRUB2 compiled with all possible video drivers where
> native drivers take priority over firmware.

I don't think this case can happen with just plain EFI. Therefore ...

> Signed-off-by: Igor Druzhinin <igor.druzhinin@xxxxxxxxxx>
> ---
>  xen/common/efi/boot.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/xen/common/efi/boot.c b/xen/common/efi/boot.c
> index 933db88..4067721 100644
> --- a/xen/common/efi/boot.c
> +++ b/xen/common/efi/boot.c
> @@ -1052,7 +1052,7 @@ static void __init 
> efi_set_gop_mode(EFI_GRAPHICS_OUTPUT_PROTOCOL *gop, UINTN gop
>      UINTN info_size;
>  
>      /* Set graphics mode. */
> -    if ( gop_mode < gop->Mode->MaxMode && gop_mode != gop->Mode->Mode )
> +    if ( gop_mode < gop->Mode->MaxMode )
>          gop->SetMode(gop, gop_mode);

... rather than deleting the right side of the && I'd like to
suggest to extend to to take effect only when coming straight
from EFI (i.e. EFI_LOADER set in efi_flags). The comment then
should be extended to explain why this is. (Reason being that
I'd prefer to avoid mode switches unless they're needed for
a certain reason.)

Jan

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.