<p>Nico Huber has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/22707">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">Add Tiling setting to Framebuffer<br><br>Beside linear framebuffers, we can, on Intel hardware, easily support X<br>and Y tiled framebuffers too. If we access the framebuffer through the<br>aperture window, we can let the hardware handle the tiling.<br><br>Tiling generally divides the framebuffer into rectangular pieces of<br>fixed size where each piece, or tile, is represented by one page of<br>memory. Even inside one tile, the pixels are not always ordered linearly<br>but either in a row-major (aka. X tiled) or column-major (aka. Y tiled)<br>manner.<br><br>Change-Id: I3e6f93caa8f2485a5792d72cfe2e8b3902add7a3<br>Signed-off-by: Nico Huber <nico.h@gmx.de><br>---<br>M common/hw-gfx.ads<br>M gfxtest/hw-gfx-gma-gfx_test.adb<br>2 files changed, 15 insertions(+), 10 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/libgfxinit refs/changes/07/22707/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/common/hw-gfx.ads b/common/hw-gfx.ads<br>index daf648d..ae19235 100644<br>--- a/common/hw-gfx.ads<br>+++ b/common/hw-gfx.ads<br>@@ -27,24 +27,28 @@<br> Auto_BPC : constant := 5;<br> subtype BPC_Type is Int64 range Auto_BPC .. 16;<br> <br>+ type Tiling_Type is (Linear, X_Tiled, Y_Tiled);<br>+<br> type Framebuffer_Type is<br> record<br>- Width : Width_Type;<br>- Height : Height_Type;<br>- BPC : BPC_Type;<br>- Stride : Width_Type;<br>- Offset : Word32;<br>+ Width : Width_Type;<br>+ Height : Height_Type;<br>+ BPC : BPC_Type;<br>+ Stride : Width_Type;<br>+ Tiling : Tiling_Type;<br>+ Offset : Word32;<br> end record;<br> <br> function FB_Size (FB : Framebuffer_Type) return Pos32 is<br> (FB.Stride * FB.Height * Pos32 (FB.BPC) / (8 / 4));<br> <br> Default_FB : constant Framebuffer_Type := Framebuffer_Type'<br>- (Width => 1,<br>- Height => 1,<br>- BPC => 8,<br>- Stride => 1,<br>- Offset => 0);<br>+ (Width => 1,<br>+ Height => 1,<br>+ BPC => 8,<br>+ Stride => 1,<br>+ Tiling => Linear,<br>+ Offset => 0);<br> <br> subtype Frequency_Type is Pos64 range 24_000_000 .. 600_000_000;<br> <br>diff --git a/gfxtest/hw-gfx-gma-gfx_test.adb b/gfxtest/hw-gfx-gma-gfx_test.adb<br>index d870401..ef6c91d 100644<br>--- a/gfxtest/hw-gfx-gma-gfx_test.adb<br>+++ b/gfxtest/hw-gfx-gma-gfx_test.adb<br>@@ -157,6 +157,7 @@<br> Height => Height_Type (Mode.V_Visible),<br> BPC => 8,<br> Stride => Width_Type ((Word32 (Mode.H_Visible) + 15) and not 15),<br>+ Tiling => Linear,<br> Offset => Offset);<br> Offset := Offset + Word32 (FB.Stride * FB.Height * 4);<br> end Calc_Framebuffer;<br></pre><p>To view, visit <a href="https://review.coreboot.org/22707">change 22707</a>. To unsubscribe, visit <a href="https://review.coreboot.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://review.coreboot.org/22707"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: libgfxinit </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I3e6f93caa8f2485a5792d72cfe2e8b3902add7a3 </div>
<div style="display:none"> Gerrit-Change-Number: 22707 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Nico Huber <nico.h@gmx.de> </div>