Skip to content

Commit

Permalink
docs: fb: convert docs to ReST and rename to *.rst
Browse files Browse the repository at this point in the history
The conversion is actually:
  - add blank lines and identation in order to identify paragraphs;
  - fix tables markups;
  - add some lists markups;
  - mark literal blocks;
  - adjust title markups.

At its new index.rst, let's add a :orphan: while this is not linked to
the main index.rst file, in order to avoid build warnings.

Also, removed the Maintained by, as requested by Geert.

Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Signed-off-by: Jonathan Corbet <[email protected]>
  • Loading branch information
mchehab authored and Jonathan Corbet committed Jun 14, 2019
1 parent 10ffebb commit ab42b81
Show file tree
Hide file tree
Showing 47 changed files with 1,952 additions and 1,665 deletions.
2 changes: 1 addition & 1 deletion Documentation/admin-guide/kernel-parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5024,7 +5024,7 @@
vector=percpu: enable percpu vector domain

video= [FB] Frame buffer configuration
See Documentation/fb/modedb.txt.
See Documentation/fb/modedb.rst.

video.brightness_switch_enabled= [0,1]
If set to 1, on receiving an ACPI notify event
Expand Down
29 changes: 15 additions & 14 deletions Documentation/fb/api.txt → Documentation/fb/api.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
The Frame Buffer Device API
---------------------------
===========================
The Frame Buffer Device API
===========================

Last revised: June 21, 2011

Expand All @@ -21,13 +22,13 @@ deal with different behaviours.
---------------

Device and driver capabilities are reported in the fixed screen information
capabilities field.
capabilities field::

struct fb_fix_screeninfo {
struct fb_fix_screeninfo {
...
__u16 capabilities; /* see FB_CAP_* */
...
};
};

Application should use those capabilities to find out what features they can
expect from the device and driver.
Expand Down Expand Up @@ -151,9 +152,9 @@ fb_fix_screeninfo and fb_var_screeninfo structure respectively.
struct fb_fix_screeninfo stores device independent unchangeable information
about the frame buffer device and the current format. Those information can't
be directly modified by applications, but can be changed by the driver when an
application modifies the format.
application modifies the format::

struct fb_fix_screeninfo {
struct fb_fix_screeninfo {
char id[16]; /* identification string eg "TT Builtin" */
unsigned long smem_start; /* Start of frame buffer mem */
/* (physical address) */
Expand All @@ -172,13 +173,13 @@ struct fb_fix_screeninfo {
/* specific chip/card we have */
__u16 capabilities; /* see FB_CAP_* */
__u16 reserved[2]; /* Reserved for future compatibility */
};
};

struct fb_var_screeninfo stores device independent changeable information
about a frame buffer device, its current format and video mode, as well as
other miscellaneous parameters.
other miscellaneous parameters::

struct fb_var_screeninfo {
struct fb_var_screeninfo {
__u32 xres; /* visible resolution */
__u32 yres;
__u32 xres_virtual; /* virtual resolution */
Expand Down Expand Up @@ -216,7 +217,7 @@ struct fb_var_screeninfo {
__u32 rotate; /* angle we rotate counter clockwise */
__u32 colorspace; /* colorspace for FOURCC-based modes */
__u32 reserved[4]; /* Reserved for future compatibility */
};
};

To modify variable information, applications call the FBIOPUT_VSCREENINFO
ioctl with a pointer to a fb_var_screeninfo structure. If the call is
Expand Down Expand Up @@ -255,14 +256,14 @@ monochrome, grayscale or pseudocolor visuals, although this is not required.

- For truecolor and directcolor formats, applications set the grayscale field
to zero, and the red, blue, green and transp fields to describe the layout of
color components in memory.
color components in memory::

struct fb_bitfield {
struct fb_bitfield {
__u32 offset; /* beginning of bitfield */
__u32 length; /* length of bitfield */
__u32 msb_right; /* != 0 : Most significant bit is */
/* right */
};
};
Pixel values are bits_per_pixel wide and are split in non-overlapping red,
green, blue and alpha (transparency) components. Location and size of each
Expand Down
8 changes: 4 additions & 4 deletions Documentation/fb/arkfb.txt → Documentation/fb/arkfb.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

arkfb - fbdev driver for ARK Logic chips
========================================
========================================
arkfb - fbdev driver for ARK Logic chips
========================================


Supported Hardware
Expand Down Expand Up @@ -47,7 +47,7 @@ Missing Features
(alias TODO list)

* secondary (not initialized by BIOS) device support
* big endian support
* big endian support
* DPMS support
* MMIO support
* interlaced mode variant
Expand Down
35 changes: 19 additions & 16 deletions Documentation/fb/aty128fb.txt → Documentation/fb/aty128fb.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
[This file is cloned from VesaFB/matroxfb]

=================
What is aty128fb?
=================

.. [This file is cloned from VesaFB/matroxfb]
This is a driver for a graphic framebuffer for ATI Rage128 based devices
on Intel and PPC boxes.

Expand All @@ -24,15 +25,15 @@ How to use it?
==============

Switching modes is done using the video=aty128fb:<resolution>... modedb
boot parameter or using `fbset' program.
boot parameter or using `fbset` program.

See Documentation/fb/modedb.txt for more information on modedb
See Documentation/fb/modedb.rst for more information on modedb
resolutions.

You should compile in both vgacon (to boot if you remove your Rage128 from
box) and aty128fb (for graphics mode). You should not compile-in vesafb
unless you have primary display on non-Rage128 VBE2.0 device (see
Documentation/fb/vesafb.txt for details).
unless you have primary display on non-Rage128 VBE2.0 device (see
Documentation/fb/vesafb.rst for details).


X11
Expand All @@ -48,25 +49,27 @@ Configuration
=============

You can pass kernel command line options to vesafb with
`video=aty128fb:option1,option2:value2,option3' (multiple options should
be separated by comma, values are separated from options by `:').
`video=aty128fb:option1,option2:value2,option3` (multiple options should
be separated by comma, values are separated from options by `:`).
Accepted options:

noaccel - do not use acceleration engine. It is default.
accel - use acceleration engine. Not finished.
vmode:x - chooses PowerMacintosh video mode <x>. Deprecated.
cmode:x - chooses PowerMacintosh colour mode <x>. Deprecated.
<XxX@X> - selects startup videomode. See modedb.txt for detailed
explanation. Default is 640x480x8bpp.
========= =======================================================
noaccel do not use acceleration engine. It is default.
accel use acceleration engine. Not finished.
vmode:x chooses PowerMacintosh video mode <x>. Deprecated.
cmode:x chooses PowerMacintosh colour mode <x>. Deprecated.
<XxX@X> selects startup videomode. See modedb.txt for detailed
explanation. Default is 640x480x8bpp.
========= =======================================================


Limitations
===========

There are known and unknown bugs, features and misfeatures.
Currently there are following known bugs:
+ This driver is still experimental and is not finished. Too many

- This driver is still experimental and is not finished. Too many
bugs/errata to list here.

--
Brad Douglas <[email protected]>
47 changes: 22 additions & 25 deletions Documentation/fb/cirrusfb.txt → Documentation/fb/cirrusfb.rst
Original file line number Diff line number Diff line change
@@ -1,43 +1,42 @@
============================================
Framebuffer driver for Cirrus Logic chipsets
============================================

Framebuffer driver for Cirrus Logic chipsets
Copyright 1999 Jeff Garzik <[email protected]>
Copyright 1999 Jeff Garzik <[email protected]>



{ just a little something to get people going; contributors welcome! }

.. just a little something to get people going; contributors welcome!
Chip families supported:
SD64
Piccolo
Picasso
Spectrum
Alpine (GD-543x/4x)
Picasso4 (GD-5446)
GD-5480
Laguna (GD-546x)
- SD64
- Piccolo
- Picasso
- Spectrum
- Alpine (GD-543x/4x)
- Picasso4 (GD-5446)
- GD-5480
- Laguna (GD-546x)

Bus's supported:
PCI
Zorro
- PCI
- Zorro

Architectures supported:
i386
Alpha
PPC (Motorola Powerstack)
m68k (Amiga)
- i386
- Alpha
- PPC (Motorola Powerstack)
- m68k (Amiga)



Default video modes
-------------------
At the moment, there are two kernel command line arguments supported:

mode:640x480
mode:800x600
or
mode:1024x768
- mode:640x480
- mode:800x600
- mode:1024x768

Full support for startup video modes (modedb) will be integrated soon.

Expand Down Expand Up @@ -93,5 +92,3 @@ Version 1.9.4
Version 1.9.3
-------------
* Bundled with kernel 2.3.14-pre1 or later.


Original file line number Diff line number Diff line change
@@ -1,53 +1,56 @@
==========================
Understanding fbdev's cmap
--------------------------
==========================

These notes explain how X's dix layer uses fbdev's cmap structures.

*. example of relevant structures in fbdev as used for a 3-bit grayscale cmap
struct fb_var_screeninfo {
.bits_per_pixel = 8,
.grayscale = 1,
.red = { 4, 3, 0 },
.green = { 0, 0, 0 },
.blue = { 0, 0, 0 },
}
struct fb_fix_screeninfo {
.visual = FB_VISUAL_STATIC_PSEUDOCOLOR,
}
for (i = 0; i < 8; i++)
- example of relevant structures in fbdev as used for a 3-bit grayscale cmap::

struct fb_var_screeninfo {
.bits_per_pixel = 8,
.grayscale = 1,
.red = { 4, 3, 0 },
.green = { 0, 0, 0 },
.blue = { 0, 0, 0 },
}
struct fb_fix_screeninfo {
.visual = FB_VISUAL_STATIC_PSEUDOCOLOR,
}
for (i = 0; i < 8; i++)
info->cmap.red[i] = (((2*i)+1)*(0xFFFF))/16;
memcpy(info->cmap.green, info->cmap.red, sizeof(u16)*8);
memcpy(info->cmap.blue, info->cmap.red, sizeof(u16)*8);
memcpy(info->cmap.green, info->cmap.red, sizeof(u16)*8);
memcpy(info->cmap.blue, info->cmap.red, sizeof(u16)*8);

*. X11 apps do something like the following when trying to use grayscale.
for (i=0; i < 8; i++) {
- X11 apps do something like the following when trying to use grayscale::

for (i=0; i < 8; i++) {
char colorspec[64];
memset(colorspec,0,64);
sprintf(colorspec, "rgb:%x/%x/%x", i*36,i*36,i*36);
if (!XParseColor(outputDisplay, testColormap, colorspec, &wantedColor))
printf("Can't get color %s\n",colorspec);
XAllocColor(outputDisplay, testColormap, &wantedColor);
grays[i] = wantedColor;
}
}

There's also named equivalents like gray1..x provided you have an rgb.txt.

Somewhere in X's callchain, this results in a call to X code that handles the
colormap. For example, Xfbdev hits the following:

xc-011010/programs/Xserver/dix/colormap.c:
xc-011010/programs/Xserver/dix/colormap.c::

FindBestPixel(pentFirst, size, prgb, channel)
FindBestPixel(pentFirst, size, prgb, channel)

dr = (long) pent->co.local.red - prgb->red;
dg = (long) pent->co.local.green - prgb->green;
db = (long) pent->co.local.blue - prgb->blue;
sq = dr * dr;
UnsignedToBigNum (sq, &sum);
BigNumAdd (&sum, &temp, &sum);
dr = (long) pent->co.local.red - prgb->red;
dg = (long) pent->co.local.green - prgb->green;
db = (long) pent->co.local.blue - prgb->blue;
sq = dr * dr;
UnsignedToBigNum (sq, &sum);
BigNumAdd (&sum, &temp, &sum);

co.local.red are entries that were brought in through FBIOGETCMAP which come
directly from the info->cmap.red that was listed above. The prgb is the rgb
that the app wants to match to. The above code is doing what looks like a least
squares matching function. That's why the cmap entries can't be set to the left
hand side boundaries of a color range.

Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
===========
Deferred IO
-----------
===========

Deferred IO is a way to delay and repurpose IO. It uses host memory as a
buffer and the MMU pagefault as a pretrigger for when to perform the device
Expand All @@ -16,7 +17,7 @@ works:
- app continues writing to that page with no additional cost. this is
the key benefit.
- the workqueue task comes in and mkcleans the pages on the list, then
completes the work associated with updating the framebuffer. this is
completes the work associated with updating the framebuffer. this is
the real work talking to the device.
- app tries to write to the address (that has now been mkcleaned)
- get pagefault and the above sequence occurs again
Expand Down Expand Up @@ -47,29 +48,32 @@ How to use it: (for fbdev drivers)
----------------------------------
The following example may be helpful.

1. Setup your structure. Eg:
1. Setup your structure. Eg::

static struct fb_deferred_io hecubafb_defio = {
.delay = HZ,
.deferred_io = hecubafb_dpy_deferred_io,
};
static struct fb_deferred_io hecubafb_defio = {
.delay = HZ,
.deferred_io = hecubafb_dpy_deferred_io,
};

The delay is the minimum delay between when the page_mkwrite trigger occurs
and when the deferred_io callback is called. The deferred_io callback is
explained below.

2. Setup your deferred IO callback. Eg:
static void hecubafb_dpy_deferred_io(struct fb_info *info,
struct list_head *pagelist)
2. Setup your deferred IO callback. Eg::

static void hecubafb_dpy_deferred_io(struct fb_info *info,
struct list_head *pagelist)

The deferred_io callback is where you would perform all your IO to the display
device. You receive the pagelist which is the list of pages that were written
to during the delay. You must not modify this list. This callback is called
from a workqueue.

3. Call init
3. Call init::

info->fbdefio = &hecubafb_defio;
fb_deferred_io_init(info);

4. Call cleanup
4. Call cleanup::

fb_deferred_io_cleanup(info);
Loading

0 comments on commit ab42b81

Please sign in to comment.