Difference between revisions of "Unit PL110"

From Ultibo.org
Jump to: navigation, search
 
(7 intermediate revisions by the same user not shown)
Line 26: Line 26:
 
| <code>PL110_FRAMEBUFFER_DESCRIPTION = 'ARM PrimeCell PL110 Color LCD';</code>
 
| <code>PL110_FRAMEBUFFER_DESCRIPTION = 'ARM PrimeCell PL110 Color LCD';</code>
 
| Description of PL110 device
 
| Description of PL110 device
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>PL110_MAX_PHYSICALWIDTH = 1024;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PL110_MAX_PHYSICALHEIGHT = 1024;</code>
 +
| &nbsp;
 
|-
 
|-
 
|}
 
|}
Line 207: Line 215:
 
|-
 
|-
 
| <code>PL110_CLCD_TIMING3_LEE = (1 shl 16);</code>
 
| <code>PL110_CLCD_TIMING3_LEE = (1 shl 16);</code>
| LCD Line end enable: 0 = CLLE disabled (held LOW) / 1 = CLLE signal active
+
| LCD Line end enable: 0 = CLLE disabled (held LOW)/1 = CLLE signal active
 
|-
 
|-
 
| <code>PL110_CLCD_TIMING3_LED = ($3F shl 0);</code>
 
| <code>PL110_CLCD_TIMING3_LED = ($3F shl 0);</code>
Line 252: Line 260:
 
|-
 
|-
 
| <code>PL110_CLCD_CONTROL_LCDBW = (1 shl 4);</code>
 
| <code>PL110_CLCD_CONTROL_LCDBW = (1 shl 4);</code>
| STN LCD is monochrome (black and white) (0 = STN LCD is color / 1 = STN LCD is monochrome)
+
| STN LCD is monochrome (black and white) (0 = STN LCD is color/1 = STN LCD is monochrome)
 
|-
 
|-
 
| <code>PL110_CLCD_CONTROL_LCDTFT = (1 shl 5);</code>
 
| <code>PL110_CLCD_CONTROL_LCDTFT = (1 shl 5);</code>
| LCD is TFT (0 = LCD is an STN display, use gray scaler / 1 = LCD is TFT, do not use gray scaler)
+
| LCD is TFT (0 = LCD is an STN display, use gray scaler/1 = LCD is TFT, do not use gray scaler)
 
|-
 
|-
 
| <code>PL110_CLCD_CONTROL_LCDMONO8 = (1 shl 6);</code>
 
| <code>PL110_CLCD_CONTROL_LCDMONO8 = (1 shl 6);</code>
| Monochrome LCD has an 8-bit interface (0 = mono LCD uses 4-bit interface / 1 = mono LCD uses 8-bit interface)
+
| Monochrome LCD has an 8-bit interface (0 = mono LCD uses 4-bit interface/1 = mono LCD uses 8-bit interface)
 
|-
 
|-
 
| <code>PL110_CLCD_CONTROL_LCDDUAL = (1 shl 7);</code>
 
| <code>PL110_CLCD_CONTROL_LCDDUAL = (1 shl 7);</code>
| LCD interface is dual panel STN (0 = single panel LCD is in use / 1 = dual panel LCD is in use)
+
| LCD interface is dual panel STN (0 = single panel LCD is in use/1 = dual panel LCD is in use)
 
|-
 
|-
 
| <code>PL110_CLCD_CONTROL_BGR = (1 shl 8);</code>
 
| <code>PL110_CLCD_CONTROL_BGR = (1 shl 8);</code>
| RGB of BGR format selection (0 = RGB normal output / 1 = BGR red and blue swapped.)
+
| RGB or BGR format selection (0 = RGB normal output/1 = BGR red and blue swapped.)
 
|-
 
|-
 
| <code>PL110_CLCD_CONTROL_BEBO = (1 shl 9);</code>
 
| <code>PL110_CLCD_CONTROL_BEBO = (1 shl 9);</code>
| Big-endian byte order (0 = little-endian byte order / 1 = big-endian byte order)
+
| Big-endian byte order (0 = little-endian byte order/1 = big-endian byte order)
 
|-
 
|-
 
| <code>PL110_CLCD_CONTROL_BEPO = (1 shl 10);</code>
 
| <code>PL110_CLCD_CONTROL_BEPO = (1 shl 10);</code>
| Big-endian pixel ordering within a byte (0 = little-endian pixel ordering within a byte / 1= big-endian pixel ordering within a byte)
+
| Big-endian pixel ordering within a byte (0 = little-endian pixel ordering within a byte/1= big-endian pixel ordering within a byte)
 
|-
 
|-
 
| <code>PL110_CLCD_CONTROL_LCDPWR = (1 shl 11);</code>
 
| <code>PL110_CLCD_CONTROL_LCDPWR = (1 shl 11);</code>
Line 366: Line 374:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
|colspan="2"|Note: Layout of the PL110 registers (See: http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0161e/I913915.html)
+
|colspan="2"|Note: Layout of the PL110 registers (See: http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0161e/I904421.html)
 
|-
 
|-
 
| <code>TIMING0:LongWord;</code>
 
| <code>TIMING0:LongWord;</code>
Line 474: Line 482:
  
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
<pre style="border: 0; padding-bottom:0px;">function PL110FramebufferCreateVGA(Address:LongWord; const Name:String; Rotation,Width,Height,Depth:LongWord):PFramebufferDevice;</pre>
+
<pre style="border: 0; padding-bottom:0px;">function PL110FramebufferCreateVGA(Address:PtrUInt; const Name:String; Rotation,Width,Height,Depth:LongWord):PFramebufferDevice;</pre>
 
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Create, register and allocate a new PL110 Framebuffer device which can be accessed using the framebuffer API</div>
 
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Create, register and allocate a new PL110 Framebuffer device which can be accessed using the framebuffer API</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Address'''
+
! Address
 
| The address of the PL110 registers
 
| The address of the PL110 registers
 
|-
 
|-
! '''Name'''
+
! Name
 
| The text description of this device which will show in the device list (Optional)
 
| The text description of this device which will show in the device list (Optional)
 
|-
 
|-
! '''Rotation'''
+
! Rotation
 
| The rotation value for the framebuffer device (eg FRAMEBUFFER_ROTATION_180)
 
| The rotation value for the framebuffer device (eg FRAMEBUFFER_ROTATION_180)
 
|-
 
|-
! '''Width'''
+
! Width
 
| The width of the framebuffer in pixels
 
| The width of the framebuffer in pixels
 
|-
 
|-
! '''Height'''
+
! Height
 
| The height of the framebuffer in pixels
 
| The height of the framebuffer in pixels
 
|-
 
|-
! '''Depth'''
+
! Depth
 
| The color depth (bits per pixel) for the framebuffer (eg FRAMEBUFFER_DEPTH_16)
 
| The color depth (bits per pixel) for the framebuffer (eg FRAMEBUFFER_DEPTH_16)
 
|-
 
|-
! '''Return'''
+
! Return
 
| Pointer to the new Framebuffer device or nil if the framebuffer device could not be created
 
| Pointer to the new Framebuffer device or nil if the framebuffer device could not be created
 
|-
 
|-
Line 504: Line 512:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
<pre style="border: 0; padding-bottom:0px;">function PL110FramebufferCreateSVGA(Address:LongWord; const Name:String; Rotation,Width,Height,Depth:LongWord):PFramebufferDevice;</pre>
+
<pre style="border: 0; padding-bottom:0px;">function PL110FramebufferCreateSVGA(Address:PtrUInt; const Name:String; Rotation,Width,Height,Depth:LongWord):PFramebufferDevice;</pre>
 
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Create, register and allocate a new PL110 Framebuffer device which can be accessed using the framebuffer API</div>
 
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Create, register and allocate a new PL110 Framebuffer device which can be accessed using the framebuffer API</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Address'''
+
! Address
 
| The address of the PL110 registers
 
| The address of the PL110 registers
 
|-
 
|-
! '''Name'''
+
! Name
 
| The text description of this device which will show in the device list (Optional)
 
| The text description of this device which will show in the device list (Optional)
 
|-
 
|-
! '''Rotation'''
+
! Rotation
 
| The rotation value for the framebuffer device (eg FRAMEBUFFER_ROTATION_180)
 
| The rotation value for the framebuffer device (eg FRAMEBUFFER_ROTATION_180)
 
|-
 
|-
! '''Width'''
+
! Width
 
| The width of the framebuffer in pixels
 
| The width of the framebuffer in pixels
 
|-
 
|-
! '''Height'''
+
! Height
 
| The height of the framebuffer in pixels
 
| The height of the framebuffer in pixels
 
|-
 
|-
! '''Depth'''
+
! Depth
 
| The color depth (bits per pixel) for the framebuffer (eg FRAMEBUFFER_DEPTH_16)
 
| The color depth (bits per pixel) for the framebuffer (eg FRAMEBUFFER_DEPTH_16)
 
|-
 
|-
! '''Return'''
+
! Return
 
| Pointer to the new Framebuffer device or nil if the framebuffer device could not be created
 
| Pointer to the new Framebuffer device or nil if the framebuffer device could not be created
 
|-
 
|-
Line 539: Line 547:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Framebuffer'''
+
! Framebuffer
 
| The Framebuffer device to destroy
 
| The Framebuffer device to destroy
 
|-
 
|-
! '''Return'''
+
! Return
 
| ERROR_SUCCESS if completed or another error code on failure
 
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
Line 557: Line 565:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| Not intended to be called directly by applications, use FramebufferDeviceAllocate instead
+
| Not intended to be called directly by applications, use FramebufferDeviceAllocate instead.
 
|-
 
|-
 
|}
 
|}
Line 569: Line 577:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| Not intended to be called directly by applications, use FramebufferDeviceRelease instead
+
| Not intended to be called directly by applications, use FramebufferDeviceRelease instead.
 
|-
 
|-
 
|}
 
|}
Line 581: Line 589:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| Not intended to be called directly by applications, use FramebufferDevicBlank instead
+
| Not intended to be called directly by applications, use FramebufferDevicBlank instead.
 
|-
 
|-
 
|}
 
|}
Line 588: Line 596:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
<pre style="border: 0; padding-bottom:0px;">function PL110FramebufferCommit(Framebuffer:PFramebufferDevice; Address,Size,Flags:LongWord):LongWord;</pre>
+
<pre style="border: 0; padding-bottom:0px;">function PL110FramebufferCommit(Framebuffer:PFramebufferDevice; Address:PtrUInt; Size,Flags:LongWord):LongWord;</pre>
 
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of FramebufferDeviceCommit API for PL110 Framebuffer</div>
 
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of FramebufferDeviceCommit API for PL110 Framebuffer</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| Not intended to be called directly by applications, use FramebufferDeviceCommit instead
+
| Not intended to be called directly by applications, use FramebufferDeviceCommit instead.
|-
+
|}
+
</div></div>
+
<br />
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
+
<pre style="border: 0; padding-bottom:0px;">function PL110FramebufferSetOffset(Framebuffer:PFramebufferDevice; X,Y:LongWord; Pan:Boolean):LongWord;</pre>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of FramebufferDeviceSetOffset API for PL110 Framebuffer</div>
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
+
{| class="wikitable" style="font-size: 14px; background: white;"
+
|-
+
! '''Note'''
+
| Not intended to be called directly by applications, use FramebufferDeviceSetOffset instead
+
 
|-
 
|-
 
|}
 
|}
Line 612: Line 608:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
<pre style="border: 0; padding-bottom:0px;">function PL110FramebufferSetProperties(Framebuffer:PFramebufferDevice; Properties:PFramebufferProperties):LongWord;</pre>
+
<pre style="border: 0; padding-bottom:0px;">function PL110FramebufferSetOffsetEx(Framebuffer:PFramebufferDevice; X,Y:LongWord; Pan,Switch:Boolean):LongWord;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of FramebufferDeviceSetProperties API for PL110 Framebuffer</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of FramebufferDeviceSetOffsetEx API for PL110 Framebuffer</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| Not intended to be called directly by applications, use FramebufferDeviceSetProperties instead
+
| Not intended to be called directly by applications, use FramebufferDeviceSetOffsetEx instead.
 
|-
 
|-
 
|}
 
|}

Latest revision as of 03:45, 5 September 2023

Return to Unit Reference


Description


ARM PrimeCell PL110 Color LCD Controller Driver unit

The ARM PrimeCell PL110 Color LCD Controller is an AMBA compliant module that provides LCD display support for both TFT and STN displays in a variety of configurations.

While the controller supports TFT displays it differs from other TFT display controllers because it has a DMA interface to system memory rather than using SPI or other serial transfer protocols.

Currently this driver only supports the setup required for the QEMU VersatilePB target however it is possible to support additional configurations by adding more variations of the PL110FramebufferCreate functions (eg PL110FramebufferCreateSTN etc).

Note: The driver does not include support for FRAMEBUFFER_FLAG_SYNC as the QEMU emulation of the device does not provide interrupt support at present.

Constants



[Expand]
PL110 specific constants PL110_*


[Expand]
PL110 mode PL110_MODE_*


[Expand]
PL110 register offset PL110_CLCD_*


[Expand]
PL110 CLCD timing0 PL110_CLCD_TIMING0_*


[Expand]
PL110 CLCD timing1 PL110_CLCD_TIMING1_*


[Expand]
PL110 CLCD timing2 PL110_CLCD_TIMING2_*


[Expand]
PL110 CLCD timing3 PL110_CLCD_TIMING3_*


[Expand]
PL110 CLCD control PL110_CLCD_CONTROL_*


[Expand]
PL110 control PL110_CONTROL_*


[Expand]
PL110 timing0 PL110_TIMING0_*


[Expand]
PL110 timing1 PL110_TIMING1_*


[Expand]
PL110 timing2 PL110_TIMING2_*


Type definitions



PL110 CLCD registers

[Expand]

PPL110CLCDRegisters = ^TPL110CLCDRegisters;

TPL110CLCDRegisters = record

PL110 framebuffer properties

[Expand]

PPL110Framebuffer = ^TPL110Framebuffer;

TPL110Framebuffer = record


Public variables


None defined

Function declarations



PL110 functions

[Expand]
function PL110FramebufferCreateVGA(Address:PtrUInt; const Name:String; Rotation,Width,Height,Depth:LongWord):PFramebufferDevice;
Description: Create, register and allocate a new PL110 Framebuffer device which can be accessed using the framebuffer API


[Expand]
function PL110FramebufferCreateSVGA(Address:PtrUInt; const Name:String; Rotation,Width,Height,Depth:LongWord):PFramebufferDevice;
Description: Create, register and allocate a new PL110 Framebuffer device which can be accessed using the framebuffer API


[Expand]
function PL110FramebufferDestroy(Framebuffer:PFramebufferDevice):LongWord;
Description: Release, deregister and destroy a PL110 Framebuffer device created by this driver


PL110 framebuffer functions

[Expand]
function PL110FramebufferAllocate(Framebuffer:PFramebufferDevice; Properties:PFramebufferProperties):LongWord;
Description: Implementation of FramebufferDeviceAllocate API for PL110 Framebuffer


[Expand]
function PL110FramebufferRelease(Framebuffer:PFramebufferDevice):LongWord;
Description: Implementation of FramebufferDeviceRelease API for PL110 Framebuffer


[Expand]
function PL110FramebufferBlank(Framebuffer:PFramebufferDevice; Blank:Boolean):LongWord;
Description: Implementation of FramebufferDevicBlank API for PL110 Framebuffer


[Expand]
function PL110FramebufferCommit(Framebuffer:PFramebufferDevice; Address:PtrUInt; Size,Flags:LongWord):LongWord;
Description: Implementation of FramebufferDeviceCommit API for PL110 Framebuffer


[Expand]
function PL110FramebufferSetOffsetEx(Framebuffer:PFramebufferDevice; X,Y:LongWord; Pan,Switch:Boolean):LongWord;
Description: Implementation of FramebufferDeviceSetOffsetEx API for PL110 Framebuffer


Return to Unit Reference