Skip to content

Commit

Permalink
Enabled framebuffer delay through device.dsc
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrianoA3 authored and AdrianoA3 committed Nov 2, 2023
1 parent 2723ff9 commit 95b766a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
#include <Resources/font5x12.h>

#include "Library/FrameBufferSerialPortLib.h"
#include <Library/TimerLib.h>


FBCON_POSITION m_Position;
FBCON_POSITION m_MaxPosition;
Expand All @@ -20,6 +22,7 @@ UINTN gWidth = FixedPcdGet32(PcdMipiFrameBufferWidth);
// Reserve half screen for output
UINTN gHeight = FixedPcdGet32(PcdMipiFrameBufferHeight);
UINTN gBpp = FixedPcdGet32(PcdMipiFrameBufferPixelBpp);
UINTN delay = FixedPcdGet32(PcdMipiFrameBufferDelay);

// Module-used internal routine
void FbConPutCharWithFactor(char c, int type, unsigned scale_factor);
Expand Down Expand Up @@ -142,6 +145,7 @@ void FbConPutCharWithFactor(char c, int type, unsigned scale_factor)
return;

newline:
MicroSecondDelay( delay );
m_Position.y += scale_factor;
m_Position.x = 0;
if (m_Position.y >= m_MaxPosition.y - scale_factor) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,11 @@
HobLib
CompilerIntrinsicsLib
CacheMaintenanceLib
TimerLib

[Pcd]
gQcomTokenSpaceGuid.PcdMipiFrameBufferAddress
gQcomTokenSpaceGuid.PcdMipiFrameBufferWidth
gQcomTokenSpaceGuid.PcdMipiFrameBufferHeight
gQcomTokenSpaceGuid.PcdMipiFrameBufferPixelBpp
gQcomTokenSpaceGuid.PcdMipiFrameBufferDelay
2 changes: 2 additions & 0 deletions Silicon/Qualcomm/QcomPkg/QcomPkg.dec
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@
gQcomTokenSpaceGuid.PcdMipiFrameBufferPixelBpp|32|UINT32|0x0000a403
gQcomTokenSpaceGuid.PcdMipiFrameBufferVisibleWidth|1080|UINT32|0x0000a404
gQcomTokenSpaceGuid.PcdMipiFrameBufferVisibleHeight|2160|UINT32|0x0000a405
gQcomTokenSpaceGuid.PcdMipiFrameBufferDelay|1|UINT32|0x0000a406

# Touch Screen
gQcomTokenSpaceGuid.PcdTouchCtlrAddress|0|UINT16|0x0000a501
gQcomTokenSpaceGuid.PcdTouchCtlrResetPin|0|UINT32|0x0000a502
Expand Down

0 comments on commit 95b766a

Please sign in to comment.