rpms/kernel/F-11 drm-nouveau.patch, 1.43, 1.44 kernel.spec, 1.1585, 1.1586
Ben Skeggs
bskeggs at fedoraproject.org
Sun May 3 02:25:37 UTC 2009
- Previous message: rpms/pygtk2/devel .cvsignore, 1.41, 1.42 pygtk2.spec, 1.23, 1.24 sources, 1.41, 1.42
- Next message: rpms/akonadi/F-10 .cvsignore, 1.6, 1.7 akonadi.spec, 1.19, 1.20 sources, 1.6, 1.7 akonadi-1.1.1-startup-2.patch, 1.1, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: bskeggs
Update of /cvs/pkgs/rpms/kernel/F-11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv21928
Modified Files:
drm-nouveau.patch kernel.spec
Log Message:
* Sun May 03 2009 Ben Skeggs <bskeggs at redhat.com> 2.6.29.2-124
- drm-nouveau.patch: ignore unsupported dcb encoder types completely
- nv50: module option to run output scripts, too raw to be by default yet,
but will fix a number of issues in the places where they work.
drm-nouveau.patch:
Index: drm-nouveau.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-11/drm-nouveau.patch,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -p -r1.43 -r1.44
--- drm-nouveau.patch 1 May 2009 23:45:21 -0000 1.43
+++ drm-nouveau.patch 3 May 2009 02:25:34 -0000 1.44
@@ -424,10 +424,10 @@ index 0000000..e3d354f
+}
diff --git a/drivers/gpu/drm/nouveau/nouveau_bios.c b/drivers/gpu/drm/nouveau/nouveau_bios.c
new file mode 100644
-index 0000000..2baf01b
+index 0000000..7805dc9
--- /dev/null
+++ b/drivers/gpu/drm/nouveau/nouveau_bios.c
-@@ -0,0 +1,4799 @@
+@@ -0,0 +1,4802 @@
+/*
+ * Copyright 2005-2006 Erik Waling
+ * Copyright 2006 Stephane Marchesin
@@ -3473,7 +3473,8 @@ index 0000000..2baf01b
+
+static int
+find_script_pointers(struct drm_device *dev, uint8_t *table, uint16_t *script0,
-+ uint16_t *script1, uint16_t headerlen, int pxclk)
++ uint16_t *script1, uint16_t headerlen, int pxclk,
++ int cmpval)
+{
+ /* The output script tables describing a particular output type
+ * look as follows:
@@ -3506,7 +3507,7 @@ index 0000000..2baf01b
+
+ struct drm_nouveau_private *dev_priv = dev->dev_private;
+ struct nvbios *bios = &dev_priv->VBIOS;
-+ int i, cmpval = 0x0100;
++ int i;
+
+ *script0 = *script1 = 0;
+ for (i = 0; i < table[5]; i++) {
@@ -3566,7 +3567,6 @@ index 0000000..2baf01b
+ uint8_t *entry, *otable = NULL;
+ uint16_t script0, script1;
+ int i;
-+ bool run_scripts = false;
+
+ if (!bios->display.script_table_ptr) {
+ NV_ERROR(dev, "No pointer to output script table\n");
@@ -3601,23 +3601,26 @@ index 0000000..2baf01b
+ return 1;
+ }
+
-+ if (find_script_pointers(dev, otable, &script0, &script1, table[4], pxclk))
++ if (find_script_pointers(dev, otable, &script0, &script1, table[4],
++ pxclk, dcbent->type == OUTPUT_LVDS ?
++ 0x0100 : (pxclk > 165000 ? 0x0105 : 0x0001)))
+ return 1;
+ bios->display.head = ffs(dcbent->or) - 1;
+
+ if (script0) {
+ NV_TRACE(dev, "0x%04X: Parsing output Script0\n", script0);
-+ if (run_scripts)
+ parse_init_table(dev, bios, script0, &iexec);
++ } else {
++ NV_ERROR(dev, "clock script missing!\n");
++ return 1;
+ }
+
+ if (script1) {
+ NV_TRACE(dev, "0x%04X: Parsing output Script1\n", script1);
-+ if (run_scripts)
+ parse_init_table(dev, bios, script1, &iexec);
+ }
+
-+ return run_scripts ? 0 : 1;
++ return 0;
+}
+
+
@@ -7092,10 +7095,10 @@ index 0000000..4383883
+#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..f497aae
+index 0000000..578983e
--- /dev/null
+++ b/drivers/gpu/drm/nouveau/nouveau_drv.c
-@@ -0,0 +1,190 @@
+@@ -0,0 +1,194 @@
+/*
+ * Copyright 2005 Stephane Marchesin.
+ * All Rights Reserved.
@@ -7142,6 +7145,10 @@ index 0000000..f497aae
+int nouveau_duallink = 0;
+module_param_named(duallink, nouveau_duallink, int, 0400);
+
++MODULE_PARM_DESC(uscript, "Execute output scripts (>=GeForce 8)");
++int nouveau_uscript = 0;
++module_param_named(uscript, nouveau_uscript, int, 0400);
++
+int nouveau_fbpercrtc = 0;
+#if 0
+module_param_named(fbpercrtc, nouveau_fbpercrtc, int, 0400);
@@ -23835,10 +23842,10 @@ index 0000000..87c6213
+}
diff --git a/drivers/gpu/drm/nouveau/nv50_connector.c b/drivers/gpu/drm/nouveau/nv50_connector.c
new file mode 100644
-index 0000000..83fb192
+index 0000000..a83ee1b
--- /dev/null
+++ b/drivers/gpu/drm/nouveau/nv50_connector.c
-@@ -0,0 +1,503 @@
+@@ -0,0 +1,498 @@
+/*
+ * Copyright (C) 2008 Maarten Maathuis.
+ * All Rights Reserved.
@@ -23880,39 +23887,11 @@ index 0000000..83fb192
+nv50_connector_to_encoder(struct nouveau_connector *connector, bool digital)
+{
+ struct drm_device *dev = connector->base.dev;
-+ struct drm_encoder *drm_encoder;
-+ bool digital_possible = false;
-+ bool analog_possible = false;
-+ int i;
-+
-+ switch (connector->base.connector_type) {
-+ case DRM_MODE_CONNECTOR_VGA:
-+ case DRM_MODE_CONNECTOR_SVIDEO:
-+ analog_possible = true;
-+ break;
-+ case DRM_MODE_CONNECTOR_DVII:
-+ analog_possible = true;
-+ digital_possible = true;
-+ break;
-+ case DRM_MODE_CONNECTOR_DVID:
-+ case DRM_MODE_CONNECTOR_LVDS:
-+ digital_possible = true;
-+ break;
-+ default:
-+ return NULL;
-+ }
-+
-+ /* Return early on bad situations. */
-+ if (!analog_possible && !digital)
-+ return NULL;
-+
-+ if (!digital_possible && digital)
-+ return NULL;
++ struct nouveau_encoder *encoder;
++ struct drm_mode_object *obj;
++ int i, id;
+
+ for (i = 0; i < DRM_CONNECTOR_MAX_ENCODER; i++) {
-+ struct drm_mode_object *obj;
-+ int id;
-+
+ id = connector->base.encoder_ids[i];
+ if (!id)
+ break;
@@ -23920,21 +23899,20 @@ index 0000000..83fb192
+ obj = drm_mode_object_find(dev, id, DRM_MODE_OBJECT_ENCODER);
+ if (!obj)
+ continue;
-+ drm_encoder = obj_to_encoder(obj);
++ encoder = to_nouveau_encoder(obj_to_encoder(obj));
+
+ if (digital) {
-+ switch (drm_encoder->encoder_type) {
-+ case DRM_MODE_ENCODER_TMDS:
-+ case DRM_MODE_ENCODER_LVDS:
-+ return to_nouveau_encoder(drm_encoder);
++ switch (encoder->dcb->type) {
++ case OUTPUT_TMDS:
++ case OUTPUT_LVDS:
++ return encoder;
+ default:
+ break;
+ }
+ } else {
-+ switch (drm_encoder->encoder_type) {
-+ case DRM_MODE_ENCODER_DAC:
-+ case DRM_MODE_ENCODER_TVDAC:
-+ return to_nouveau_encoder(drm_encoder);
++ switch (encoder->dcb->type) {
++ case OUTPUT_ANALOG:
++ return encoder;
+ default:
+ break;
+ }
@@ -24188,6 +24166,30 @@ index 0000000..83fb192
+ connector->to_encoder(connector, connector->digital);
+ unsigned min_clock, max_clock;
+
++ /* This really should not happen, but it appears it might do
++ * somehow, debug!
++ */
++ if (!encoder) {
++ int i;
++
++ NV_ERROR(dev, "no encoder for connector: %s %d\n",
++ drm_get_connector_name(drm_connector),
++ connector->digital);
++ for (i = 0; i < DRM_CONNECTOR_MAX_ENCODER; i++) {
++ struct drm_mode_object *obj;
++ if (!drm_connector->encoder_ids[i])
++ break;
++
++ obj = drm_mode_object_find(dev, drm_connector->encoder_ids[i], DRM_MODE_OBJECT_ENCODER);
++ if (!obj)
++ continue;
++ encoder = to_nouveau_encoder(obj_to_encoder(obj));
++ NV_ERROR(dev, " %d: %d", i, encoder->dcb->type);
++ }
++
++ return MODE_BAD;
++ }
++
+ min_clock = 25000;
+
+ switch (encoder->base.encoder_type) {
@@ -25593,10 +25595,10 @@ index 0000000..e64c314
+
diff --git a/drivers/gpu/drm/nouveau/nv50_display.c b/drivers/gpu/drm/nouveau/nv50_display.c
new file mode 100644
-index 0000000..67ad5f6
+index 0000000..ac51e1a
--- /dev/null
+++ b/drivers/gpu/drm/nouveau/nv50_display.c
-@@ -0,0 +1,422 @@
+@@ -0,0 +1,423 @@
+/*
+ * Copyright (C) 2008 Maarten Maathuis.
+ * All Rights Reserved.
@@ -25866,7 +25868,8 @@ index 0000000..67ad5f6
+ nv50_dac_create(dev, entry);
+ break;
+ default:
-+ break;
++ NV_WARN(dev, "DCB encoder %d unknown\n", entry->type);
++ continue;
+ }
+
+ connector[entry->i2c_index] |= (1 << entry->type);
@@ -48565,10 +48568,10 @@ index 0000000..6572f12
+}
diff --git a/drivers/gpu/drm/nouveau/nv50_sor.c b/drivers/gpu/drm/nouveau/nv50_sor.c
new file mode 100644
-index 0000000..b4b096e
+index 0000000..69a07e2
--- /dev/null
+++ b/drivers/gpu/drm/nouveau/nv50_sor.c
-@@ -0,0 +1,275 @@
+@@ -0,0 +1,286 @@
+/*
+ * Copyright (C) 2008 Maarten Maathuis.
+ * All Rights Reserved.
@@ -48607,6 +48610,7 @@ index 0000000..b4b096e
+#include "nv50_display_commands.h"
+
+extern int nouveau_duallink;
++extern int nouveau_uscript;
+
+static void
+nv50_sor_disconnect(struct nouveau_encoder *encoder)
@@ -48624,14 +48628,24 @@ index 0000000..b4b096e
+ struct drm_display_mode *mode)
+{
+ struct drm_device *dev = encoder->base.dev;
-+ uint32_t limit = 165000;
++ uint32_t limit = encoder->dcb->type == OUTPUT_LVDS ? 112000 : 165000;
++ int ret;
+
+ NV_DEBUG(dev, "or %d\n", encoder->or);
+
+ /* We don't yet know what to do, if anything at all. */
-+ if (encoder->base.encoder_type == DRM_MODE_ENCODER_LVDS)
++ if (!nouveau_uscript && encoder->dcb->type == OUTPUT_LVDS)
+ return 0;
+
++ if (nouveau_uscript) {
++ NV_TRACE(dev, "executing display table for %d %d %d %d\n",
++ encoder->dcb->type, encoder->dcb->location,
++ encoder->dcb->or, mode->clock);
++ ret = nouveau_bios_run_display_table(dev, encoder->dcb, mode->clock);
++ if (ret)
++ NV_ERROR(dev, "error running display table, may hang\n");
++ }
++
+ /* 0x70000 was a late addition to nv, mentioned as fixing tmds
+ * initialisation on certain gpu's. I presume it's some kind of
+ * clock setting, but what precisely i do not know.
Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-11/kernel.spec,v
retrieving revision 1.1585
retrieving revision 1.1586
diff -u -p -r1.1585 -r1.1586
--- kernel.spec 2 May 2009 04:41:37 -0000 1.1585
+++ kernel.spec 3 May 2009 02:25:35 -0000 1.1586
@@ -1967,6 +1967,11 @@ fi
# and build.
%changelog
+* Sun May 03 2009 Ben Skeggs <bskeggs at redhat.com> 2.6.29.2-124
+- drm-nouveau.patch: ignore unsupported dcb encoder types completely
+- nv50: module option to run output scripts, too raw to be by default yet,
+ but will fix a number of issues in the places where they work.
+
* Sat May 02 2009 Kyle McMartin <kyle at redhat.com> 2.6.29.2-123
- Build htmldocs single threaded.
- Previous message: rpms/pygtk2/devel .cvsignore, 1.41, 1.42 pygtk2.spec, 1.23, 1.24 sources, 1.41, 1.42
- Next message: rpms/akonadi/F-10 .cvsignore, 1.6, 1.7 akonadi.spec, 1.19, 1.20 sources, 1.6, 1.7 akonadi-1.1.1-startup-2.patch, 1.1, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the scm-commits
mailing list