[coreboot-gerrit] Change in libgfxinit[master]: [WIP] gma: Add cursor infrastructure

Nico Huber (Code Review) gerrit at coreboot.org
Tue Jan 9 15:59:06 CET 2018


Nico Huber has uploaded this change for review. ( https://review.coreboot.org/23185


Change subject: [WIP] gma: Add cursor infrastructure
......................................................................

[WIP] gma: Add cursor infrastructure

Change-Id: I1a380037ac91ba2beeb33c27a6882eb5caa126f9
Signed-off-by: Nico Huber <nico.huber at secunet.com>
---
M common/hw-gfx-gma-config.ads.template
M common/hw-gfx-gma-display_probing.adb
M common/hw-gfx-gma.adb
M common/hw-gfx-gma.ads
4 files changed, 25 insertions(+), 0 deletions(-)



  git pull ssh://review.coreboot.org:29418/libgfxinit refs/changes/85/23185/1

diff --git a/common/hw-gfx-gma-config.ads.template b/common/hw-gfx-gma-config.ads.template
index 5d136b2..09ece43 100644
--- a/common/hw-gfx-gma-config.ads.template
+++ b/common/hw-gfx-gma-config.ads.template
@@ -264,6 +264,11 @@
             Secondary   => 4096,
             Tertiary    => 4096));
 
+   -- Maximum X position of hardware cursors
+   Maximum_Cursor_X : constant := (case CPU is
+                                    when Ironlake .. Ivybridge => 4095,
+                                    when Haswell .. Skylake    => 8191);
+
    ----------------------------------------------------------------------------
 
    -- FIXME: Unknown for Broxton, Linux' i915 contains a fixme too :-D
diff --git a/common/hw-gfx-gma-display_probing.adb b/common/hw-gfx-gma-display_probing.adb
index 96cf536..ab6c05f 100644
--- a/common/hw-gfx-gma-display_probing.adb
+++ b/common/hw-gfx-gma-display_probing.adb
@@ -189,6 +189,7 @@
       Configs := (Pipe_Index =>
                     (Port        => Disabled,
                      Mode        => Invalid_Mode,
+                     Cursor      => Default_Cursor,
                      Framebuffer => Default_FB));
 
       -- Turn panel on early to probe other ports during the power on delay.
diff --git a/common/hw-gfx-gma.adb b/common/hw-gfx-gma.adb
index 37a39e7..7dc8918 100644
--- a/common/hw-gfx-gma.adb
+++ b/common/hw-gfx-gma.adb
@@ -372,6 +372,7 @@
         (others => Pipe_Config'
            (Port        => Disabled,
             Framebuffer => HW.GFX.Default_FB,
+            Cursor      => Default_Cursor,
             Mode        => HW.GFX.Invalid_Mode));
       PLLs.Initialize;
 
@@ -462,10 +463,12 @@
         (Primary =>
            (Port        => Analog,
             Framebuffer => HW.GFX.Default_FB,
+            Cursor      => Default_Cursor,
             Mode        => HW.GFX.Invalid_Mode),
          others =>
            (Port        => Disabled,
             Framebuffer => HW.GFX.Default_FB,
+            Cursor      => Default_Cursor,
             Mode        => HW.GFX.Invalid_Mode));
    begin
       Power_And_Clocks.Power_Up (Cur_Configs, Fake_Config);
diff --git a/common/hw-gfx-gma.ads b/common/hw-gfx-gma.ads
index 77536d4..baadbeb 100644
--- a/common/hw-gfx-gma.ads
+++ b/common/hw-gfx-gma.ads
@@ -51,9 +51,25 @@
       HDMI3, -- or DVI
       Analog);
 
+   type Cursor_Mode is (No_Cursor, ARGB_Cursor);
+   type Cursor_Size is (Cursor_64x64, Cursor_128x128, Cursor_256x256);
+
+   subtype Cursor_X_Pos is Int32 range -8191 .. 8191;
+   subtype Cursor_Y_Pos is Int32 range -4095 .. 4095;
+
+   type Cursor_Type is record
+      Mode        : Cursor_Mode;
+      Size        : Cursor_Size;
+      Start_X     : Cursor_X_Pos;
+      Start_Y     : Cursor_Y_Pos;
+      GTT_Offset  : Word32;
+   end record;
+   Default_Cursor : constant Cursor_Type := (Mode => No_Cursor, others => <>);
+
    type Pipe_Config is record
       Port        : Port_Type;
       Framebuffer : Framebuffer_Type;
+      Cursor      : Cursor_Type;
       Mode        : Mode_Type;
    end record;
    type Pipe_Index is (Primary, Secondary, Tertiary);

-- 
To view, visit https://review.coreboot.org/23185
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: libgfxinit
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1a380037ac91ba2beeb33c27a6882eb5caa126f9
Gerrit-Change-Number: 23185
Gerrit-PatchSet: 1
Gerrit-Owner: Nico Huber <nico.h at gmx.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180109/89c56a13/attachment.html>


More information about the coreboot-gerrit mailing list