Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 399f4862 authored by Dmitry Torokhov's avatar Dmitry Torokhov
Browse files

Merge master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 into for-linus

parents 481419ec a9edadbf
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -225,8 +225,6 @@ kprobes.txt
	- documents the kernel probes debugging feature.
kref.txt
	- docs on adding reference counters (krefs) to kernel objects.
laptop-mode.txt
	- how to conserve battery power using laptop-mode.
laptops/
	- directory with laptop related info and laptop driver documentation.
ldm.txt
@@ -301,12 +299,8 @@ pcmcia/
	- info on the Linux PCMCIA driver.
pi-futex.txt
	- documentation on lightweight PI-futexes.
pm.txt
	- info on Linux power management support.
pnp.txt
	- Linux Plug and Play documentation.
power_supply_class.txt
	- Tells userspace about battery, UPS, AC or DC power supply properties
power/
	- directory with info on Linux PCI power management.
powerpc/
+2 −10
Original line number Diff line number Diff line
Linux supports two methods of overriding the BIOS DSDT:
Linux supports a method of overriding the BIOS DSDT:

CONFIG_ACPI_CUSTOM_DSDT builds the image into the kernel.

CONFIG_ACPI_CUSTOM_DSDT_INITRD adds the image to the initrd.

When to use these methods is described in detail on the
When to use this method is described in detail on the
Linux/ACPI home page:
http://www.lesswatts.org/projects/acpi/overridingDSDT.php

Note that if both options are used, the DSDT supplied
by the INITRD method takes precedence.

Documentation/initramfs-add-dsdt.sh is provided for convenience
for use with the CONFIG_ACPI_CUSTOM_DSDT_INITRD method.
+0 −43
Original line number Diff line number Diff line
#!/bin/bash
# Adds a DSDT file to the initrd (if it's an initramfs)
# first argument is the name of archive
# second argument is the name of the file to add
# The file will be copied as /DSDT.aml

# 20060126: fix "Premature end of file" with some old cpio (Roland Robic)
# 20060205: this time it should really work

# check the arguments
if [ $# -ne 2 ]; then
	program_name=$(basename $0)
	echo "\
$program_name: too few arguments
Usage: $program_name initrd-name.img DSDT-to-add.aml
Adds a DSDT file to an initrd (in initramfs format)

  initrd-name.img: filename of the initrd in initramfs format
  DSDT-to-add.aml: filename of the DSDT file to add
  " 1>&2
    exit 1
fi

# we should check it's an initramfs

tempcpio=$(mktemp -d)
# cleanup on exit, hangup, interrupt, quit, termination
trap 'rm -rf $tempcpio' 0 1 2 3 15

# extract the archive
gunzip -c "$1" > "$tempcpio"/initramfs.cpio || exit 1

# copy the DSDT file at the root of the directory so that we can call it "/DSDT.aml"
cp -f "$2" "$tempcpio"/DSDT.aml

# add the file
cd "$tempcpio"
(echo DSDT.aml | cpio --quiet -H newc -o -A -O "$tempcpio"/initramfs.cpio) || exit 1
cd "$OLDPWD"

# re-compress the archive
gzip -c "$tempcpio"/initramfs.cpio > "$1"
+53 −0
Original line number Diff line number Diff line
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++)
	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);

*. 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:

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);

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.
+38 −0
Original line number Diff line number Diff line
			Metronomefb
			-----------
Maintained by Jaya Kumar <jayakumar.lkml.gmail.com>
Last revised: Nov 20, 2007

Metronomefb is a driver for the Metronome display controller. The controller
is from E-Ink Corporation. It is intended to be used to drive the E-Ink
Vizplex display media. E-Ink hosts some details of this controller and the
display media here http://www.e-ink.com/products/matrix/metronome.html .

Metronome is interfaced to the host CPU through the AMLCD interface. The
host CPU generates the control information and the image in a framebuffer
which is then delivered to the AMLCD interface by a host specific method.
Currently, that's implemented for the PXA's LCDC controller. The display and
error status are each pulled through individual GPIOs.

Metronomefb was written for the PXA255/gumstix/lyre combination and
therefore currently has board set specific code in it. If other boards based on
other architectures are available, then the host specific code can be separated
and abstracted out.

Metronomefb requires waveform information which is delivered via the AMLCD
interface to the metronome controller. The waveform information is expected to
be delivered from userspace via the firmware class interface. The waveform file
can be compressed as long as your udev or hotplug script is aware of the need
to uncompress it before delivering it. metronomefb will ask for waveform.wbf
which would typically go into /lib/firmware/waveform.wbf depending on your
udev/hotplug setup. I have only tested with a single waveform file which was
originally labeled 23P01201_60_WT0107_MTC. I do not know what it stands for.
Caution should be exercised when manipulating the waveform as there may be
a possibility that it could have some permanent effects on the display media.
I neither have access to nor know exactly what the waveform does in terms of
the physical media.

Metronomefb uses the deferred IO interface so that it can provide a memory
mappable frame buffer. It has been tested with tinyx (Xfbdev). It is known
to work at this time with xeyes, xclock, xloadimage, xpdf.
Loading