aboutsummaryrefslogtreecommitdiff
path: root/shared-core/nouveau_reg.h
diff options
context:
space:
mode:
authorMatthew Garrett <mjg59@srcf.ucam.org>2009-02-18 02:08:25 +0000
committerBen Skeggs <bskeggs@redhat.com>2009-02-18 13:48:33 +1000
commit96ce587e8b915afeac38e5f547ba95803c1780f2 (patch)
treeacd11f89b3ec7877a9c54a708a65ad2b56c9c334 /shared-core/nouveau_reg.h
parent0054e14793e585ec0d8e95e3d7b82cbf1a684af8 (diff)
nouveau: Add in-kernel backlight control support
Several nvidia-based systems don't support backlight control via the standard ACPI control mechanisms. Instead, it's necessary for the driver to modify the backlight control registers directly. This patch adds support for determining whether the registers appear to be in use, and if so registers a kernel backlight device to control them. The backlight can then be controlled via existing userspace tools. Signed-off-by: Matthew Garrett <mjg@redhat.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'shared-core/nouveau_reg.h')
-rw-r--r--shared-core/nouveau_reg.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/shared-core/nouveau_reg.h b/shared-core/nouveau_reg.h
index 1ae0177c..060abe0a 100644
--- a/shared-core/nouveau_reg.h
+++ b/shared-core/nouveau_reg.h
@@ -99,6 +99,8 @@
* the card will hang early on in the X init process.
*/
# define NV_PMC_ENABLE_UNK13 (1<<13)
+#define NV40_PMC_BACKLIGHT 0x000015f0
+# define NV40_PMC_BACKLIGHT_MASK 0x001f0000
#define NV40_PMC_1700 0x00001700
#define NV40_PMC_1704 0x00001704
#define NV40_PMC_1708 0x00001708
@@ -542,6 +544,9 @@
/* This name is a partial guess. */
#define NV50_DISPLAY_SUPERVISOR 0x00610024
+#define NV50_PDISPLAY_BACKLIGHT 0x0061c084
+# define NV50_PDISPLAY_BACKLIGHT_ENABLE 0x80000000
+
/* Fifo commands. These are not regs, neither masks */
#define NV03_FIFO_CMD_JUMP 0x20000000
#define NV03_FIFO_CMD_JUMP_OFFSET_MASK 0x1ffffffc
@@ -591,3 +596,4 @@
#define NV40_RAMFC_UNK_48 0x48
#define NV40_RAMFC_UNK_4C 0x4C
#define NV40_RAMFC_UNK_50 0x50
+