<!DOCTYPE html>
<html lang="en" data-content_root="../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Driver for PXA25x LCD controller — The Linux Kernel documentation</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=fa44fd50" />
<link rel="stylesheet" type="text/css" href="../_static/alabaster.css?v=3918102e" />
<script src="../_static/documentation_options.js?v=5929fcd5"></script>
<script src="../_static/doctools.js?v=9bcbadda"></script>
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="s3fb - fbdev driver for S3 Trio/Virge chips" href="s3fb.html" />
<link rel="prev" title="pvr2fb - PowerVR 2 graphics frame buffer driver" href="pvr2fb.html" />
<link rel="stylesheet" href="../_static/custom.css" type="text/css" />
</head><body>
<div class="document">
<div class="sphinxsidebar" role="navigation" aria-label="Main">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../index.html">
<img class="logo" src="../_static/logo.svg" alt="Logo of The Linux Kernel"/>
</a></p>
<h1 class="logo"><a href="../index.html">The Linux Kernel</a></h1>
<p class="blurb">6.18.50</p>
<search id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</search>
<script>document.getElementById('searchbox').style.display = "block"</script>
<p>
<h3 class="kernel-toc-contents">Contents</h3>
<input type="checkbox" class="kernel-toc-toggle" id = "kernel-toc-toggle" checked>
<label class="kernel-toc-title" for="kernel-toc-toggle"></label>
<div class="kerneltoc" id="kerneltoc">
<ul>
<li class="toctree-l1"><a class="reference internal" href="../process/development-process.html">Development process</a></li>
<li class="toctree-l1"><a class="reference internal" href="../process/submitting-patches.html">Submitting patches</a></li>
<li class="toctree-l1"><a class="reference internal" href="../process/code-of-conduct.html">Code of conduct</a></li>
<li class="toctree-l1"><a class="reference internal" href="../maintainer/index.html">Maintainer handbook</a></li>
<li class="toctree-l1"><a class="reference internal" href="../process/index.html">All development-process docs</a></li>
</ul>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../core-api/index.html">Core API</a></li>
<li class="toctree-l1"><a class="reference internal" href="../driver-api/index.html">Driver APIs</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../subsystem-apis.html">Subsystems</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../subsystem-apis.html#core-subsystems">Core subsystems</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="../subsystem-apis.html#human-interfaces">Human interfaces</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="../input/index.html">Input Documentation</a></li>
<li class="toctree-l3"><a class="reference internal" href="../hid/index.html">Human Interface Devices (HID)</a></li>
<li class="toctree-l3"><a class="reference internal" href="../sound/index.html">Sound Subsystem Documentation</a></li>
<li class="toctree-l3"><a class="reference internal" href="../gpu/index.html">GPU Driver Developer’s Guide</a></li>
<li class="toctree-l3 current"><a class="reference internal" href="index.html">Frame Buffer</a></li>
<li class="toctree-l3"><a class="reference internal" href="../leds/index.html">LEDs</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../subsystem-apis.html#networking-interfaces">Networking interfaces</a></li>
<li class="toctree-l2"><a class="reference internal" href="../subsystem-apis.html#storage-interfaces">Storage interfaces</a></li>
<li class="toctree-l2"><a class="reference internal" href="../subsystem-apis.html#other-subsystems">Other subsystems</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../locking/index.html">Locking</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../process/license-rules.html">Licensing rules</a></li>
<li class="toctree-l1"><a class="reference internal" href="../doc-guide/index.html">Writing documentation</a></li>
<li class="toctree-l1"><a class="reference internal" href="../dev-tools/index.html">Development tools</a></li>
<li class="toctree-l1"><a class="reference internal" href="../dev-tools/testing-overview.html">Testing guide</a></li>
<li class="toctree-l1"><a class="reference internal" href="../kernel-hacking/index.html">Hacking guide</a></li>
<li class="toctree-l1"><a class="reference internal" href="../trace/index.html">Tracing</a></li>
<li class="toctree-l1"><a class="reference internal" href="../fault-injection/index.html">Fault injection</a></li>
<li class="toctree-l1"><a class="reference internal" href="../livepatch/index.html">Livepatching</a></li>
<li class="toctree-l1"><a class="reference internal" href="../rust/index.html">Rust</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../admin-guide/index.html">Administration</a></li>
<li class="toctree-l1"><a class="reference internal" href="../kbuild/index.html">Build system</a></li>
<li class="toctree-l1"><a class="reference internal" href="../admin-guide/reporting-issues.html">Reporting issues</a></li>
<li class="toctree-l1"><a class="reference internal" href="../tools/index.html">Userspace tools</a></li>
<li class="toctree-l1"><a class="reference internal" href="../userspace-api/index.html">Userspace API</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../firmware-guide/index.html">Firmware</a></li>
<li class="toctree-l1"><a class="reference internal" href="../devicetree/index.html">Firmware and Devicetree</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../arch/index.html">CPU architectures</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../staging/index.html">Unsorted documentation</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../translations/index.html">Translations</a></li>
</ul>
</div>
<script type="text/javascript"> <!--
var sbar = document.getElementsByClassName("sphinxsidebar")[0];
let currents = document.getElementsByClassName("current")
if (currents.length) {
sbar.scrollTop = currents[currents.length - 1].offsetTop;
}
--> </script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/fb/pxafb.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="driver-for-pxa25x-lcd-controller">
<h1>Driver for PXA25x LCD controller<a class="headerlink" href="#driver-for-pxa25x-lcd-controller" title="Link to this heading">¶</a></h1>
<p>The driver supports the following options, either via
options=<OPTIONS> when modular or video=pxafb:<OPTIONS> when built in.</p>
<p>For example:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>modprobe pxafb options=vmem:2M,mode:640x480-8,passive
</pre></div>
</div>
<p>or on the kernel command line:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>video=pxafb:vmem:2M,mode:640x480-8,passive
</pre></div>
</div>
<p>vmem: VIDEO_MEM_SIZE</p>
<blockquote>
<div><p>Amount of video memory to allocate (can be suffixed with K or M
for kilobytes or megabytes)</p>
</div></blockquote>
<p>mode:XRESxYRES[-BPP]</p>
<blockquote>
<div><p>XRES == LCCR1_PPL + 1</p>
<p>YRES == LLCR2_LPP + 1</p>
<blockquote>
<div><p>The resolution of the display in pixels</p>
</div></blockquote>
<p>BPP == The bit depth. Valid values are 1, 2, 4, 8 and 16.</p>
</div></blockquote>
<p>pixclock:PIXCLOCK</p>
<blockquote>
<div><p>Pixel clock in picoseconds</p>
</div></blockquote>
<p>left:LEFT == LCCR1_BLW + 1</p>
<p>right:RIGHT == LCCR1_ELW + 1</p>
<p>hsynclen:HSYNC == LCCR1_HSW + 1</p>
<p>upper:UPPER == LCCR2_BFW</p>
<p>lower:LOWER == LCCR2_EFR</p>
<p>vsynclen:VSYNC == LCCR2_VSW + 1</p>
<blockquote>
<div><p>Display margins and sync times</p>
</div></blockquote>
<p>color | mono => LCCR0_CMS</p>
<blockquote>
<div><p>umm...</p>
</div></blockquote>
<p>active | passive => LCCR0_PAS</p>
<blockquote>
<div><p>Active (TFT) or Passive (STN) display</p>
</div></blockquote>
<p>single | dual => LCCR0_SDS</p>
<blockquote>
<div><p>Single or dual panel passive display</p>
</div></blockquote>
<p>4pix | 8pix => LCCR0_DPD</p>
<blockquote>
<div><p>4 or 8 pixel monochrome single panel data</p>
</div></blockquote>
<p>hsync:HSYNC, vsync:VSYNC</p>
<blockquote>
<div><p>Horizontal and vertical sync. 0 => active low, 1 => active
high.</p>
</div></blockquote>
<p>dpc:DPC</p>
<blockquote>
<div><p>Double pixel clock. 1=>true, 0=>false</p>
</div></blockquote>
<p>outputen:POLARITY</p>
<blockquote>
<div><p>Output Enable Polarity. 0 => active low, 1 => active high</p>
</div></blockquote>
<p>pixclockpol:POLARITY</p>
<blockquote>
<div><p>pixel clock polarity
0 => falling edge, 1 => rising edge</p>
</div></blockquote>
<section id="overlay-support-for-pxa27x-and-later-lcd-controllers">
<h2>Overlay Support for PXA27x and later LCD controllers<a class="headerlink" href="#overlay-support-for-pxa27x-and-later-lcd-controllers" title="Link to this heading">¶</a></h2>
<blockquote>
<div><p>PXA27x and later processors support overlay1 and overlay2 on-top of the
base framebuffer (although under-neath the base is also possible). They
support palette and no-palette RGB formats, as well as YUV formats (only
available on overlay2). These overlays have dedicated DMA channels and
behave in a similar way as a framebuffer.</p>
<p>However, there are some differences between these overlay framebuffers
and normal framebuffers, as listed below:</p>
<ol class="arabic">
<li><p>overlay can start at a 32-bit word aligned position within the base
framebuffer, which means they have a start (x, y). This information
is encoded into var->nonstd (no, var->xoffset and var->yoffset are
not for such purpose).</p></li>
<li><p>overlay framebuffer is allocated dynamically according to specified
‘<code class="xref c c-struct broken_xref docutils literal notranslate"><span class="pre">struct</span> <span class="pre">fb_var_screeninfo</span></code>’, the amount is decided by:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>var->xres_virtual * var->yres_virtual * bpp
</pre></div>
</div>
<p>bpp = 16 -- for RGB565 or RGBT555</p>
<p>bpp = 24 -- for YUV444 packed</p>
<p>bpp = 24 -- for YUV444 planar</p>
<p>bpp = 16 -- for YUV422 planar (1 pixel = 1 Y + 1/2 Cb + 1/2 Cr)</p>
<p>bpp = 12 -- for YUV420 planar (1 pixel = 1 Y + 1/4 Cb + 1/4 Cr)</p>
<p>NOTE:</p>
<ol class="loweralpha simple">
<li><p>overlay does not support panning in x-direction, thus
var->xres_virtual will always be equal to var->xres</p></li>
<li><p>line length of overlay(s) must be on a 32-bit word boundary,
for YUV planar modes, it is a requirement for the component
with minimum bits per pixel, e.g. for YUV420, Cr component
for one pixel is actually 2-bits, it means the line length
should be a multiple of 16-pixels</p></li>
<li><p>starting horizontal position (XPOS) should start on a 32-bit
word boundary, otherwise the <code class="xref c c-func broken_xref docutils literal notranslate"><span class="pre">fb_check_var()</span></code> will just fail.</p></li>
<li><p>the rectangle of the overlay should be within the base plane,
otherwise fail</p></li>
</ol>
<p>Applications should follow the sequence below to operate an overlay
framebuffer:</p>
<blockquote>
<div><ol class="loweralpha simple">
<li><p>open(“/dev/fb[1-2]”, ...)</p></li>
<li><p>ioctl(fd, FBIOGET_VSCREENINFO, ...)</p></li>
<li><p>modify ‘var’ with desired parameters:</p>
<ol class="arabic simple">
<li><p>var->xres and var->yres</p></li>
<li><p>larger var->yres_virtual if more memory is required,
usually for double-buffering</p></li>
<li><p>var->nonstd for starting (x, y) and color format</p></li>
<li><p>var->{red, green, blue, transp} if RGB mode is to be used</p></li>
</ol>
</li>
<li><p>ioctl(fd, FBIOPUT_VSCREENINFO, ...)</p></li>
<li><p>ioctl(fd, FBIOGET_FSCREENINFO, ...)</p></li>
<li><p>mmap</p></li>
<li><p>...</p></li>
</ol>
</div></blockquote>
</li>
<li><p>for YUV planar formats, these are actually not supported within the
framebuffer framework, application has to take care of the offsets
and lengths of each component within the framebuffer.</p></li>
<li><p>var->nonstd is used to pass starting (x, y) position and color format,
the detailed bit fields are shown below:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>31 23 20 10 0
+-----------------+---+----------+----------+
| ... unused ... |FOR| XPOS | YPOS |
+-----------------+---+----------+----------+
</pre></div>
</div>
<p>FOR - color format, as defined by OVERLAY_FORMAT_* in pxafb.h</p>
<blockquote>
<div><ul class="simple">
<li><p>0 - RGB</p></li>
<li><p>1 - YUV444 PACKED</p></li>
<li><p>2 - YUV444 PLANAR</p></li>
<li><p>3 - YUV422 PLANAR</p></li>
<li><p>4 - YUR420 PLANAR</p></li>
</ul>
</div></blockquote>
<p>XPOS - starting horizontal position</p>
<p>YPOS - starting vertical position</p>
</li>
</ol>
</div></blockquote>
</section>
</section>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer">
©The kernel development community.
|
Powered by <a href="https://www.sphinx-doc.org/">Sphinx 8.1.3</a>
& <a href="https://alabaster.readthedocs.io">Alabaster 0.7.16</a>
|
<a href="../_sources/fb/pxafb.rst.txt"
rel="nofollow">Page source</a>
</div>
</body>
</html>