rpms/kernel/F-12 config-generic, 1.325, 1.326 drm-nouveau.patch, 1.63, 1.64 kernel.spec, 1.1869, 1.1870
Ben Skeggs
bskeggs at fedoraproject.org
Fri Oct 16 03:47:53 UTC 2009
- Previous message (by thread): rpms/mod_perlite/F-12 fetch_source.sh, NONE, 1.1 mod_perlite.spec, 1.2, 1.3 sources, 1.2, 1.3
- Next message (by thread): rpms/postgresql/devel ecpg_config.h, 1.1, 1.2 pg_config.h, 1.3, 1.4 postgresql.spec, 1.120, 1.121
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: bskeggs
Update of /cvs/pkgs/rpms/kernel/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv4466
Modified Files:
config-generic drm-nouveau.patch kernel.spec
Log Message:
* Fri Oct 16 2009 Ben Skeggs <bskeggs at redhat.com> 2.6.31.4-84
- nouveau: more vbios opcodes, minor fixes, hopeful fix for rh#529292
Index: config-generic
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-12/config-generic,v
retrieving revision 1.325
retrieving revision 1.326
diff -u -p -r1.325 -r1.326
--- config-generic 7 Oct 2009 17:22:56 -0000 1.325
+++ config-generic 16 Oct 2009 03:47:50 -0000 1.326
@@ -2247,6 +2247,7 @@ CONFIG_DRM_VIA=m
CONFIG_DRM_NOUVEAU=m
CONFIG_DRM_NOUVEAU_KMS=y
CONFIG_DRM_NOUVEAU_BACKLIGHT=y
+CONFIG_DRM_NOUVEAU_DEBUG=y
CONFIG_DRM_I2C_CH7006=m
#
drm-nouveau.patch:
drivers/gpu/drm/Kconfig | 56
drivers/gpu/drm/Makefile | 2
drivers/gpu/drm/i2c/Makefile | 4
drivers/gpu/drm/i2c/ch7006_drv.c | 531
drivers/gpu/drm/i2c/ch7006_mode.c | 473
drivers/gpu/drm/i2c/ch7006_priv.h | 344
drivers/gpu/drm/nouveau/Makefile | 29
drivers/gpu/drm/nouveau/nouveau_acpi.c | 125
drivers/gpu/drm/nouveau/nouveau_backlight.c | 155
drivers/gpu/drm/nouveau/nouveau_bios.c | 5709 +++++++
drivers/gpu/drm/nouveau/nouveau_bios.h | 236
drivers/gpu/drm/nouveau/nouveau_bo.c | 620
drivers/gpu/drm/nouveau/nouveau_calc.c | 626
drivers/gpu/drm/nouveau/nouveau_channel.c | 464
drivers/gpu/drm/nouveau/nouveau_connector.c | 811 +
drivers/gpu/drm/nouveau/nouveau_connector.h | 55
drivers/gpu/drm/nouveau/nouveau_crtc.h | 95
drivers/gpu/drm/nouveau/nouveau_debugfs.c | 155
drivers/gpu/drm/nouveau/nouveau_display.c | 115
drivers/gpu/drm/nouveau/nouveau_dma.c | 206
drivers/gpu/drm/nouveau/nouveau_dma.h | 151
drivers/gpu/drm/nouveau/nouveau_drv.c | 413
drivers/gpu/drm/nouveau/nouveau_drv.h | 1283 +
drivers/gpu/drm/nouveau/nouveau_encoder.h | 66
drivers/gpu/drm/nouveau/nouveau_fb.h | 47
drivers/gpu/drm/nouveau/nouveau_fbcon.c | 381
drivers/gpu/drm/nouveau/nouveau_fbcon.h | 49
drivers/gpu/drm/nouveau/nouveau_fence.c | 262
drivers/gpu/drm/nouveau/nouveau_gem.c | 954 +
drivers/gpu/drm/nouveau/nouveau_hw.c | 1078 +
drivers/gpu/drm/nouveau/nouveau_hw.h | 448
drivers/gpu/drm/nouveau/nouveau_i2c.c | 256
drivers/gpu/drm/nouveau/nouveau_i2c.h | 45
drivers/gpu/drm/nouveau/nouveau_ioc32.c | 72
drivers/gpu/drm/nouveau/nouveau_irq.c | 696
drivers/gpu/drm/nouveau/nouveau_mem.c | 572
drivers/gpu/drm/nouveau/nouveau_notifier.c | 195
drivers/gpu/drm/nouveau/nouveau_object.c | 1294 +
drivers/gpu/drm/nouveau/nouveau_reg.h | 788
drivers/gpu/drm/nouveau/nouveau_sgdma.c | 321
drivers/gpu/drm/nouveau/nouveau_state.c | 872 +
drivers/gpu/drm/nouveau/nouveau_swmthd.h | 33
drivers/gpu/drm/nouveau/nouveau_ttm.c | 131
drivers/gpu/drm/nouveau/nv04_crtc.c | 995 +
drivers/gpu/drm/nouveau/nv04_cursor.c | 70
drivers/gpu/drm/nouveau/nv04_dac.c | 529
drivers/gpu/drm/nouveau/nv04_dfp.c | 621
drivers/gpu/drm/nouveau/nv04_display.c | 293
drivers/gpu/drm/nouveau/nv04_fb.c | 21
drivers/gpu/drm/nouveau/nv04_fbcon.c | 316
drivers/gpu/drm/nouveau/nv04_fifo.c | 271
drivers/gpu/drm/nouveau/nv04_graph.c | 579
drivers/gpu/drm/nouveau/nv04_instmem.c | 210
drivers/gpu/drm/nouveau/nv04_mc.c | 20
drivers/gpu/drm/nouveau/nv04_timer.c | 51
drivers/gpu/drm/nouveau/nv04_tv.c | 305
drivers/gpu/drm/nouveau/nv10_fb.c | 24
drivers/gpu/drm/nouveau/nv10_fifo.c | 260
drivers/gpu/drm/nouveau/nv10_graph.c | 891 +
drivers/gpu/drm/nouveau/nv17_tv.c | 689
drivers/gpu/drm/nouveau/nv17_tv.h | 156
drivers/gpu/drm/nouveau/nv17_tv_modes.c | 583
drivers/gpu/drm/nouveau/nv20_graph.c | 778
drivers/gpu/drm/nouveau/nv40_fb.c | 62
drivers/gpu/drm/nouveau/nv40_fifo.c | 314
drivers/gpu/drm/nouveau/nv40_graph.c | 2239 ++
drivers/gpu/drm/nouveau/nv40_mc.c | 38
drivers/gpu/drm/nouveau/nv50_crtc.c | 784
drivers/gpu/drm/nouveau/nv50_cursor.c | 151
drivers/gpu/drm/nouveau/nv50_dac.c | 295
drivers/gpu/drm/nouveau/nv50_display.c | 902 +
drivers/gpu/drm/nouveau/nv50_display.h | 46
drivers/gpu/drm/nouveau/nv50_evo.h | 113
drivers/gpu/drm/nouveau/nv50_fbcon.c | 273
drivers/gpu/drm/nouveau/nv50_fifo.c | 493
drivers/gpu/drm/nouveau/nv50_graph.c | 465
drivers/gpu/drm/nouveau/nv50_grctx.h |22284 ++++++++++++++++++++++++++++
drivers/gpu/drm/nouveau/nv50_instmem.c | 508
drivers/gpu/drm/nouveau/nv50_mc.c | 40
drivers/gpu/drm/nouveau/nv50_sor.c | 254
drivers/gpu/drm/nouveau/nvreg.h | 535
drivers/gpu/drm/ttm/ttm_bo.c | 4
include/drm/Kbuild | 1
include/drm/i2c/ch7006.h | 86
include/drm/nouveau_drm.h | 216
85 files changed, 58983 insertions(+)
Index: drm-nouveau.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-12/drm-nouveau.patch,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -p -r1.63 -r1.64
--- drm-nouveau.patch 8 Oct 2009 04:42:12 -0000 1.63
+++ drm-nouveau.patch 16 Oct 2009 03:47:50 -0000 1.64
@@ -1,8 +1,8 @@
diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
-index e4d971c..7fe8a4c 100644
+index e4d971c..62dd13c 100644
--- a/drivers/gpu/drm/Kconfig
+++ b/drivers/gpu/drm/Kconfig
-@@ -153,3 +153,48 @@ config DRM_SAVAGE
+@@ -153,3 +153,59 @@ config DRM_SAVAGE
help
Choose this option if you have a Savage3D/4/SuperSavage/Pro/Twister
chipset. If M is selected the module will be called savage.
@@ -29,6 +29,9 @@ index e4d971c..7fe8a4c 100644
+ and you have a new enough userspace to support this. Running old
+ userspaces with this enabled will cause pain.
+
++ NOTICE: if you plan on using the text based console outside of X, enable
++ FRAMEBUFFER_CONSOLE or else the console will be unusable.
++
+config DRM_NOUVEAU_BACKLIGHT
+ bool "Support for backlight control"
+ depends on DRM_NOUVEAU
@@ -37,6 +40,14 @@ index e4d971c..7fe8a4c 100644
+ Say Y here if you want to control the backlight of your display
+ (e.g. a laptop panel).
+
++config DRM_NOUVEAU_DEBUG
++ bool "Build in Nouveau's debugfs support"
++ depends on DRM_NOUVEAU && DEBUG_FS
++ default y
++ help
++ Say Y here if you want Nouveau to output debugging information
++ via debugfs.
++
+menu "I2C encoder or helper chips"
+ depends on DRM
+
@@ -1439,7 +1450,7 @@ index 0000000..b06d3d9
+#endif
diff --git a/drivers/gpu/drm/nouveau/Makefile b/drivers/gpu/drm/nouveau/Makefile
new file mode 100644
-index 0000000..ab46e3a
+index 0000000..e12b4ff
--- /dev/null
+++ b/drivers/gpu/drm/nouveau/Makefile
@@ -0,0 +1,29 @@
@@ -1454,7 +1465,6 @@ index 0000000..ab46e3a
+ nouveau_bo.o nouveau_fence.o nouveau_gem.o nouveau_ttm.o \
+ nouveau_hw.o nouveau_calc.o nouveau_bios.o nouveau_i2c.o \
+ nouveau_display.o nouveau_connector.o nouveau_fbcon.o \
-+ nouveau_debugfs.o \
+ nv04_timer.o \
+ nv04_mc.o nv40_mc.o nv50_mc.o \
+ nv04_fb.o nv10_fb.o nv40_fb.o \
@@ -1467,6 +1477,7 @@ index 0000000..ab46e3a
+ nv04_dac.o nv04_dfp.o nv04_tv.o nv17_tv.o nv17_tv_modes.o \
+ nv04_crtc.o nv04_display.o nv04_cursor.o nv04_fbcon.o
+
++nouveau-$(CONFIG_DRM_NOUVEAU_DEBUG) += nouveau_debugfs.o
+nouveau-$(CONFIG_COMPAT) += nouveau_ioc32.o
+nouveau-$(CONFIG_DRM_NOUVEAU_BACKLIGHT) += nouveau_backlight.o
+nouveau-$(CONFIG_ACPI) += nouveau_acpi.o
@@ -1766,10 +1777,10 @@ index 0000000..20564f8
+}
diff --git a/drivers/gpu/drm/nouveau/nouveau_bios.c b/drivers/gpu/drm/nouveau/nouveau_bios.c
new file mode 100644
-index 0000000..7a55199
+index 0000000..1c13f5f
--- /dev/null
+++ b/drivers/gpu/drm/nouveau/nouveau_bios.c
-@@ -0,0 +1,5536 @@
+@@ -0,0 +1,5709 @@
+/*
+ * Copyright 2005-2006 Erik Waling
+ * Copyright 2006 Stephane Marchesin
@@ -1812,8 +1823,6 @@ index 0000000..7a55199
+#define BIOSLOG(sip, fmt, arg...) NV_DEBUG(sip->dev, fmt, ##arg)
+#define LOG_OLD_VALUE(x)
+
-+#define BIOS_USLEEP(n) mdelay((n)/1000)
-+
+#define ROM16(x) le16_to_cpu(*(uint16_t *)&(x))
+#define ROM32(x) le32_to_cpu(*(uint32_t *)&(x))
+
@@ -2058,7 +2067,7 @@ index 0000000..7a55199
+{
+#if 0
+ sync();
-+ BIOS_USLEEP(2000);
++ msleep(2);
+#endif
+}
+
@@ -2068,10 +2077,15 @@ index 0000000..7a55199
+ if (nv_arch(bios->dev) < NV_50)
+ return reg;
+
++ if (!(reg & 0x40000000))
++ return reg;
++
++ BUG_ON(!bios->display.output);
++
+ if (reg & 0x40000000)
-+ reg += bios->display.head * 0x800;
++ reg += (ffs(bios->display.output->or) - 1) * 0x800;
+
-+ reg &= ~(0x40000000);
++ reg &= ~0x40000000;
+ return reg;
+}
+
@@ -3400,6 +3414,7 @@ index 0000000..7a55199
+
+ uint8_t cond = bios->data[offset + 1];
+ uint16_t retries = bios->data[offset + 2] * 50;
++ unsigned cnt;
+
+ if (!iexec->execute)
+ return true;
@@ -3410,19 +3425,23 @@ index 0000000..7a55199
+ BIOSLOG(bios, "0x%04X: Condition: 0x%02X, Retries: 0x%02X\n",
+ offset, cond, retries);
+
-+ for (; retries > 0; retries--)
++ for (cnt = 0; cnt < retries; cnt++) {
+ if (bios_condition_met(bios, offset, cond)) {
-+ BIOSLOG(bios, "0x%04X: Condition met, continuing\n", offset);
++ BIOSLOG(bios, "0x%04X: Condition met, continuing\n",
++ offset);
+ break;
+ } else {
-+ BIOSLOG(bios, "0x%04X: Condition not met, sleeping for 20ms\n", offset);
-+ BIOS_USLEEP(20000);
++ BIOSLOG(bios, "0x%04X: "
++ "Condition not met, sleeping for 20ms\n",
++ offset);
++ msleep(20);
+ }
++ }
+
+ if (!bios_condition_met(bios, offset, cond)) {
+ NV_WARN(bios->dev,
+ "0x%04X: Condition still not met after %dms, "
-+ "skiping following opcodes\n", offset, 20 * retries);
++ "skipping following opcodes\n", offset, 20 * retries);
+ iexec->execute = false;
+ }
+
@@ -3665,7 +3684,7 @@ index 0000000..7a55199
+ bios_wr32(bios, NV_PBUS_PCI_NV_19, 0);
+ bios_wr32(bios, reg, value1);
+
-+ BIOS_USLEEP(10);
++ udelay(10);
+
+ bios_wr32(bios, reg, value2);
+ bios_wr32(bios, NV_PBUS_PCI_NV_19, pci_nv_19);
@@ -4065,7 +4084,7 @@ index 0000000..7a55199
+ * Sleep for "time" microseconds.
+ */
+
-+ uint16_t time = ROM16(bios->data[offset + 1]);
++ unsigned time = ROM16(bios->data[offset + 1]);
+
+ if (!iexec->execute)
+ return true;
@@ -4073,7 +4092,10 @@ index 0000000..7a55199
+ BIOSLOG(bios, "0x%04X: Sleeping for 0x%04X microseconds\n",
+ offset, time);
+
-+ BIOS_USLEEP(time);
++ if (time < 1000)
++ udelay(time);
++ else
++ msleep((time + 900) / 1000);
+
+ return true;
+}
@@ -4534,6 +4556,134 @@ index 0000000..7a55199
+ return true;
+}
+
++static int
++nouveau_dp_auxch_rd(struct nouveau_i2c_chan *auxch, int cmd, int addr,
++ uint8_t buf[16], int len)
++{
++ NV_ERROR(auxch->dev, "auxch_rd: stub!\n");
++ return -ENODEV;
++}
++
++static int
++nouveau_dp_auxch_wr(struct nouveau_i2c_chan *auxch, int cmd, int addr,
++ uint8_t buf[16], int len)
++{
++ NV_ERROR(auxch->dev, "auxch_wr: stub!\n");
++ return -ENODEV;
++}
++
++static bool
++init_auxch(struct nvbios *bios, uint16_t offset, struct init_exec *iexec)
++{
++ /*
++ * INIT_AUXCH opcode: 0x98 ('')
++ *
++ * offset (8 bit): opcode
++ * offset + 1 (32 bit): address
++ * offset + 5 (8 bit): count
++ * offset + 6 (8 bit): mask 0
++ * offset + 7 (8 bit): data 0
++ * ...
++ *
++ */
++
++ struct drm_device *dev = bios->dev;
++ struct nouveau_i2c_chan *auxch;
++ uint32_t addr = ROM32(bios->data[offset + 1]);
++ uint8_t len = bios->data[offset + 5];
++ uint8_t buf[16];
++ int ret, i;
++
++ if (len > 16) {
++ NV_ERROR(dev, "INIT_AUXCH: >16 byte xfer unimplemented!\n");
++ return false;
++ }
++
++ if (!bios->display.output) {
++ NV_ERROR(dev, "INIT_AUXCH: no active output\n");
++ return false;
++ }
++
++ auxch = init_i2c_device_find(dev, bios->display.output->i2c_index);
++ if (!auxch) {
++ NV_ERROR(dev, "INIT_AUXCH: couldn't get auxch %d\n",
++ bios->display.output->i2c_index);
++ return false;
++ }
++
++ if (!iexec->execute)
++ return true;
++
++ ret = nouveau_dp_auxch_rd(auxch, 9, addr, buf, len);
++ if (ret) {
++ NV_ERROR(dev, "INIT_AUXCH: rd auxch fail %d\n", ret);
++ return false;
++ }
++
++ offset += 6;
++ for (i = 0; i < len; i++, offset += 2) {
++ buf[i] &= bios->data[offset + 0];
++ buf[i] |= bios->data[offset + 1];
++ }
++
++ ret = nouveau_dp_auxch_wr(auxch, 8, addr, buf, len);
++ if (ret) {
++ NV_ERROR(dev, "INIT_AUXCH: wr auxch fail %d\n", ret);
++ return false;
++ }
++
++ return true;
++}
++
++static bool
++init_zm_auxch(struct nvbios *bios, uint16_t offset, struct init_exec *iexec)
++{
++ /*
++ * INIT_ZM_AUXCH opcode: 0x99 ('')
++ *
++ * offset (8 bit): opcode
++ * offset + 1 (32 bit): address
++ * offset + 5 (8 bit): count
++ * offset + 6 (8 bit): data 0
++ * ...
++ *
++ */
++
++ struct drm_device *dev = bios->dev;
++ struct nouveau_i2c_chan *auxch;
++ uint32_t addr = ROM32(bios->data[offset + 1]);
++ uint8_t len = bios->data[offset + 5];
++ int ret;
++
++ if (len > 16) {
++ NV_ERROR(dev, "INIT_ZM_AUXCH: >16 byte xfer unimplemented!\n");
++ return false;
++ }
++
++ if (!bios->display.output) {
++ NV_ERROR(dev, "INIT_ZM_AUXCH: no active output\n");
++ return false;
++ }
++
++ auxch = init_i2c_device_find(dev, bios->display.output->i2c_index);
++ if (!auxch) {
++ NV_ERROR(dev, "INIT_ZM_AUXCH: couldn't get auxch %d\n",
++ bios->display.output->i2c_index);
++ return false;
++ }
++
++ if (!iexec->execute)
++ return true;
++
++ ret = nouveau_dp_auxch_wr(auxch, 8, addr, &bios->data[offset + 6], len);
++ if (ret) {
++ NV_ERROR(dev, "INIT_ZM_AUXCH: wr auxch fail %d\n", ret);
++ return false;
++ }
++
++ return true;
++}
++
+static struct init_tbl_entry itbl_entry[] = {
+ /* command name , id , length , offset , mult , command handler */
+ /* INIT_PROG (0x31, 15, 10, 4) removed due to no example of use */
@@ -4590,6 +4740,8 @@ index 0000000..7a55199
+ { "INIT_RESERVED" , 0x92, 1 , 0 , 0 , init_reserved },
+ { "INIT_96" , 0x96, 17 , 0 , 0 , init_96 },
+ { "INIT_97" , 0x97, 13 , 0 , 0 , init_97 },
++ { "INIT_AUXCH" , 0x98, 6 , 5 , 2 , init_auxch },
++ { "INIT_ZM_AUXCH" , 0x99, 6 , 5 , 1 , init_zm_auxch },
+ { NULL , 0 , 0 , 0 , 0 , NULL }
+};
+
@@ -4750,9 +4902,10 @@ index 0000000..7a55199
+
+ run_digital_op_script(dev, scriptofs, dcbent, head, bios->fp.dual_link);
+
-+ if (script == LVDS_PANEL_OFF)
++ if (script == LVDS_PANEL_OFF) {
+ /* off-on delay in ms */
-+ BIOS_USLEEP(ROM16(bios->data[bios->fp.xlated_entry + 7]));
++ msleep(ROM16(bios->data[bios->fp.xlated_entry + 7]));
++ }
+#ifdef __powerpc__
+ /* Powerbook specific quirks */
+ if (script == LVDS_RESET && ((dev->pci_device & 0xffff) == 0x0179 || (dev->pci_device & 0xffff) == 0x0329))
@@ -5263,6 +5416,40 @@ index 0000000..7a55199
+ return 0;
+}
+
++static uint8_t *
++bios_output_config_match(struct drm_device *dev, struct dcb_entry *dcbent,
++ uint16_t record, int record_len, int record_nr)
++{
++ struct drm_nouveau_private *dev_priv = dev->dev_private;
++ struct nvbios *bios = &dev_priv->VBIOS;
++ uint32_t entry;
++ uint16_t table;
++ int i, v;
++
++ for (i = 0; i < record_nr; i++, record += record_len) {
++ table = ROM16(bios->data[record]);
++ if (!table)
++ continue;
++ entry = ROM32(bios->data[table]);
++
++ v = (entry & 0x000f0000) >> 16;
++ if (!(v & dcbent->or))
++ continue;
++
++ v = (entry & 0x000000f0) >> 4;
++ if (v != dcbent->location)
++ continue;
++
++ v = (entry & 0x0000000f);
++ if (v != dcbent->type)
++ continue;
++
++ return &bios->data[table];
++ }
++
++ return NULL;
++}
++
+int
+nouveau_bios_run_display_table(struct drm_device *dev, struct dcb_entry *dcbent,
+ uint32_t sub, int pxclk)
@@ -5294,9 +5481,9 @@ index 0000000..7a55199
+ struct init_exec iexec = {true, false};
+ struct nvbios *bios = &dev_priv->VBIOS;
+ uint8_t *table = &bios->data[bios->display.script_table_ptr];
-+ uint8_t *entry, *otable = NULL;
++ uint8_t *otable = NULL;
+ uint16_t script;
-+ int i;
++ int i = 0;
+
+ if (!bios->display.script_table_ptr) {
+ NV_ERROR(dev, "No pointer to output script table\n");
@@ -5348,23 +5535,10 @@ index 0000000..7a55199
+
+ NV_DEBUG(dev, "Searching for output entry for %d %d %d\n",
+ dcbent->type, dcbent->location, dcbent->or);
-+ entry = table + table[1];
-+ for (i = 0; i < table[3]; i++, entry += table[2]) {
-+ uint32_t match;
-+
-+ if (ROM16(entry[0]) == 0)
-+ continue;
-+ otable = &bios->data[ROM16(entry[0])];
-+ match = ROM32(otable[0]);
-+
-+ NV_DEBUG(dev, " %d: 0x%08x\n", i, match);
-+ if ((((match & 0x000f0000) >> 16) & dcbent->or) &&
-+ ((match & 0x0000000f) >> 0) == dcbent->type &&
-+ ((match & 0x000000f0) >> 4) == dcbent->location)
-+ break;
-+ }
-+
-+ if (i == table[3]) {
++ otable = bios_output_config_match(dev, dcbent, table[1] +
++ bios->display.script_table_ptr,
++ table[2], table[3]);
++ if (!otable) {
+ NV_ERROR(dev, "Couldn't find matching output script table\n");
+ return 1;
+ }
@@ -5384,7 +5558,7 @@ index 0000000..7a55199
+ }
+ }
+
-+ bios->display.head = ffs(dcbent->or) - 1;
++ bios->display.output = dcbent;
+
+ if (pxclk == 0) {
+ script = ROM16(otable[6]);
@@ -7131,6 +7305,16 @@ index 0000000..7a55199
+ return bios->fp.edid = &bios->data[offset];
+}
+
++void
++nouveau_bios_run_init_table(struct drm_device *dev, uint16_t table)
++{
++ struct drm_nouveau_private *dev_priv = dev->dev_private;
++ struct nvbios *bios = &dev_priv->VBIOS;
++ struct init_exec iexec = { true, false };
++
++ parse_init_table(bios, table, &iexec);
++}
++
+static bool NVInitVBIOS(struct drm_device *dev)
+{
+ struct drm_nouveau_private *dev_priv = dev->dev_private;
@@ -7308,7 +7492,7 @@ index 0000000..7a55199
+}
diff --git a/drivers/gpu/drm/nouveau/nouveau_bios.h b/drivers/gpu/drm/nouveau/nouveau_bios.h
new file mode 100644
-index 0000000..33f3172
+index 0000000..1ffda97
--- /dev/null
+++ b/drivers/gpu/drm/nouveau/nouveau_bios.h
@@ -0,0 +1,236 @@
@@ -7504,7 +7688,7 @@ index 0000000..33f3172
+ } state;
+
+ struct {
-+ int head;
++ struct dcb_entry *output;
+ uint16_t script_table_ptr;
+ } display;
+
@@ -9278,10 +9462,10 @@ index 0000000..8e7a9fe
+int nouveau_max_ioctl = DRM_ARRAY_SIZE(nouveau_ioctls);
diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.c b/drivers/gpu/drm/nouveau/nouveau_connector.c
new file mode 100644
-index 0000000..9a233e0
+index 0000000..81774a5
--- /dev/null
+++ b/drivers/gpu/drm/nouveau/nouveau_connector.c
-@@ -0,0 +1,781 @@
+@@ -0,0 +1,811 @@
+/*
+ * Copyright (C) 2008 Maarten Maathuis.
+ * All Rights Reserved.
@@ -9532,6 +9716,10 @@ index 0000000..9a233e0
+ NV_ERROR(dev, "DDC responded, but no EDID for %s\n",
+ drm_get_connector_name(connector));
+ return connector_status_disconnected;
++ } else
++ if (connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort) {
++ NV_ERROR(dev, "Detected DP connected, ignoring!\n");
++ return connector_status_disconnected;
+ }
+
+ /* Override encoder type for DVI-I based on whether EDID
@@ -9691,14 +9879,40 @@ index 0000000..9a233e0
+nouveau_connector_native_mode(struct nouveau_connector *connector)
+{
+ struct drm_device *dev = connector->base.dev;
-+ struct drm_display_mode *mode;
++ struct drm_display_mode *mode, *largest = NULL;
++ int high_w = 0, high_h = 0, high_v = 0;
+
++ /* Use preferred mode if there is one.. */
+ list_for_each_entry(mode, &connector->base.probed_modes, head) {
-+ if (mode->type & DRM_MODE_TYPE_PREFERRED)
++ if (mode->type & DRM_MODE_TYPE_PREFERRED) {
++ NV_DEBUG(dev, "native mode from preferred\n");
+ return drm_mode_duplicate(dev, mode);
++ }
+ }
+
-+ return NULL;
++ /* Otherwise, take the resolution with the largest width, then height,
++ * then vertical refresh
++ */
++ list_for_each_entry(mode, &connector->base.probed_modes, head) {
++ if (mode->hdisplay < high_w)
++ continue;
++
++ if (mode->hdisplay == high_w && mode->vdisplay < high_h)
++ continue;
++
++ if (mode->hdisplay == high_w && mode->vdisplay == high_h &&
++ mode->vrefresh < high_v)
++ continue;
++
++ high_w = mode->hdisplay;
++ high_h = mode->vdisplay;
++ high_v = mode->vrefresh;
++ largest = mode;
++ }
++
++ NV_DEBUG(dev, "native mode from largest: %dx%d@%d\n",
++ high_w, high_h, high_v);
++ return largest ? drm_mode_duplicate(dev, largest) : NULL;
+}
+
+struct moderec {
@@ -10227,10 +10441,10 @@ index 0000000..49fa7b2
+#endif /* __NOUVEAU_CRTC_H__ */
diff --git a/drivers/gpu/drm/nouveau/nouveau_debugfs.c b/drivers/gpu/drm/nouveau/nouveau_debugfs.c
new file mode 100644
-index 0000000..1ac871b
+index 0000000..6ccafd3
--- /dev/null
+++ b/drivers/gpu/drm/nouveau/nouveau_debugfs.c
-@@ -0,0 +1,157 @@
+@@ -0,0 +1,155 @@
+/*
+ * Copyright (C) 2009 Red Hat <bskeggs at redhat.com>
+ *
@@ -10266,7 +10480,6 @@ index 0000000..1ac871b
+#include "drmP.h"
+#include "nouveau_drv.h"
+
-+#if defined(CONFIG_DEBUG_FS)
+static int
+nouveau_debugfs_channel_info(struct seq_file *m, void *data)
+{
@@ -10387,7 +10600,6 @@ index 0000000..1ac871b
+ drm_debugfs_remove_files(nouveau_debugfs_list, NOUVEAU_DEBUGFS_ENTRIES,
+ minor);
+}
-+#endif
diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c
new file mode 100644
index 0000000..dfc9439
@@ -10880,7 +11092,7 @@ index 0000000..2edd38d
+#endif
diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.c b/drivers/gpu/drm/nouveau/nouveau_drv.c
new file mode 100644
-index 0000000..a251712
+index 0000000..d97daf7
--- /dev/null
+++ b/drivers/gpu/drm/nouveau/nouveau_drv.c
@@ -0,0 +1,413 @@
@@ -11215,7 +11427,7 @@ index 0000000..a251712
+ .lastclose = nouveau_lastclose,
+ .unload = nouveau_unload,
+ .preclose = nouveau_preclose,
-+#if defined(CONFIG_DEBUG_FS)
++#if defined(CONFIG_DRM_NOUVEAU_DEBUG)
+ .debugfs_init = nouveau_debugfs_init,
+ .debugfs_cleanup = nouveau_debugfs_takedown,
+#endif
@@ -11299,10 +11511,10 @@ index 0000000..a251712
+MODULE_LICENSE("GPL and additional rights");
diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.h b/drivers/gpu/drm/nouveau/nouveau_drv.h
new file mode 100644
-index 0000000..7e8ab42
+index 0000000..08112c9
--- /dev/null
+++ b/drivers/gpu/drm/nouveau/nouveau_drv.h
-@@ -0,0 +1,1282 @@
+@@ -0,0 +1,1283 @@
+/*
+ * Copyright 2005 Stephane Marchesin.
+ * All Rights Reserved.
@@ -12073,7 +12285,7 @@ index 0000000..7e8ab42
+extern struct ttm_backend *nouveau_sgdma_init_ttm(struct drm_device *);
+
+/* nouveau_debugfs.c */
-+#if defined(CONFIG_DEBUG_FS)
++#if defined(CONFIG_DRM_NOUVEAU_DEBUG)
+extern int nouveau_debugfs_init(struct drm_minor *);
+extern void nouveau_debugfs_takedown(struct drm_minor *);
+extern int nouveau_debugfs_channel_init(struct nouveau_channel *);
@@ -12137,6 +12349,7 @@ index 0000000..7e8ab42
+extern int nouveau_bios_init(struct drm_device *);
+extern void nouveau_bios_takedown(struct drm_device *dev);
+extern int nouveau_run_vbios_init(struct drm_device *);
++extern void nouveau_bios_run_init_table(struct drm_device *, uint16_t table);
+extern int get_pll_limits(struct drm_device *, uint32_t limit_match,
+ struct pll_lims *);
+extern int nouveau_bios_run_display_table(struct drm_device *,
@@ -32673,7 +32886,7 @@ index 0000000..1f82587
+
diff --git a/drivers/gpu/drm/nouveau/nv50_dac.c b/drivers/gpu/drm/nouveau/nv50_dac.c
new file mode 100644
-index 0000000..5ba5139
+index 0000000..3233926
--- /dev/null
+++ b/drivers/gpu/drm/nouveau/nv50_dac.c
@@ -0,0 +1,295 @@
@@ -32896,10 +33109,10 @@ index 0000000..5ba5139
+ mode_ctl |= NV50_EVO_DAC_MODE_CTRL_CRTC0;
+
+ /* Lacking a working tv-out, this is not a 100% sure. */
-+ if (to_drm_encoder(encoder)->encoder_type == DRM_MODE_ENCODER_DAC)
++ if (encoder->dcb->type == OUTPUT_ANALOG)
+ mode_ctl |= 0x40;
+ else
-+ if (to_drm_encoder(encoder)->encoder_type == DRM_MODE_ENCODER_TVDAC)
++ if (encoder->dcb->type == OUTPUT_TV)
+ mode_ctl |= 0x100;
+
+ if (adjusted_mode->flags & DRM_MODE_FLAG_NHSYNC)
@@ -58152,10 +58365,10 @@ index 0000000..e0a9c3f
+}
diff --git a/drivers/gpu/drm/nouveau/nv50_sor.c b/drivers/gpu/drm/nouveau/nv50_sor.c
new file mode 100644
-index 0000000..a2dee96
+index 0000000..fe69476
--- /dev/null
+++ b/drivers/gpu/drm/nouveau/nv50_sor.c
-@@ -0,0 +1,250 @@
+@@ -0,0 +1,254 @@
+/*
+ * Copyright (C) 2008 Maarten Maathuis.
+ * All Rights Reserved.
@@ -58304,10 +58517,14 @@ index 0000000..a2dee96
+
+ nv50_sor_dpms(drm_encoder, DRM_MODE_DPMS_ON);
+
-+ if (to_drm_encoder(encoder)->encoder_type != DRM_MODE_ENCODER_LVDS) {
++ switch (encoder->dcb->type) {
++ case OUTPUT_TMDS:
+ mode_ctl |= NV50_EVO_SOR_MODE_CTRL_TMDS;
+ if (adjusted_mode->clock > 165000)
+ mode_ctl |= NV50_EVO_SOR_MODE_CTRL_TMDS_DUAL_LINK;
++ break;
++ default:
++ break;
+ }
+
+ if (crtc->index == 1)
Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-12/kernel.spec,v
retrieving revision 1.1869
retrieving revision 1.1870
diff -u -p -r1.1869 -r1.1870
--- kernel.spec 14 Oct 2009 21:45:33 -0000 1.1869
+++ kernel.spec 16 Oct 2009 03:47:52 -0000 1.1870
@@ -2057,6 +2057,9 @@ fi
# and build.
%changelog
+* Fri Oct 16 2009 Ben Skeggs <bskeggs at redhat.com> 2.6.31.4-84
+- nouveau: more vbios opcodes, minor fixes, hopeful fix for rh#529292
+
* Wed Oct 14 2009 Roland McGrath <roland at redhat.com> 2.6.31.4-83
- Remove work-around for gcc bug #521991, now fixed.
- Build *docs non-parallel, working around kernel's makefile bugs.
- Previous message (by thread): rpms/mod_perlite/F-12 fetch_source.sh, NONE, 1.1 mod_perlite.spec, 1.2, 1.3 sources, 1.2, 1.3
- Next message (by thread): rpms/postgresql/devel ecpg_config.h, 1.1, 1.2 pg_config.h, 1.3, 1.4 postgresql.spec, 1.120, 1.121
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list