Nico Huber has uploaded this change for review. ( https://review.coreboot.org/c/libgfxinit/+/84299?usp=email )
Change subject: [WIP] Tiny display experiments ......................................................................
[WIP] Tiny display experiments
Change-Id: Ic5a1a9edab44c5c2cbbc5408b83c08b348d0d2d6 Signed-off-by: Nico Huber nico.huber@secunet.com --- M common/hw-gfx-gma-panel.adb M gfxtest/hw-gfx-gma-gfx_test.adb 2 files changed, 20 insertions(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/libgfxinit refs/changes/99/84299/1
diff --git a/common/hw-gfx-gma-panel.adb b/common/hw-gfx-gma-panel.adb index 532bf67..cda69b9 100644 --- a/common/hw-gfx-gma-panel.adb +++ b/common/hw-gfx-gma-panel.adb @@ -428,6 +428,8 @@ Registers.Set_Mask (Register => BLC (Panel).CTL, Mask => BXT_BLC_PWM_CTL_ENABLE); + Registers.Write (BLC (Panel).FREQ, 38_400_000 / 400); + Registers.Write (BLC (Panel).DUTY, 38_400_000 / 600); end if;
Registers.Set_Mask diff --git a/gfxtest/hw-gfx-gma-gfx_test.adb b/gfxtest/hw-gfx-gma-gfx_test.adb index 6a10657..91ad1ca 100644 --- a/gfxtest/hw-gfx-gma-gfx_test.adb +++ b/gfxtest/hw-gfx-gma-gfx_test.adb @@ -359,6 +359,20 @@
for Pipe in GMA.Pipe_Index loop if Pipes (Pipe).Port /= GMA.Disabled then + if Pipes (Pipe).Mode.H_Visible = 480 then + --Pipes (Pipe).Mode.V_Visible := 128; + + -- EDID fix + Pipes (Pipe).Mode.V_Total := Pipes (Pipe).Mode.V_Sync_End + 12; + Pipes (Pipe).Mode.H_Total := Pipes (Pipe).Mode.H_Sync_End + 43; + + -- ~30Hz override + Pipes (Pipe).Mode.Dotclock := (30 + * Frequency_Type (Pipes (Pipe).Mode.H_Total) + * Frequency_Type (Pipes (Pipe).Mode.V_Total) + * 1000) / 1001; + end if; + Calc_Framebuffer (FB => Pipes (Pipe).Framebuffer, Mode => Pipes (Pipe).Mode, @@ -609,13 +623,13 @@ Pipes (Pipe).Framebuffer.Height; begin New_FB.Start_X := Position_Type'Min - (Width - 320, Rand_Div (Width)); + (Width - Width / 10, Rand_Div (Width)); New_FB.Start_Y := Position_Type'Min - (Height - 320, Rand_Div (Height)); + (Height - Height / 10, Rand_Div (Height)); New_FB.Width := Width_Type'Max - (320, Width - New_FB.Start_X - Rand_Div (Width)); + (Width / 10, Width - New_FB.Start_X - Rand_Div (Width)); New_FB.Height := Height_Type'Max - (320, Height - New_FB.Start_Y - Rand_Div (Height)); + (Height / 10, Height - New_FB.Start_Y - Rand_Div (Height));
Cursor.Center_X := Rotated_Width (New_FB) / 2; Cursor.Center_Y := Rotated_Height (New_FB) / 2;