From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from ma1-aaemail-dr-lapp03.apple.com (ma1-aaemail-dr-lapp03.apple.com [17.171.2.72]) by mx.groups.io with SMTP id smtpd.web12.624.1623885756521630751 for ; Wed, 16 Jun 2021 16:22:36 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@apple.com header.s=20180706 header.b=EHPM50QW; spf=pass (domain: apple.com, ip: 17.171.2.72, mailfrom: afish@apple.com) Received: from pps.filterd (ma1-aaemail-dr-lapp03.apple.com [127.0.0.1]) by ma1-aaemail-dr-lapp03.apple.com (8.16.0.42/8.16.0.42) with SMTP id 15GNDvDB006497; Wed, 16 Jun 2021 16:22:34 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=apple.com; h=from : content-type : mime-version : subject : date : references : to : in-reply-to : message-id; s=20180706; bh=19XbuNHefG6t4OQpgQzog2uiw/Nli7l3L6W+u3RIHgE=; b=EHPM50QWqi/dC1PJHnLqx3OOAaL4qxH33trYC/8jtwESCUDUCNggexXFArYJz5Dggj3U qzs/JWNaujNjecvCbEhSrdxvWigpIyfnUYGhRrWPLaZvxN62C5KOFt/6jRFMDGAEIHVq cFb7B0hyvYhJ6IwNZDSu1AqoNoekk8gzQPT2ZoXFPtBT5JJTQPuf6lfL5jfaiQ7I1Oc+ Th3w34VmJJnFhNoWDiXIGmglaHuFKr5iEM/BUkrTAB4Qd3kDte//RYZ7mQ/JCME8O52C RBl3hgPF946HrpyP/FM7fN+CnwQYUz0cukOcb6FwgTK1XYoLbt6kFvgeKAW5+X0W0xv+ 8Q== Received: from rn-mailsvcp-mta-lapp04.rno.apple.com (rn-mailsvcp-mta-lapp04.rno.apple.com [10.225.203.152]) by ma1-aaemail-dr-lapp03.apple.com with ESMTP id 394uww43n8-13 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Wed, 16 Jun 2021 16:22:34 -0700 Received: from rn-mailsvcp-mmp-lapp03.rno.apple.com (rn-mailsvcp-mmp-lapp03.rno.apple.com [17.179.253.16]) by rn-mailsvcp-mta-lapp04.rno.apple.com (Oracle Communications Messaging Server 8.1.0.9.20210415 64bit (built Apr 15 2021)) with ESMTPS id <0QUT0118QI9J6WD0@rn-mailsvcp-mta-lapp04.rno.apple.com>; Wed, 16 Jun 2021 16:22:31 -0700 (PDT) Received: from process_milters-daemon.rn-mailsvcp-mmp-lapp03.rno.apple.com by rn-mailsvcp-mmp-lapp03.rno.apple.com (Oracle Communications Messaging Server 8.1.0.9.20210415 64bit (built Apr 15 2021)) id <0QUT01100HQJQL00@rn-mailsvcp-mmp-lapp03.rno.apple.com>; Wed, 16 Jun 2021 16:22:31 -0700 (PDT) X-Va-A: X-Va-T-CD: e033a39d32a7e01591098f400fc58987 X-Va-E-CD: a3857b96301d98915c3968a15e78b24b X-Va-R-CD: fc498e96c1b8401f5b73c9928f64ef5b X-Va-CD: 0 X-Va-ID: 2ff09db1-f746-4154-b03b-41a9e52b3964 X-V-A: X-V-T-CD: e033a39d32a7e01591098f400fc58987 X-V-E-CD: a3857b96301d98915c3968a15e78b24b X-V-R-CD: fc498e96c1b8401f5b73c9928f64ef5b X-V-CD: 0 X-V-ID: 5ac30070-b617-47db-bd6a-f00e83c68993 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391,18.0.790 definitions=2021-06-16_16:2021-06-15,2021-06-16 signatures=0 Received: from [17.235.9.84] (unknown [17.235.9.84]) by rn-mailsvcp-mmp-lapp03.rno.apple.com (Oracle Communications Messaging Server 8.1.0.9.20210415 64bit (built Apr 15 2021)) with ESMTPSA id <0QUT00BDNI9JH300@rn-mailsvcp-mmp-lapp03.rno.apple.com>; Wed, 16 Jun 2021 16:22:31 -0700 (PDT) From: "Andrew Fish" MIME-version: 1.0 (Mac OS X Mail 14.0 \(3654.20.0.2.1\)) Subject: Re: [edk2-devel] SIMPLE_TEXT_OUTPUT_PROTOCOL and Video Resolution Date: Wed, 16 Jun 2021 16:22:30 -0700 References: <1688FC67A39CB5DB.19105@groups.io> To: edk2-devel-groups-io , df7729@gmail.com In-reply-to: Message-id: X-Mailer: Apple Mail (2.3654.20.0.2.1) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391,18.0.790 definitions=2021-06-16_16:2021-06-15,2021-06-16 signatures=0 Content-type: multipart/alternative; boundary="Apple-Mail=_7E854303-92AB-455D-901E-1C29B149CB79" --Apple-Mail=_7E854303-92AB-455D-901E-1C29B149CB79 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On Jun 16, 2021, at 2:45 PM, David F. wrote: >=20 > Also, I found if there are 2 GOP handles and you change the mode of > one, the other one doesn't reflect the change (but still doesn't solve > anything with the original question), are you supposed to set the mode > on every handle to keep that part in sync? >=20 A common implementation is to have the Conspliter [1] driver that produces= virtual handles that aggregate how many actual devices you have and manage= s policy.=20 You should grab the protocols on the gST->ConsoleOutHandle as these are th= e Spec defined active console devices.=20 In terms on Simple Text Output Protocol on Graphics this is the default dr= iver in edk2 [2]. These are the config knobs you can set from your DSC file= to control defaults.=20 [Pcd] gEfiMdeModulePkgTokenSpaceGuid.PcdVideoHorizontalResolution ## SOMETIMES= _CONSUMES gEfiMdeModulePkgTokenSpaceGuid.PcdVideoVerticalResolution ## SOMETIMES= _CONSUMES gEfiMdeModulePkgTokenSpaceGuid.PcdConOutRow ## SOMETIMES= _CONSUMES gEfiMdeModulePkgTokenSpaceGuid.PcdConOutColumn ## SOMETIMES= _CONSUMES Note: If you have serial active that may mess with the Conspliter and forc= e it to pick a lower resolution since it has to find the best match between= the serial and graphics Simple Text In. So try the Graphics without the se= rial terminal connect to see if it does different stuff.=20 [1] https://github.com/tianocore/edk2/tree/master/MdeModulePkg/Universal/C= onsole/ConSplitterDxe [2] https://github.com/tianocore/edk2/tree/master/MdeModulePkg/Universal/C= onsole/GraphicsConsoleDxe Thanks, Andrew Fish > On Tue, Jun 15, 2021 at 11:33 PM David F. via groups.io > wrote: >>=20 >> Hello, >>=20 >> I've found that most implementation of UEFI don't automatically change >> the resolution when setting the mode with STOP (Simple Text Output >> Protocol) . You can use GOP to change it after the mode but that >> causes other problems. For example, using surface pro 7 in this case, >> with 4K screen. The default text mode is 342x96 which puts it in >> 2736x1824 mode which you'd expect and the text is tiny. But now you >> set the mode to 0 which is 80x25 and it actually sets the mode to >> 2736x1824 if not already in that resolution and uses a 80x25 area in >> the center of the screen, still tiny text you can hardly read. If you >> then say you want GOP in 640x480 mode (which is available as GOP mode >> 1 on this system, it will make the font larger but you can't see >> anything because it's still offset to the middle of the 2736x1824 area >> and you're only seeing the 640x480 upper left of that area on the >> screen. Likewise if you have it in 342x96 so it's fully in the upper >> left corner of the screen and change the mode to say 800x600 >> (available as GOP mode 2 on this system) it will make the text >> readable but the text can go off the screen in both directions because >> it's still 342x96 when the 100x31 STOP mode would be the correct one >> (which happens to be mode 2 on this system). >>=20 >> Shouldn't setting the STOP mode handle adjusting the resolution since >> that's the main reason you want to change the mode so the size shown >> on the screen changes to something you can read. >>=20 >> Any tricks? I've tried a bunch of things, resetting the controller, >> using the Reset() protocol function, and other things but nothing >> works. As soon as you use STOP to set the mode, it is back to high >> resolution and using an area centered in the screen and changing the >> resolution after that leaves it in the area centered in the high res >> screen and not in the upper left area. >>=20 >> Thanks. >>=20 >=20 >=20 >=20 >=20 >=20 --Apple-Mail=_7E854303-92AB-455D-901E-1C29B149CB79 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii
On Jun 16= , 2021, at 2:45 PM, David F. <df7729@gmail.com> wrote:

Also, I found if there are 2 GOP h= andles and you change the mode of
one, the other one doesn't = reflect the change (but still doesn't solve
anything with the= original question), are you supposed to set the mode
on ever= y handle to keep that part in sync?


A common implementation is to= have the Conspliter [1] driver that produces virtual handles that aggregat= e how many actual devices you have and manages policy. 

You should grab the protocols on the gST->ConsoleO= utHandle as these are the Spec defined active console devices. 
<= div>

In terms on Simple = Text Output Protocol on Graphics this is the default driver in edk2 [2]. Th= ese are the config knobs you can set from your DSC file to control defaults= . 

gEfiMdeModulePkgTokenSpaceGuid.PcdVideoHoriz= ontalResolution ## SOMETIMES_CONSUMES gEfiMdeModulePkgTokenSpaceGuid.PcdVideoVerti= calResolution ## SOMETIMES_CONSUMES gEfiMdeModulePkgTokenSpaceGuid.PcdConOutRow = ## SOMETIMES_CONSUMES gEfiMdeModulePkgTokenSpaceGuid.PcdConOutColu= mn ## SOMETIMES_CONSUMES
[Pcd]
Note: If you have serial active that may mess with the C= onspliter and force it to pick a lower resolution since it has to find the = best match between the serial and graphics Simple Text In. So try the Graph= ics without the serial terminal connect to see if it does different stuff.&= nbsp;





Thanks,

Andrew Fish

On Tue, Jun 15, 2021 at 11:33 PM David F. via groups.io
<df7729=3Dgmail.com@groups.io> wr= ote:

Hell= o,

I've found that most implementation of UEFI= don't automatically change
the resolution when setting the m= ode with STOP (Simple Text Output
Protocol) .  You can u= se GOP to change it after the mode but that
causes other prob= lems.  For example, using surface pro 7 in this case,
wi= th 4K screen.  The default text mode is 342x96 which puts it in
2736x1824 mode which you'd expect and the text is tiny.  But n= ow you
set the mode to 0 which is 80x25 and it actually sets = the mode to
2736x1824 if not already in that resolution and u= ses a 80x25 area in
the center of the screen, still tiny text= you can hardly read.  If you
then say you want GOP in 6= 40x480 mode (which is available as GOP mode
1 on this system,= it will make the font larger but you can't see
anything beca= use it's still offset to the middle of the 2736x1824 area
and= you're only seeing the 640x480 upper left of that area on the
screen.   Likewise if you have it in 342x96 so it's fully in th= e upper
left corner of the screen and change the mode to say = 800x600
(available as GOP mode 2 on this system) it will make= the text
readable but the text can go off the screen in both= directions because
it's still 342x96 when the 100x31 STOP mo= de would be the correct one
(which happens to be mode 2 on th= is system).

Shouldn't setting the STOP mode ha= ndle adjusting the resolution since
that's the main reason yo= u want to change the mode so the size shown
on the screen cha= nges to something you can read.

Any tricks? I'= ve tried a bunch of things, resetting the controller,
using t= he Reset() protocol function, and other things but nothing
wo= rks.  As soon as you use STOP to set the mode, it is back to high
resolution and using an area centered in the screen and changing = the
resolution after that leaves it in the area centered in t= he high res
screen and not in the upper left area.

Thanks.






--Apple-Mail=_7E854303-92AB-455D-901E-1C29B149CB79--