rpms/kernel/devel drm-nouveau.patch, 1.13, 1.14 kernel.spec, 1.1364, 1.1365
Ben Skeggs
bskeggs at fedoraproject.org
Tue Mar 3 10:01:15 UTC 2009
- Previous message: rpms/elisa-plugins-bad/devel elisa-plugins-bad-0.5.2-install.patch, NONE, 1.1 elisa-plugins-bad.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Next message: rpms/gtk-vnc/devel gtk-vnc-0.3.8-sasl-auth.patch, NONE, 1.1 gtk-vnc.spec, 1.28, 1.29
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: bskeggs
Update of /cvs/pkgs/rpms/kernel/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv28065
Modified Files:
drm-nouveau.patch kernel.spec
Log Message:
* Tue Mar 03 2009 Ben Skeggs <bskeggs at redhat.com>
- nouveau: some gf8/9 and kms fixes
drm-nouveau.patch:
Index: drm-nouveau.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/drm-nouveau.patch,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- drm-nouveau.patch 2 Mar 2009 06:13:20 -0000 1.13
+++ drm-nouveau.patch 3 Mar 2009 10:01:14 -0000 1.14
@@ -1361,10 +1361,10 @@
+#endif /* __NOUVEAU_BIOS_H__ */
diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c
new file mode 100644
-index 0000000..1d4d1be
+index 0000000..dc52670
--- /dev/null
+++ b/drivers/gpu/drm/nouveau/nouveau_bo.c
-@@ -0,0 +1,385 @@
+@@ -0,0 +1,414 @@
+/*
+ * Copyright 2007 Dave Airlied
+ * All Rights Reserved.
@@ -1529,6 +1529,7 @@
+ struct drm_device *dev = bo->dev;
+ struct drm_nouveau_private *dev_priv = dev->dev_private;
+ struct nouveau_channel *chan = dev_priv->fifos[bo->new_fence_class];
++ uint64_t src_offset, dst_offset;
+ uint32_t page_count;
+
+ if (!chan) {
@@ -1540,25 +1541,50 @@
+ return -EINVAL;
+ }
+
++ src_offset = old_mem->mm_node->start << PAGE_SHIFT;
++ dst_offset = new_mem->mm_node->start << PAGE_SHIFT;
++ if (dev_priv->card_type >= NV_50 &&
++ !(new_mem->proposed_flags & DRM_NOUVEAU_BO_FLAG_NOVM)) {
++ /* It's quite possibly safe to use bo->offset for src */
++ if (old_mem->mem_type == DRM_BO_MEM_TT)
++ src_offset += dev_priv->vm_gart_base;
++ else
++ src_offset += dev_priv->vm_vram_base;
++
++ if (new_mem->mem_type == DRM_BO_MEM_TT)
++ dst_offset += dev_priv->vm_gart_base;
++ else
++ dst_offset += dev_priv->vm_vram_base;
++ }
++
+ RING_SPACE(chan, 3);
+ BEGIN_RING(chan, NvSubM2MF, NV_MEMORY_TO_MEMORY_FORMAT_DMA_SOURCE, 2);
+ OUT_RING (chan, nouveau_bo_mem_ctxdma(chan, old_mem));
+ OUT_RING (chan, nouveau_bo_mem_ctxdma(chan, new_mem));
+
++ if (dev_priv->card_type >= NV_50) {
++ RING_SPACE(chan, 4);
++ BEGIN_RING(chan, NvSubM2MF, 0x0200, 1);
++ OUT_RING (chan, 1);
++ BEGIN_RING(chan, NvSubM2MF, 0x021c, 1);
++ OUT_RING (chan, 1);
++ }
++
+ page_count = new_mem->num_pages;
+ while (page_count) {
+ int line_count = (page_count > 2047) ? 2047 : page_count;
+
++ if (dev_priv->card_type >= NV_50) {
++ RING_SPACE(chan, 3);
++ BEGIN_RING(chan, NvSubM2MF, 0x0238, 2);
++ OUT_RING (chan, upper_32_bits(src_offset));
++ OUT_RING (chan, upper_32_bits(dst_offset));
++ }
+ RING_SPACE(chan, 11);
+ BEGIN_RING(chan, NvSubM2MF,
+ NV_MEMORY_TO_MEMORY_FORMAT_OFFSET_IN, 8);
-+ /*XXX: not correct on nv5x - these'd be offsets from
-+ * the start of the memtype - not in the GPU
-+ * address space.. sigh.. not used on nv5x currently
-+ * due to other reasons anyhow, so, later!
-+ */
-+ OUT_RING (chan, old_mem->mm_node->start << PAGE_SHIFT);
-+ OUT_RING (chan, new_mem->mm_node->start << PAGE_SHIFT);
++ OUT_RING (chan, lower_32_bits(src_offset));
++ OUT_RING (chan, lower_32_bits(dst_offset));
+ OUT_RING (chan, PAGE_SIZE); /* src_pitch */
+ OUT_RING (chan, PAGE_SIZE); /* dst_pitch */
+ OUT_RING (chan, PAGE_SIZE); /* line_length */
@@ -1569,6 +1595,8 @@
+ OUT_RING (chan, 0);
+
+ page_count -= line_count;
++ src_offset += (PAGE_SIZE * line_count);
++ dst_offset += (PAGE_SIZE * line_count);
+ }
+
+ return drm_bo_move_accel_cleanup(bo, evict, no_wait, chan->id,
@@ -1696,7 +1724,8 @@
+ new_mem);
+ }
+
-+ if (dev_priv->card_type == NV_50)
++ if (dev_priv->card_type == NV_50 &&
++ new_mem->proposed_flags & DRM_NOUVEAU_BO_FLAG_TILE)
+ return drm_bo_move_memcpy(bo, evict, no_wait, new_mem);
+
+ if (new_mem->mem_type == DRM_BO_MEM_LOCAL) {
@@ -1989,7 +2018,7 @@
+
diff --git a/drivers/gpu/drm/nouveau/nouveau_dma.c b/drivers/gpu/drm/nouveau/nouveau_dma.c
new file mode 100644
-index 0000000..5af1577
+index 0000000..e529be0
--- /dev/null
+++ b/drivers/gpu/drm/nouveau/nouveau_dma.c
@@ -0,0 +1,213 @@
@@ -2036,7 +2065,7 @@
+ /* On !mm_enabled, we can't map a GART push buffer into kernel
+ * space easily - so we'll just use VRAM.
+ */
-+ pushbuf = nouveau_mem_alloc(dev, 0, 0x8000,
++ pushbuf = nouveau_mem_alloc(dev, 0, 0x8000, NOUVEAU_MEM_NOVM |
+ NOUVEAU_MEM_FB | NOUVEAU_MEM_MAPPED,
+ (struct drm_file *)-2);
+ if (!pushbuf) {
@@ -3328,10 +3357,10 @@
+#endif /* __NOUVEAU_FB_H__ */
diff --git a/drivers/gpu/drm/nouveau/nouveau_fbcon.c b/drivers/gpu/drm/nouveau/nouveau_fbcon.c
new file mode 100644
-index 0000000..4da3d40
+index 0000000..6c9db9e
--- /dev/null
+++ b/drivers/gpu/drm/nouveau/nouveau_fbcon.c
-@@ -0,0 +1,933 @@
+@@ -0,0 +1,945 @@
+/*
+ * Copyright © 2007 David Airlie
+ *
@@ -3770,6 +3799,7 @@
+ struct drm_gem_object *gem = NULL;
+ struct nouveau_gem_object *ngem;
+ struct device *device = &dev->pdev->dev;
++ struct fb_fillrect rect;
+ int size, ret;
+
+ mode_cmd.width = surface_width;
@@ -3940,6 +3970,17 @@
+ break;
+ };
+
++ /* Clear the entire fbcon. The drm will program every connector
++ * with it's preferred mode. If the sizes differ, one display will
++ * quite likely have garbage around the console.
++ */
++ rect.dx = rect.dy = 0;
++ rect.width = surface_width;
++ rect.height = surface_height;
++ rect.color = 0;
++ rect.rop = ROP_COPY;
++ info->fbops->fb_fillrect(info, &rect);
++
+ /* To allow resizeing without swapping buffers */
+ printk("allocated %dx%d fb: 0x%lx, bo %p\n", nouveau_fb->base.width,
+ nouveau_fb->base.height, ngem->bo->offset, gem);
@@ -4454,7 +4495,7 @@
+};
diff --git a/drivers/gpu/drm/nouveau/nouveau_fifo.c b/drivers/gpu/drm/nouveau/nouveau_fifo.c
new file mode 100644
-index 0000000..9cfc171
+index 0000000..b31a000
--- /dev/null
+++ b/drivers/gpu/drm/nouveau/nouveau_fifo.c
@@ -0,0 +1,673 @@
@@ -4704,8 +4745,8 @@
+ }
+
+ pb = nouveau_mem_alloc(dev, 0, config->cmdbuf.size,
-+ config->cmdbuf.location | NOUVEAU_MEM_MAPPED,
-+ (struct drm_file *)-2);
++ config->cmdbuf.location | NOUVEAU_MEM_MAPPED |
++ NOUVEAU_MEM_NOVM, (struct drm_file *)-2);
+ if (!pb) {
+ DRM_ERROR("Couldn't allocate DMA push buffer\n");
+ return NULL;
@@ -6545,10 +6586,10 @@
+}
diff --git a/drivers/gpu/drm/nouveau/nouveau_mem.c b/drivers/gpu/drm/nouveau/nouveau_mem.c
new file mode 100644
-index 0000000..ca2b935
+index 0000000..abc00ec
--- /dev/null
+++ b/drivers/gpu/drm/nouveau/nouveau_mem.c
-@@ -0,0 +1,1066 @@
+@@ -0,0 +1,1067 @@
+/*
+ * Copyright (C) The Weather Channel, Inc. 2002. All Rights Reserved.
+ * Copyright 2005 Stephane Marchesin
@@ -7119,7 +7160,8 @@
+ bar1_size = drm_get_resource_len(dev, 1) >> PAGE_SHIFT;
+ text_size = (256 * 1024) >> PAGE_SHIFT;
+ if (bar1_size < vram_size) {
-+ if ((ret = drm_bo_init_mm(dev, DRM_BO_MEM_PRIV0, bar1_size,
++ if (dev_priv->card_type < NV_50 &&
++ (ret = drm_bo_init_mm(dev, DRM_BO_MEM_PRIV0, bar1_size,
+ vram_size - bar1_size, 1))) {
+ DRM_ERROR("Failed PRIV0 mm init: %d\n", ret);
+ return ret;
@@ -17595,10 +17637,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..95376f9
+index 0000000..b081230
--- /dev/null
+++ b/drivers/gpu/drm/nouveau/nv50_crtc.c
-@@ -0,0 +1,728 @@
+@@ -0,0 +1,723 @@
+/*
+ * Copyright (C) 2008 Maarten Maathuis.
+ * All Rights Reserved.
@@ -17953,7 +17995,6 @@
+static void nv50_crtc_destroy(struct drm_crtc *drm_crtc)
+{
+ struct nouveau_crtc *crtc = to_nouveau_crtc(drm_crtc);
-+ struct drm_device *dev = drm_crtc->dev;
+
+ DRM_DEBUG("\n");
+
@@ -17965,7 +18006,7 @@
+ nv50_lut_destroy(crtc);
+ nv50_cursor_destroy(crtc);
+
-+ drm_mode_destroy(dev, crtc->mode);
++ kfree(crtc->mode);
+ kfree(crtc);
+}
+
@@ -18019,10 +18060,6 @@
+{
+ struct nouveau_crtc *crtc = to_nouveau_crtc(drm_crtc);
+
-+ /* temporarily disabled due to some bugs */
-+ if (1)
-+ return;
-+
+ if (size != 256)
+ return;
+
@@ -18301,7 +18338,7 @@
+ if (!crtc)
+ return -ENOMEM;
+
-+ crtc->mode = drm_mode_create(dev);
++ crtc->mode = kzalloc(sizeof(*crtc->mode), GFP_KERNEL);
+ if (!crtc->mode) {
+ kfree(crtc);
+ return -ENOMEM;
Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/kernel.spec,v
retrieving revision 1.1364
retrieving revision 1.1365
diff -u -r1.1364 -r1.1365
--- kernel.spec 3 Mar 2009 09:09:16 -0000 1.1364
+++ kernel.spec 3 Mar 2009 10:01:15 -0000 1.1365
@@ -1785,6 +1785,9 @@
# and build.
%changelog
+* Tue Mar 03 2009 Ben Skeggs <bskeggs at redhat.com>
+- nouveau: some gf8/9 and kms fixes
+
* Tue Mar 03 2009 Dave Airlie <airlied at redhat.com> 2.6.29-0.184.rc6.git6
- drm-modesetting-radeon.patch: fix suspend/resume, proc->debugfs
- Previous message: rpms/elisa-plugins-bad/devel elisa-plugins-bad-0.5.2-install.patch, NONE, 1.1 elisa-plugins-bad.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Next message: rpms/gtk-vnc/devel gtk-vnc-0.3.8-sasl-auth.patch, NONE, 1.1 gtk-vnc.spec, 1.28, 1.29
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the scm-commits
mailing list