rpms/kernel/devel drm-nouveau.patch, 1.20, 1.21 kernel.spec, 1.1401, 1.1402
Ben Skeggs
bskeggs at fedoraproject.org
Tue Mar 10 03:48:35 UTC 2009
Author: bskeggs
Update of /cvs/pkgs/rpms/kernel/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv3849
Modified Files:
drm-nouveau.patch kernel.spec
Log Message:
* Tue Mar 10 2009 Ben Skeggs <bskeggs at redhat.com>
- drm-nouveau.patch: fix kms issues seen while testing original 8800gtx
drm-nouveau.patch:
Index: drm-nouveau.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/drm-nouveau.patch,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- drm-nouveau.patch 9 Mar 2009 21:03:29 -0000 1.20
+++ drm-nouveau.patch 10 Mar 2009 03:48:32 -0000 1.21
@@ -17684,10 +17684,10 @@
+}
diff --git a/drivers/gpu/drm/nouveau/nv50_crtc.c b/drivers/gpu/drm/nouveau/nv50_crtc.c
new file mode 100644
-index 0000000..340e772
+index 0000000..fa7376c
--- /dev/null
+++ b/drivers/gpu/drm/nouveau/nv50_crtc.c
-@@ -0,0 +1,775 @@
+@@ -0,0 +1,756 @@
+/*
+ * Copyright (C) 2008 Maarten Maathuis.
+ * All Rights Reserved.
@@ -17785,33 +17785,29 @@
+ DRM_DEBUG("%s\n", blanked ? "blanked" : "unblanked");
+
+ if (blanked) {
-+ crtc->cursor->hide(crtc);
++ crtc->cursor->hide(crtc, false);
+
+ OUT_MODE(NV50_CRTC0_CLUT_MODE + offset,
+ NV50_CRTC0_CLUT_MODE_BLANK);
+ if (dev_priv->chipset != 0x50)
-+ OUT_MODE(NV84_CRTC0_BLANK_UNK1 + offset,
-+ NV84_CRTC0_BLANK_UNK1_BLANK);
++ OUT_MODE(NV84_CRTC0_CLUT_DMA + offset,
++ NV84_CRTC0_CLUT_DMA_DISABLE);
++
+ OUT_MODE(NV50_CRTC0_BLANK_CTRL + offset,
+ NV50_CRTC0_BLANK_CTRL_BLANK);
-+ if (dev_priv->chipset != 0x50)
-+ OUT_MODE(NV84_CRTC0_BLANK_UNK2 + offset,
-+ NV84_CRTC0_BLANK_UNK2_BLANK);
+ } else {
+ crtc->cursor->set_offset(crtc);
-+
-+ if (dev_priv->chipset != 0x50)
-+ OUT_MODE(NV84_CRTC0_BLANK_UNK2 + offset,
-+ NV84_CRTC0_BLANK_UNK2_UNBLANK);
-+
+ if (crtc->cursor->visible)
-+ crtc->cursor->show(crtc);
++ crtc->cursor->show(crtc, false);
+ else
-+ crtc->cursor->hide(crtc);
++ crtc->cursor->hide(crtc, false);
+
++ OUT_MODE(NV50_CRTC0_CLUT_MODE + offset, crtc->lut.depth == 8 ?
++ NV50_CRTC0_CLUT_MODE_OFF : NV50_CRTC0_CLUT_MODE_ON);
+ if (dev_priv->chipset != 0x50)
-+ OUT_MODE(NV84_CRTC0_BLANK_UNK1 + offset,
-+ NV84_CRTC0_BLANK_UNK1_UNBLANK);
++ OUT_MODE(NV84_CRTC0_CLUT_DMA + offset,
++ NV84_CRTC0_CLUT_DMA_LOCAL);
++
+ OUT_MODE(NV50_CRTC0_BLANK_CTRL + offset,
+ NV50_CRTC0_BLANK_CTRL_UNBLANK);
+ }
@@ -18134,13 +18130,12 @@
+
+ crtc->cursor->set_bo(crtc, gem);
+ crtc->cursor->set_offset(crtc);
-+ ret = crtc->cursor->show(crtc);
++ ret = crtc->cursor->show(crtc, true);
+ } else {
+ crtc->cursor->set_bo(crtc, NULL);
-+ crtc->cursor->hide(crtc);
++ crtc->cursor->hide(crtc, true);
+ }
+
-+ OUT_MODE(NV50_UPDATE_DISPLAY, 0);
+ return ret;
+}
+
@@ -18225,13 +18220,42 @@
+}
+
+static int
-+nv50_crtc_execute_mode(struct nouveau_crtc *crtc, struct drm_display_mode *mode)
++nv50_crtc_mode_set(struct drm_crtc *drm_crtc, struct drm_display_mode *mode,
++ struct drm_display_mode *adjusted_mode, int x, int y,
++ struct drm_framebuffer *old_fb)
+{
-+ struct drm_device *dev = crtc->base.dev;
++ struct drm_device *dev = drm_crtc->dev;
++ struct nouveau_crtc *crtc = to_nouveau_crtc(drm_crtc);
++ struct drm_encoder *drm_encoder;
++ struct nouveau_encoder *encoder;
++ struct drm_crtc_helper_funcs *crtc_helper = drm_crtc->helper_private;
++ struct nouveau_connector *connector = NULL;
+ uint32_t hsync_dur, vsync_dur, hsync_start_to_end, vsync_start_to_end;
+ uint32_t hunk1, vunk1, vunk2a, vunk2b;
+ uint32_t offset = crtc->index * 0x400;
+
++ /* Find the connector attached to this CRTC */
++ list_for_each_entry(drm_encoder, &dev->mode_config.encoder_list, head) {
++ struct drm_connector *drm_connector;
++
++ encoder = to_nouveau_encoder(drm_encoder);
++ if (drm_encoder->crtc != &crtc->base)
++ continue;
++
++ list_for_each_entry(drm_connector, &dev->mode_config.connector_list, head) {
++ connector = to_nouveau_connector(drm_connector);
++ if (drm_connector->encoder != drm_encoder)
++ continue;
++
++ break;
++ }
++
++ break; /* no use in finding more than one mode */
++ }
++
++ *crtc->mode = *adjusted_mode;
++ crtc->use_dithering = connector->use_dithering;
++
+ DRM_DEBUG("index %d\n", crtc->index);
+
+ hsync_dur = mode->hsync_end - mode->hsync_start;
@@ -18286,46 +18310,6 @@
+ OUT_MODE(NV50_CRTC0_SCALE_CENTER_OFFSET + offset,
+ NV50_CRTC_SCALE_CENTER_OFFSET_VAL(0,0));
+
-+ nv50_crtc_blank(crtc, false);
-+ return 0;
-+}
-+
-+
-+static int
-+nv50_crtc_mode_set(struct drm_crtc *drm_crtc, struct drm_display_mode *mode,
-+ struct drm_display_mode *adjusted_mode, int x, int y,
-+ struct drm_framebuffer *old_fb)
-+{
-+ struct drm_device *dev = drm_crtc->dev;
-+ struct nouveau_crtc *crtc = to_nouveau_crtc(drm_crtc);
-+ struct drm_encoder *drm_encoder;
-+ struct nouveau_encoder *encoder;
-+ struct drm_crtc_helper_funcs *crtc_helper = drm_crtc->helper_private;
-+ struct nouveau_connector *connector = NULL;
-+
-+ /* Find the connector attached to this CRTC */
-+ list_for_each_entry(drm_encoder, &dev->mode_config.encoder_list, head) {
-+ struct drm_connector *drm_connector;
-+
-+ encoder = to_nouveau_encoder(drm_encoder);
-+ if (drm_encoder->crtc != &crtc->base)
-+ continue;
-+
-+ list_for_each_entry(drm_connector, &dev->mode_config.connector_list, head) {
-+ connector = to_nouveau_connector(drm_connector);
-+ if (drm_connector->encoder != drm_encoder)
-+ continue;
-+
-+ break;
-+ }
-+
-+ break; /* no use in finding more than one mode */
-+ }
-+
-+ *crtc->mode = *adjusted_mode;
-+ crtc->use_dithering = connector->use_dithering;
-+
-+ nv50_crtc_execute_mode(crtc, adjusted_mode);
+ crtc->set_scale(crtc, connector->scaling_mode, false);
+ crtc_helper->mode_set_base(drm_crtc, x, y, old_fb);
+
@@ -18377,12 +18361,9 @@
+ crtc->lut.depth = fb->base.depth;
+ nv50_crtc_lut_load(crtc);
+ }
-+
-+ OUT_MODE(NV50_CRTC0_CLUT_MODE + offset, fb->base.depth == 8 ?
-+ NV50_CRTC0_CLUT_MODE_OFF : NV50_CRTC0_CLUT_MODE_ON);
+ OUT_MODE(NV50_CRTC0_CLUT_OFFSET + offset, crtc->lut.mem->start >> 8);
+
-+ OUT_MODE(NV50_UPDATE_DISPLAY, 0);
++ nv50_crtc_blank(crtc, false);
+ return 0;
+}
+
@@ -18465,10 +18446,10 @@
+}
diff --git a/drivers/gpu/drm/nouveau/nv50_cursor.c b/drivers/gpu/drm/nouveau/nv50_cursor.c
new file mode 100644
-index 0000000..fca5b4a
+index 0000000..5a3cedc
--- /dev/null
+++ b/drivers/gpu/drm/nouveau/nv50_cursor.c
-@@ -0,0 +1,201 @@
+@@ -0,0 +1,217 @@
+/*
+ * Copyright (C) 2008 Maarten Maathuis.
+ * All Rights Reserved.
@@ -18555,8 +18536,9 @@
+}
+
+/* Calling update or changing the stored cursor state is left to the higher level ioctl's. */
-+static int nv50_cursor_show(struct nouveau_crtc *crtc)
++static int nv50_cursor_show(struct nouveau_crtc *crtc, bool update)
+{
++ struct drm_nouveau_private *dev_priv = crtc->base.dev->dev_private;
+ struct drm_device *dev = crtc->base.dev;
+ uint32_t offset = crtc->index * 0x400;
+
@@ -18570,21 +18552,36 @@
+ }
+
+ OUT_MODE(NV50_CRTC0_CURSOR_CTRL + offset, NV50_CRTC0_CURSOR_CTRL_SHOW);
++ if (dev_priv->chipset != 0x50)
++ OUT_MODE(NV84_CRTC0_CURSOR_DMA + offset,
++ NV84_CRTC0_CURSOR_DMA_LOCAL);
++
++ if (update) {
++ OUT_MODE(NV50_UPDATE_DISPLAY, 0);
++ crtc->cursor->visible = true;
++ }
+
-+ crtc->cursor->visible = true;
+ return 0;
+}
+
-+static int nv50_cursor_hide(struct nouveau_crtc *crtc)
++static int nv50_cursor_hide(struct nouveau_crtc *crtc, bool update)
+{
++ struct drm_nouveau_private *dev_priv = crtc->base.dev->dev_private;
+ struct drm_device *dev = crtc->base.dev;
+ uint32_t offset = crtc->index * 0x400;
+
+ DRM_DEBUG("\n");
+
+ OUT_MODE(NV50_CRTC0_CURSOR_CTRL + offset, NV50_CRTC0_CURSOR_CTRL_HIDE);
++ if (dev_priv->chipset != 0x50)
++ OUT_MODE(NV84_CRTC0_CURSOR_DMA + offset,
++ NV84_CRTC0_CURSOR_DMA_DISABLE);
++
++ if (update) {
++ OUT_MODE(NV50_UPDATE_DISPLAY, 0);
++ crtc->cursor->visible = false;
++ }
+
-+ crtc->cursor->visible = false;
+ return 0;
+}
+
@@ -18672,7 +18669,7 @@
+}
diff --git a/drivers/gpu/drm/nouveau/nv50_cursor.h b/drivers/gpu/drm/nouveau/nv50_cursor.h
new file mode 100644
-index 0000000..9be1591
+index 0000000..089a69c
--- /dev/null
+++ b/drivers/gpu/drm/nouveau/nv50_cursor.h
@@ -0,0 +1,45 @@
@@ -18710,8 +18707,8 @@
+ int x, y;
+ bool visible;
+
-+ int (*show) (struct nouveau_crtc *crtc);
-+ int (*hide) (struct nouveau_crtc *crtc);
++ int (*show) (struct nouveau_crtc *crtc, bool update);
++ int (*hide) (struct nouveau_crtc *crtc, bool update);
+ int (*set_pos) (struct nouveau_crtc *crtc, int x, int y);
+ int (*set_offset) (struct nouveau_crtc *crtc);
+ int (*set_bo) (struct nouveau_crtc *crtc, struct drm_gem_object *gem);
@@ -19505,10 +19502,10 @@
+#endif /* __NV50_DISPLAY_H__ */
diff --git a/drivers/gpu/drm/nouveau/nv50_display_commands.h b/drivers/gpu/drm/nouveau/nv50_display_commands.h
new file mode 100644
-index 0000000..97b3d3c
+index 0000000..4fd10c9
--- /dev/null
+++ b/drivers/gpu/drm/nouveau/nv50_display_commands.h
-@@ -0,0 +1,196 @@
+@@ -0,0 +1,195 @@
+/*
+ * Copyright (C) 2008 Maarten Maathuis.
+ * All Rights Reserved.
@@ -19586,10 +19583,9 @@
+ #define NV50_CRTC0_CLUT_MODE_ON 0xC0000000
+#define NV50_CRTC0_CLUT_OFFSET 0x844
+
-+/* Anyone know what part of the chip is triggered here precisely? */
-+#define NV84_CRTC0_BLANK_UNK1 0x85C
-+ #define NV84_CRTC0_BLANK_UNK1_BLANK 0x0
-+ #define NV84_CRTC0_BLANK_UNK1_UNBLANK 0x1
++#define NV84_CRTC0_CLUT_DMA 0x85C
++ #define NV84_CRTC0_CLUT_DMA_DISABLE 0x0
++ #define NV84_CRTC0_CLUT_DMA_LOCAL 0x1
+
+#define NV50_CRTC0_FB_OFFSET 0x860
+
@@ -19616,9 +19612,9 @@
+#define NV50_CRTC0_CURSOR_OFFSET 0x884
+
+/* Anyone know what part of the chip is triggered here precisely? */
-+#define NV84_CRTC0_BLANK_UNK2 0x89C
-+ #define NV84_CRTC0_BLANK_UNK2_BLANK 0x0
-+ #define NV84_CRTC0_BLANK_UNK2_UNBLANK 0x1
++#define NV84_CRTC0_CURSOR_DMA 0x89C
++ #define NV84_CRTC0_CURSOR_DMA_DISABLE 0x0
++ #define NV84_CRTC0_CURSOR_DMA_LOCAL 0x1
+
+#define NV50_CRTC0_DITHERING_CTRL 0x8A0
+ #define NV50_CRTC0_DITHERING_CTRL_ON 0x11
Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/kernel.spec,v
retrieving revision 1.1401
retrieving revision 1.1402
diff -u -r1.1401 -r1.1402
--- kernel.spec 10 Mar 2009 01:09:13 -0000 1.1401
+++ kernel.spec 10 Mar 2009 03:48:33 -0000 1.1402
@@ -1810,6 +1810,9 @@
# and build.
%changelog
+* Tue Mar 10 2009 Ben Skeggs <bskeggs at redhat.com>
+- drm-nouveau.patch: fix kms issues seen while testing original 8800gtx
+
* Tue Mar 10 2009 Dave Airlie <airlied at redhat.com>
- radeon: enable kms on r100/r200
More information about the scm-commits
mailing list