From: "Guomin Jiang" <guomin.jiang@intel.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: Andrew Fish <afish@apple.com>, "Ni, Ray" <ray.ni@intel.com>
Subject: Re: [edk2-devel] [PATCH 2/2] EmulatorPkg/EmuGopDxe: Set ModeInfo after Open successfully
Date: Thu, 24 Feb 2022 00:55:17 +0000 [thread overview]
Message-ID: <BN0PR11MB569615CA9A10A9DBE036FA6A9D3D9@BN0PR11MB5696.namprd11.prod.outlook.com> (raw)
In-Reply-To: <16D5FEACC0A8B3B7.28921@groups.io>
Hi Fish and Ray,
Can you help review it?
Thanks
Guomin
> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Guomin
> Jiang
> Sent: Tuesday, February 22, 2022 11:41 AM
> To: devel@edk2.groups.io
> Cc: Andrew Fish <afish@apple.com>; Ni, Ray <ray.ni@intel.com>
> Subject: [edk2-devel] [PATCH 2/2] EmulatorPkg/EmuGopDxe: Set ModeInfo
> after Open successfully
>
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2668
>
> WindowOpen will fail in some case. for example, without XServer.
>
> Shouldn't set ModeInfo in this case to avoid the caller use it incorrectly
>
> Cc: Andrew Fish <afish@apple.com>
> Cc: Ray Ni <ray.ni@intel.com>
> Signed-off-by: Guomin Jiang <guomin.jiang@intel.com>
> ---
> EmulatorPkg/EmuGopDxe/GopScreen.c | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/EmulatorPkg/EmuGopDxe/GopScreen.c
> b/EmulatorPkg/EmuGopDxe/GopScreen.c
> index 41f748bc6402..ec5ef795d6e5 100644
> --- a/EmulatorPkg/EmuGopDxe/GopScreen.c
> +++ b/EmulatorPkg/EmuGopDxe/GopScreen.c
> @@ -108,10 +108,6 @@ EmuGopSetMode (
> }
>
> ModeData = &Private->ModeData[ModeNumber];
> - This->Mode->Mode = ModeNumber;
> - Private->GraphicsOutput.Mode->Info->HorizontalResolution = ModeData-
> >HorizontalResolution;
> - Private->GraphicsOutput.Mode->Info->VerticalResolution = ModeData-
> >VerticalResolution;
> - Private->GraphicsOutput.Mode->Info->PixelsPerScanLine = ModeData-
> >HorizontalResolution;
>
> if (Private->HardwareNeedsStarting) {
> Status = EmuGopStartWindow (
> @@ -128,6 +124,11 @@ EmuGopSetMode (
> Private->HardwareNeedsStarting = FALSE;
> }
>
> + This->Mode->Mode = ModeNumber;
> + Private->GraphicsOutput.Mode->Info->HorizontalResolution = ModeData-
> >HorizontalResolution;
> + Private->GraphicsOutput.Mode->Info->VerticalResolution = ModeData-
> >VerticalResolution;
> + Private->GraphicsOutput.Mode->Info->PixelsPerScanLine = ModeData-
> >HorizontalResolution;
> +
> Status = Private->EmuGraphicsWindow->Size (
> Private->EmuGraphicsWindow,
> ModeData->HorizontalResolution,
> --
> 2.35.1.windows.2
>
>
>
>
>
next prev parent reply other threads:[~2022-02-24 0:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-22 3:40 [PATCH 0/2] Avoid Emulator Segmentation fault Guomin Jiang
2022-02-22 3:40 ` [PATCH 1/2] MdeModulePkg/GraphicsConsoleDxe: Check status to make sure no error Guomin Jiang
2022-02-22 3:40 ` [PATCH 2/2] EmulatorPkg/EmuGopDxe: Set ModeInfo after Open successfully Guomin Jiang
2022-03-01 7:16 ` Ni, Ray
[not found] ` <16D5FEACC0A8B3B7.28921@groups.io>
2022-02-24 0:55 ` Guomin Jiang [this message]
[not found] ` <16D5FEAC9A733E6B.24964@groups.io>
2022-02-24 0:56 ` [edk2-devel] [PATCH 1/2] MdeModulePkg/GraphicsConsoleDxe: Check status to make sure no error Guomin Jiang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=BN0PR11MB569615CA9A10A9DBE036FA6A9D3D9@BN0PR11MB5696.namprd11.prod.outlook.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox