]> git.proxmox.com Git - mirror_edk2.git/commit
MdeModulePkg/FrameBufferBltLib: Fix a bug causing display corrupted
authorRuiyu Ni <ruiyu.ni@intel.com>
Mon, 15 Jan 2018 03:43:33 +0000 (11:43 +0800)
committerRuiyu Ni <ruiyu.ni@intel.com>
Tue, 16 Jan 2018 05:26:55 +0000 (13:26 +0800)
commit5ae0723355962166cce0bec2a5453e5c70ffb40e
treeea6baeb3222d6d2733f018cd192e9c6a2bf397f1
parent043944c5505500ed2cf0fc34e1417ccbc0aff0d2
MdeModulePkg/FrameBufferBltLib: Fix a bug causing display corrupted

The Graphics Output Protocol's mode information specifies the
PixelsPerScanLine property. Most of the time this is identical to
HorizontalResolution. However, due to alignment requirements etc. it
may be slightly larger. I.e. each scan line will have some "pixels"
that are not visible on the screen but consume space in the frame
buffer.

If the graphics output protocol correctly initializes
HorizontalResolution to 1366 and PixelsPerScanLine to 1376. As a
result the graphics output is broken.

If setting HorizontalResolution to 1376 instead, the output is fine
(except for 10 invisible pixels on the right of the screen).

The patch fixes this bug by using PixelsPerScanLine when calculating
the line width.

Contributed-under: TianoCore Contribution Agreement 1.1
Reported-by: Christian Ehrhardt <ehrhardt@genua.de>
Signed-off-by: Christian Ehrhardt <ehrhardt@genua.de>
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Christian Ehrhardt <ehrhardt@genua.de>
Reviewed-by: Star Zeng <star.zeng@intel.com>
Tested-by: Christian Ehrhardt <ehrhardt@genua.de>
MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.c