<p>Nico Huber has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/26865">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">gfx: Introduce Size_Type for framebuffer size in bytes<br><br>Change-Id: I8809a887b12124e5331f188dfa1674cbcca7152e<br>Signed-off-by: Nico Huber <nico.huber@secunet.com><br>---<br>M common/hw-gfx.ads<br>1 file changed, 4 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/libgfxinit refs/changes/65/26865/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/common/hw-gfx.ads b/common/hw-gfx.ads</span><br><span>index cff3e18..93a3684 100644</span><br><span>--- a/common/hw-gfx.ads</span><br><span>+++ b/common/hw-gfx.ads</span><br><span>@@ -24,6 +24,9 @@</span><br><span>    subtype Pixel_Type is Int32 range 0 .. 8192 * 8192;</span><br><span>    subtype Pos_Pixel_Type is Pixel_Type range 1 .. Pixel_Type'Last;</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+   -- assume at most 8 bytes per pixel</span><br><span style="color: hsl(120, 100%, 40%);">+   subtype Size_Type is Int32 range 0 .. Pixel_Type'Last * 8;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>    -- Allow same range for width and height (for rotated framebuffers)</span><br><span>    subtype Width_Type      is Pos32 range 1 .. 8192;</span><br><span>    subtype Height_Type     is Pos32 range 1 .. 8192;</span><br><span>@@ -188,7 +191,7 @@</span><br><span>      (if Rotation_90 (FB) then FB.Width else FB.Height);</span><br><span> </span><br><span>    function Pixel_To_Bytes (Pixel : Pixel_Type; FB : Framebuffer_Type)</span><br><span style="color: hsl(0, 100%, 40%);">-      return Int32 is (Pixel * Pos32 (FB.BPC) / (8 / 4));</span><br><span style="color: hsl(120, 100%, 40%);">+      return Size_Type is (Pixel * Pos32 (FB.BPC) / (8 / 4));</span><br><span>    function FB_Size (FB : Framebuffer_Type)</span><br><span>       return Pos32 is (Pixel_To_Bytes (FB.Stride * FB.V_Stride, FB));</span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://review.coreboot.org/26865">change 26865</a>. To unsubscribe, or for help writing mail filters, 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/26865"/><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: I8809a887b12124e5331f188dfa1674cbcca7152e </div>
<div style="display:none"> Gerrit-Change-Number: 26865 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Nico Huber <nico.h@gmx.de> </div>