rpms/kernel/devel drm-next.patch, 1.15, 1.16 drm-page-flip.patch, 1.4, 1.5 kernel.spec, 1.1768, 1.1769 drm-ddc-caching-bug.patch, 1.1, NONE drm-god-shut-up-about-edid-already.patch, 1.1, NONE drm-r600-kms.patch, 1.4, NONE drm-rv710-ucode-fix.patch, 1.1, NONE
Dave Airlie
airlied at fedoraproject.org
Tue Sep 8 03:47:18 UTC 2009
Author: airlied
Update of /cvs/pkgs/rpms/kernel/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv13348
Modified Files:
drm-next.patch drm-page-flip.patch kernel.spec
Removed Files:
drm-ddc-caching-bug.patch
drm-god-shut-up-about-edid-already.patch drm-r600-kms.patch
drm-rv710-ucode-fix.patch
Log Message:
* Tue Sep 08 2009 Dave Airlie <airlied at redhat.com> 2.6.31-0.206.rc9.git1
- drm: rebase to drm-next - r600 accel + kms should start working now
drm-next.patch:
b/drivers/gpu/drm/Kconfig | 18
b/drivers/gpu/drm/Makefile | 8
b/drivers/gpu/drm/drm_cache.c | 46
b/drivers/gpu/drm/drm_crtc.c | 77
b/drivers/gpu/drm/drm_crtc_helper.c | 220
b/drivers/gpu/drm/drm_drv.c | 4
b/drivers/gpu/drm/drm_edid.c | 504
b/drivers/gpu/drm/drm_encoder_slave.c | 116
b/drivers/gpu/drm/drm_fb_helper.c | 701
b/drivers/gpu/drm/drm_gem.c | 11
b/drivers/gpu/drm/drm_mm.c | 21
b/drivers/gpu/drm/drm_modes.c | 435
b/drivers/gpu/drm/drm_proc.c | 17
b/drivers/gpu/drm/drm_sysfs.c | 28
b/drivers/gpu/drm/i915/Makefile | 2
b/drivers/gpu/drm/i915/i915_debugfs.c | 445
b/drivers/gpu/drm/i915/i915_dma.c | 100
b/drivers/gpu/drm/i915/i915_drv.c | 9
b/drivers/gpu/drm/i915/i915_drv.h | 62
b/drivers/gpu/drm/i915/i915_gem.c | 14
b/drivers/gpu/drm/i915/i915_gem_tiling.c | 80
b/drivers/gpu/drm/i915/i915_irq.c | 21
b/drivers/gpu/drm/i915/i915_reg.h | 143
b/drivers/gpu/drm/i915/i915_suspend.c | 4
b/drivers/gpu/drm/i915/intel_bios.c | 8
b/drivers/gpu/drm/i915/intel_crt.c | 28
b/drivers/gpu/drm/i915/intel_display.c | 607
b/drivers/gpu/drm/i915/intel_drv.h | 7
b/drivers/gpu/drm/i915/intel_fb.c | 737
b/drivers/gpu/drm/i915/intel_i2c.c | 8
b/drivers/gpu/drm/i915/intel_lvds.c | 22
b/drivers/gpu/drm/i915/intel_sdvo.c | 331
b/drivers/gpu/drm/i915/intel_tv.c | 30
b/drivers/gpu/drm/mga/mga_dma.c | 4
b/drivers/gpu/drm/mga/mga_drv.h | 1
b/drivers/gpu/drm/mga/mga_warp.c | 180
b/drivers/gpu/drm/r128/r128_cce.c | 116
b/drivers/gpu/drm/r128/r128_drv.h | 8
b/drivers/gpu/drm/r128/r128_state.c | 36
b/drivers/gpu/drm/radeon/Kconfig | 1
b/drivers/gpu/drm/radeon/Makefile | 43
b/drivers/gpu/drm/radeon/atombios.h | 11
b/drivers/gpu/drm/radeon/atombios_crtc.c | 100
b/drivers/gpu/drm/radeon/avivod.h | 60
b/drivers/gpu/drm/radeon/mkregtable.c | 720
b/drivers/gpu/drm/radeon/r100.c | 1047
b/drivers/gpu/drm/radeon/r100_track.h | 124
b/drivers/gpu/drm/radeon/r100d.h | 76
b/drivers/gpu/drm/radeon/r200.c | 456
b/drivers/gpu/drm/radeon/r300.c | 411
b/drivers/gpu/drm/radeon/r300d.h | 76
b/drivers/gpu/drm/radeon/r600.c | 1714 +
b/drivers/gpu/drm/radeon/r600_blit.c | 855
b/drivers/gpu/drm/radeon/r600_blit_kms.c | 777
b/drivers/gpu/drm/radeon/r600_blit_shaders.c | 1072 +
b/drivers/gpu/drm/radeon/r600_blit_shaders.h | 14
b/drivers/gpu/drm/radeon/r600_cp.c | 541
b/drivers/gpu/drm/radeon/r600_cs.c | 658
b/drivers/gpu/drm/radeon/r600d.h | 661
b/drivers/gpu/drm/radeon/radeon.h | 126
b/drivers/gpu/drm/radeon/radeon_asic.h | 159
b/drivers/gpu/drm/radeon/radeon_atombios.c | 79
b/drivers/gpu/drm/radeon/radeon_clocks.c | 10
b/drivers/gpu/drm/radeon/radeon_connectors.c | 215
b/drivers/gpu/drm/radeon/radeon_cp.c | 128
b/drivers/gpu/drm/radeon/radeon_device.c | 340
b/drivers/gpu/drm/radeon/radeon_display.c | 18
b/drivers/gpu/drm/radeon/radeon_drv.c | 21
b/drivers/gpu/drm/radeon/radeon_drv.h | 146
b/drivers/gpu/drm/radeon/radeon_encoders.c | 115
b/drivers/gpu/drm/radeon/radeon_fb.c | 670
b/drivers/gpu/drm/radeon/radeon_fence.c | 54
b/drivers/gpu/drm/radeon/radeon_irq_kms.c | 1
b/drivers/gpu/drm/radeon/radeon_legacy_crtc.c | 44
b/drivers/gpu/drm/radeon/radeon_legacy_encoders.c | 339
b/drivers/gpu/drm/radeon/radeon_legacy_tv.c | 904
b/drivers/gpu/drm/radeon/radeon_mode.h | 52
b/drivers/gpu/drm/radeon/radeon_object.h | 1
b/drivers/gpu/drm/radeon/radeon_reg.h | 79
b/drivers/gpu/drm/radeon/radeon_ring.c | 119
b/drivers/gpu/drm/radeon/radeon_share.h | 77
b/drivers/gpu/drm/radeon/radeon_state.c | 18
b/drivers/gpu/drm/radeon/radeon_ttm.c | 96
b/drivers/gpu/drm/radeon/reg_srcs/r100 | 105
b/drivers/gpu/drm/radeon/reg_srcs/r200 | 184
b/drivers/gpu/drm/radeon/reg_srcs/r300 | 729
b/drivers/gpu/drm/radeon/reg_srcs/rn50 | 30
b/drivers/gpu/drm/radeon/reg_srcs/rs600 | 729
b/drivers/gpu/drm/radeon/reg_srcs/rv515 | 486
b/drivers/gpu/drm/radeon/rs400.c | 2
b/drivers/gpu/drm/radeon/rs600.c | 60
b/drivers/gpu/drm/radeon/rs690.c | 1
b/drivers/gpu/drm/radeon/rv515.c | 518
b/drivers/gpu/drm/radeon/rv515d.h | 220
b/drivers/gpu/drm/radeon/rv770.c | 987
b/drivers/gpu/drm/radeon/rv770d.h | 341
b/drivers/gpu/drm/ttm/ttm_bo.c | 295
b/drivers/gpu/drm/ttm/ttm_bo_util.c | 4
b/drivers/gpu/drm/ttm/ttm_global.c | 4
b/drivers/gpu/drm/ttm/ttm_memory.c | 508
b/drivers/gpu/drm/ttm/ttm_module.c | 58
b/drivers/gpu/drm/ttm/ttm_tt.c | 104
b/firmware/Makefile | 16
b/firmware/WHENCE | 121
b/firmware/matrox/g200_warp.H16 | 28
b/firmware/matrox/g400_warp.H16 | 44
b/firmware/r128/r128_cce.bin.ihex | 129
b/firmware/radeon/R100_cp.bin.ihex | 130
b/firmware/radeon/R200_cp.bin.ihex | 130
b/firmware/radeon/R300_cp.bin.ihex | 130
b/firmware/radeon/R420_cp.bin.ihex | 130
b/firmware/radeon/R520_cp.bin.ihex | 130
b/firmware/radeon/R600_me.bin.ihex | 1345 +
b/firmware/radeon/R600_pfp.bin.ihex | 145
b/firmware/radeon/RS600_cp.bin.ihex | 130
b/firmware/radeon/RS690_cp.bin.ihex | 130
b/firmware/radeon/RS780_me.bin.ihex | 1345 +
b/firmware/radeon/RS780_pfp.bin.ihex | 145
b/firmware/radeon/RV610_me.bin.ihex | 1345 +
b/firmware/radeon/RV610_pfp.bin.ihex | 145
b/firmware/radeon/RV620_me.bin.ihex | 1345 +
b/firmware/radeon/RV620_pfp.bin.ihex | 145
b/firmware/radeon/RV630_me.bin.ihex | 1345 +
b/firmware/radeon/RV630_pfp.bin.ihex | 145
b/firmware/radeon/RV635_me.bin.ihex | 1345 +
b/firmware/radeon/RV635_pfp.bin.ihex | 145
b/firmware/radeon/RV670_me.bin.ihex | 1345 +
b/firmware/radeon/RV670_pfp.bin.ihex | 145
b/firmware/radeon/RV710_me.bin.ihex | 341
b/firmware/radeon/RV710_pfp.bin.ihex | 213
b/firmware/radeon/RV730_me.bin.ihex | 341
b/firmware/radeon/RV730_pfp.bin.ihex | 213
b/firmware/radeon/RV770_me.bin.ihex | 341
b/firmware/radeon/RV770_pfp.bin.ihex | 213
b/include/drm/drmP.h | 54
b/include/drm/drm_cache.h | 38
b/include/drm/drm_crtc.h | 16
b/include/drm/drm_crtc_helper.h | 3
b/include/drm/drm_encoder_slave.h | 162
b/include/drm/drm_fb_helper.h | 82
b/include/drm/drm_mm.h | 7
b/include/drm/drm_mode.h | 11
b/include/drm/drm_sysfs.h | 12
b/include/drm/ttm/ttm_bo_api.h | 13
b/include/drm/ttm/ttm_bo_driver.h | 94
b/include/drm/ttm/ttm_memory.h | 43
b/include/drm/ttm/ttm_module.h | 2
drivers/gpu/drm/i915/i915_gem_debugfs.c | 396
drivers/gpu/drm/mga/mga_ucode.h |11645 ----------
drivers/gpu/drm/radeon/r300.h | 36
drivers/gpu/drm/radeon/r600_microcode.h |23297 ----------------------
drivers/gpu/drm/radeon/radeon_microcode.h | 1844 -
drivers/gpu/drm/radeon/rs780.c | 102
drivers/gpu/drm/radeon/rv515r.h | 170
154 files changed, 33671 insertions(+), 41498 deletions(-)
View full diff with command:
/usr/bin/cvs -n -f diff -kk -u -p -N -r 1.15 -r 1.16 drm-next.patchIndex: drm-next.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/drm-next.patch,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -p -r1.15 -r1.16
--- drm-next.patch 8 Sep 2009 02:05:24 -0000 1.15
+++ drm-next.patch 8 Sep 2009 03:47:16 -0000 1.16
@@ -1,393 +1,154 @@
-commit 50f153036c9d9e4ae1768d5ca9c2ad4184f7a0b7
-Author: Dave Airlie <airlied at redhat.com>
-Date: Fri Aug 21 13:21:01 2009 +1000
-
- drm/radeon/kms: generate the safe register tables.
-
- Previously we just made these offline and included them,
- but no reason we can't generate them at build time.
-
- TODO: add rs690 + r100/r200 when done.
- should we do rs480/rs690 no tcl version?
-
- Signed-off-by: Dave Airlie <airlied at redhat.com>
-
-commit 759e4f83f418f4001e724042b4c0e408d615d9ec
-Author: Thomas Hellstrom <thellstrom at vmware.com>
-Date: Thu Aug 20 10:29:09 2009 +0200
-
- drm/ttm: Fixes for "Memory accounting rework."
-
- ttm:
- Fix error paths when kobject_add returns an error.
-
- Signed-off-by: Thomas Hellstrom <thellstrom at vmware.com>
- Signed-off-by: Dave Airlie <airlied at redhat.com>
-
-commit 7f5f4db2d50ea1af8f160686d2e97bbfa5102b4f
-Author: Thomas Hellstrom <thellstrom at vmware.com>
-Date: Thu Aug 20 10:29:08 2009 +0200
-
- drm/ttm: Fixes for "Make parts of a struct ttm_bo_device global"
-
- ttm:
- Remove a stray debug printout.
- Remove a re-init of the lru spinlock at device init.
-
- radeon:
- Fix the size of the bo_global allocation.
-
- Signed-off-by: Thomas Hellstrom <thellstrom at vmware.com>
- Signed-off-by: Dave Airlie <airlied at redhat.com>
-
-commit 51c8b4071d84d46cc100baa5931ad06b2a823c95
-Merge: a987fca... 6c30c53...
-Author: Dave Airlie <airlied at redhat.com>
-Date: Thu Aug 20 13:38:04 2009 +1000
-
- Merge Linus master to drm-next
-
- linux-next conflict reported needed resolution.
-
- Conflicts:
- drivers/gpu/drm/drm_crtc.c
- drivers/gpu/drm/drm_edid.c
- drivers/gpu/drm/i915/intel_sdvo.c
- drivers/gpu/drm/radeon/radeon_ttm.c
- drivers/gpu/drm/ttm/ttm_bo.c
-
-commit a987fcaa805fcb24ba885c2e29fd4fdb6816f08f
-Author: Thomas Hellstrom <thellstrom at vmware.com>
-Date: Tue Aug 18 16:51:56 2009 +0200
-
- ttm: Make parts of a struct ttm_bo_device global.
-
- Common resources, like memory accounting and swap lists should be
- global and not per device. Introduce a struct ttm_bo_global to
- accomodate this, and register it with sysfs. Add a small sysfs interface
- to return the number of active buffer objects.
-
- Signed-off-by: Thomas Hellstrom <thellstrom at vmware.com>
- Signed-off-by: Dave Airlie <airlied at linux.ie>
-
-commit 5fd9cbad3a4ae82c83c55b9c621d156c326724ef
-Author: Thomas Hellstrom <thellstrom at vmware.com>
-Date: Mon Aug 17 16:28:39 2009 +0200
-
- drm/ttm: Memory accounting rework.
-
- Use inclusive zones to simplify accounting and its sysfs representation.
- Use DMA32 accounting where applicable.
-
- Add a sysfs interface to make the heuristically determined limits
- readable and configurable.
-
- Signed-off-by: Thomas Hellstrom <thellstrom at vmware.com>
- Signed-off-by: Dave Airlie <airlied at linux.ie>
-
-commit e9840be8c23601285a70520b4898818f28ce8c2b
-Author: Thomas Hellstrom <thellstrom at vmware.com>
-Date: Tue Aug 18 10:27:57 2009 +0200
-
- drm/ttm: Add a virtual ttm sysfs device.
-
- The device directory will be the base directory of the
- sysfs representation of other ttm subsystems.
-
- Signed-off-by: Thomas Hellstrom <thellstrom at vmware.com>
- Signed-off-by: Dave Airlie <airlied at linux.ie>
-
-commit 327c225bd548bf7871f116a0baa5ebdac884e452
-Author: Thomas Hellstrom <thellstrom at vmware.com>
-Date: Mon Aug 17 16:28:37 2009 +0200
-
- drm: Enable drm drivers to add drm sysfs devices.
-
- Export utility functions for drivers to add specialized devices in the
- sysfs drm class subdirectory.
-
- Initially this will be needed form TTM to add a virtual device that
- handles power management.
-
- Signed-off-by: Thomas Hellstrom <thellstrom at vmware.com>
- Signed-off-by: Dave Airlie <airlied at linux.ie>
-
-commit a0724fcf829e5afb66159ef68cb16a805ea11b42
-Author: Pekka Paalanen <pq at iki.fi>
-Date: Mon Aug 17 01:18:38 2009 +0300
-
- drm/ttm: optimize bo_kmap_type values
-
- A micro-optimization on the function ttm_kmap_obj_virtual().
-
- By defining the values of enum ttm_bo_kmap_obj::bo_kmap_type to have a
- bit indicating iomem, size of the function ttm_kmap_obj_virtual() will be
- reduced by 16 bytes on x86_64 (gcc 4.1.2).
-
- ttm_kmap_obj_virtual() may be heavily used, when buffer objects are
- accessed via wrappers, that work for both kinds of memory addresses:
- iomem cookies and kernel virtual.
-
- Signed-off-by: Pekka Paalanen <pq at iki.fi>
- Signed-off-by: Dave Airlie <airlied at redhat.com>
-
-commit 949ef70e2d1a5c12178875f513df34fc85d91a38
-Author: Pekka Paalanen <pq at iki.fi>
-Date: Mon Aug 17 19:49:19 2009 +0300
-
- drm/kms: no need to return void value (encoder)
-
- Cc: Francisco Jerez <currojerez at riseup.net>
- Signed-off-by: Pekka Paalanen <pq at iki.fi>
- Signed-off-by: Dave Airlie <airlied at redhat.com>
-
-commit 53bd83899f5ba6b0da8f5ef976129273854a72d4
-Author: Jesse Barnes <jbarnes at virtuousgeek.org>
-Date: Wed Jul 1 10:04:40 2009 -0700
-
- drm: clarify scaling property names
-
- Now that we're using the scaling property in the Intel driver I noticed
- that the names were a bit confusing. I've corrected them according to
- our discussion on IRC and the mailing list, though I've left out
- potential new additions for a new scaling property with an integer (or
- two) for the scaling factor. None of the drivers implement that today,
- but if someone wants to do it, I think it could be done with the
- addition of a single new type and a new property to describe the
- scaling factor in the X and Y directions.
-
- Signed-off-by: Jesse Barnes <jbarnes at virtuousgeek.org>
- Acked-by: Alex Deucher <alexdeucher at gmail.com>
- Signed-off-by: Dave Airlie <airlied at redhat.com>
-
-commit 776f3360de6ed246e973577828f725681120fd7a
-Author: Dave Airlie <airlied at linux.ie>
-Date: Wed Aug 19 15:56:37 2009 +1000
-
- drm: fixup includes in encoder slave header files.
-
- Signed-off-by: Dave Airlie <airlied at redhat.com>
-
-commit 453a7d46dca88704ed88b364c445ff55680a8557
-Author: Jesse Barnes <jbarnes at virtuousgeek.org>
-Date: Wed Aug 19 15:51:55 2009 +1000
-
- drm: remove root requirement from DRM_IOCTL_SET_VERSION (+ DRM_IOCTL_AUTH_MAGIC)
-
- Just a DRM_MASTER flag is sufficient here, though maybe this call is
- totally deprecated anyway (xf86-video-intel still calls it though).
-
- (airlied: drop ioctl auth_magic as discussed on mailing list also)
-
- Signed-off-by: Jesse Barnes <jbarnes at virtuousgeek.org>
- Signed-off-by: Dave Airlie <airlied at redhat.com>
-
-commit cfcf4738cd6b5d7bed1473acad76d6430cf1fb0a
-Author: Dave Airlie <airlied at redhat.com>
-Date: Thu Aug 13 13:31:54 2009 +1000
-
- drm: fixup include file in drm_encoder_slave
-
- Signed-off-by: Dave Airlie <airlied at redhat.com>
[...78299 lines suppressed...]
++ * of the Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
++ * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM,
++ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
++ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
++ * USE OR OTHER DEALINGS IN THE SOFTWARE.
++ *
++ *
++ **************************************************************************/
++/*
++ * Authors:
++ * Dave Airlie <airlied at redhat.com>
++ */
++
++#ifndef _DRM_CACHE_H_
++#define _DRM_CACHE_H_
++
++void drm_clflush_pages(struct page *pages[], unsigned long num_pages);
++
++#endif
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
-index 7300fb8..db92a83 100644
+index 7300fb8..ae1e9e1 100644
--- a/include/drm/drm_crtc.h
+++ b/include/drm/drm_crtc.h
-@@ -572,6 +572,12 @@ struct drm_mode_config {
+@@ -259,6 +259,8 @@ struct drm_framebuffer {
+ void *fbdev;
+ u32 pseudo_palette[17];
+ struct list_head filp_head;
++ /* if you are using the helper */
++ void *helper_private;
+ };
+
+ struct drm_property_blob {
+@@ -572,6 +574,12 @@ struct drm_mode_config {
struct drm_property *tv_right_margin_property;
struct drm_property *tv_top_margin_property;
struct drm_property *tv_bottom_margin_property;
@@ -5844,7 +80603,7 @@ index 7300fb8..db92a83 100644
/* Optional properties */
struct drm_property *scaling_mode_property;
-@@ -736,4 +742,10 @@ extern int drm_mode_gamma_get_ioctl(struct drm_device *dev,
+@@ -736,4 +744,12 @@ extern int drm_mode_gamma_get_ioctl(struct drm_device *dev,
extern int drm_mode_gamma_set_ioctl(struct drm_device *dev,
void *data, struct drm_file *file_priv);
extern bool drm_detect_hdmi_monitor(struct edid *edid);
@@ -5854,7 +80613,30 @@ index 7300fb8..db92a83 100644
+extern struct drm_display_mode *drm_gtf_mode(struct drm_device *dev,
+ int hdisplay, int vdisplay, int vrefresh,
+ bool interlaced, int margins);
++extern int drm_add_modes_noedid(struct drm_connector *connector,
++ int hdisplay, int vdisplay);
#endif /* __DRM_CRTC_H__ */
+diff --git a/include/drm/drm_crtc_helper.h b/include/drm/drm_crtc_helper.h
+index 6769ff6..4c8daca 100644
+--- a/include/drm/drm_crtc_helper.h
++++ b/include/drm/drm_crtc_helper.h
+@@ -79,6 +79,8 @@ struct drm_encoder_helper_funcs {
+ /* detect for DAC style encoders */
+ enum drm_connector_status (*detect)(struct drm_encoder *encoder,
+ struct drm_connector *connector);
++ /* disable encoder when not in use - more explicit than dpms off */
++ void (*disable)(struct drm_encoder *encoder);
+ };
+
+ struct drm_connector_helper_funcs {
+@@ -98,6 +100,7 @@ extern bool drm_crtc_helper_set_mode(struct drm_crtc *crtc,
+ int x, int y,
+ struct drm_framebuffer *old_fb);
+ extern bool drm_helper_crtc_in_use(struct drm_crtc *crtc);
++extern bool drm_helper_encoder_in_use(struct drm_encoder *encoder);
+
+ extern void drm_helper_connector_dpms(struct drm_connector *connector, int mode);
+
diff --git a/include/drm/drm_encoder_slave.h b/include/drm/drm_encoder_slave.h
new file mode 100644
index 0000000..2f65633
@@ -6023,6 +80805,117 @@ index 0000000..2f65633
+void drm_i2c_encoder_destroy(struct drm_encoder *encoder);
+
+#endif
+diff --git a/include/drm/drm_fb_helper.h b/include/drm/drm_fb_helper.h
+new file mode 100644
+index 0000000..88fffbd
+--- /dev/null
++++ b/include/drm/drm_fb_helper.h
+@@ -0,0 +1,82 @@
++/*
++ * Copyright (c) 2006-2009 Red Hat Inc.
++ * Copyright (c) 2006-2008 Intel Corporation
++ * Copyright (c) 2007 Dave Airlie <airlied at linux.ie>
++ *
++ * DRM framebuffer helper functions
++ *
++ * Permission to use, copy, modify, distribute, and sell this software and its
++ * documentation for any purpose is hereby granted without fee, provided that
++ * the above copyright notice appear in all copies and that both that copyright
++ * notice and this permission notice appear in supporting documentation, and
++ * that the name of the copyright holders not be used in advertising or
++ * publicity pertaining to distribution of the software without specific,
++ * written prior permission. The copyright holders make no representations
++ * about the suitability of this software for any purpose. It is provided "as
++ * is" without express or implied warranty.
++ *
++ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
++ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
++ * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
++ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
++ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
++ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
++ * OF THIS SOFTWARE.
++ *
++ * Authors:
++ * Dave Airlie <airlied at linux.ie>
++ * Jesse Barnes <jesse.barnes at intel.com>
++ */
++#ifndef DRM_FB_HELPER_H
++#define DRM_FB_HELPER_H
++
++struct drm_fb_helper_crtc {
++ uint32_t crtc_id;
++ struct drm_mode_set mode_set;
++};
++
++struct drm_fb_helper_funcs {
++ void (*gamma_set)(struct drm_crtc *crtc, u16 red, u16 green,
++ u16 blue, int regno);
++};
++
++struct drm_fb_helper {
++ struct drm_framebuffer *fb;
++ struct drm_device *dev;
++ struct drm_display_mode *mode;
++ int crtc_count;
++ struct drm_fb_helper_crtc *crtc_info;
++ struct drm_fb_helper_funcs *funcs;
++ int conn_limit;
++ struct list_head kernel_fb_list;
++};
++
++int drm_fb_helper_single_fb_probe(struct drm_device *dev,
++ int (*fb_create)(struct drm_device *dev,
++ uint32_t fb_width,
++ uint32_t fb_height,
++ uint32_t surface_width,
++ uint32_t surface_height,
++ struct drm_framebuffer **fb_ptr));
++int drm_fb_helper_init_crtc_count(struct drm_fb_helper *helper, int crtc_count,
++ int max_conn);
++void drm_fb_helper_free(struct drm_fb_helper *helper);
++int drm_fb_helper_blank(int blank, struct fb_info *info);
++int drm_fb_helper_pan_display(struct fb_var_screeninfo *var,
++ struct fb_info *info);
++int drm_fb_helper_set_par(struct fb_info *info);
++int drm_fb_helper_check_var(struct fb_var_screeninfo *var,
++ struct fb_info *info);
++int drm_fb_helper_setcolreg(unsigned regno,
++ unsigned red,
++ unsigned green,
++ unsigned blue,
++ unsigned transp,
++ struct fb_info *info);
++
++void drm_fb_helper_restore(void);
++void drm_fb_helper_fill_var(struct fb_info *info, struct drm_framebuffer *fb,
++ uint32_t fb_width, uint32_t fb_height);
++void drm_fb_helper_fill_fix(struct fb_info *info, uint32_t pitch);
++
++#endif
+diff --git a/include/drm/drm_mm.h b/include/drm/drm_mm.h
+index f833207..62329f9 100644
+--- a/include/drm/drm_mm.h
++++ b/include/drm/drm_mm.h
+@@ -37,6 +37,9 @@
+ * Generic range manager structs
+ */
+ #include <linux/list.h>
++#ifdef CONFIG_DEBUG_FS
++#include <linux/seq_file.h>
++#endif
+
+ struct drm_mm_node {
+ struct list_head fl_entry;
+@@ -96,4 +99,8 @@ static inline struct drm_mm *drm_get_mm(struct drm_mm_node *block)
+ return block->mm;
+ }
+
++#ifdef CONFIG_DEBUG_FS
++int drm_mm_dump_table(struct seq_file *m, struct drm_mm *mm);
++#endif
++
+ #endif
diff --git a/include/drm/drm_mode.h b/include/drm/drm_mode.h
index ae304cc..1f90841 100644
--- a/include/drm/drm_mode.h
drm-page-flip.patch:
b/drivers/gpu/drm/drm_crtc.c | 169 +++++++++++++++-
b/drivers/gpu/drm/drm_crtc_helper.c | 12 +
b/drivers/gpu/drm/drm_drv.c | 1
b/drivers/gpu/drm/drm_fops.c | 68 ++++++
b/drivers/gpu/drm/drm_irq.c | 43 ++++
b/drivers/gpu/drm/i915/i915_drv.c | 1
b/drivers/gpu/drm/i915/intel_display.c | 26 +-
b/drivers/gpu/drm/radeon/radeon_display.c | 3
b/include/drm/drm.h | 25 ++
b/include/drm/drmP.h | 32 +++
b/include/drm/drm_crtc.h | 27 ++
b/include/drm/drm_crtc_helper.h | 4
b/include/drm/drm_mode.h | 16 +
linux-2.6.30.noarch/drivers/gpu/drm/nouveau/nv04_crtc.c | 2
linux-2.6.30.noarch/drivers/gpu/drm/nouveau/nv50_crtc.c | 2
15 files changed, 415 insertions(+), 16 deletions(-)
Index: drm-page-flip.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/drm-page-flip.patch,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -p -r1.4 -r1.5
--- drm-page-flip.patch 25 Aug 2009 00:53:29 -0000 1.4
+++ drm-page-flip.patch 8 Sep 2009 03:47:17 -0000 1.5
@@ -1,6 +1,7 @@
-diff -up linux-2.6.30.noarch/drivers/gpu/drm/drm_crtc.c.pf linux-2.6.30.noarch/drivers/gpu/drm/drm_crtc.c
---- linux-2.6.30.noarch/drivers/gpu/drm/drm_crtc.c.pf 2009-08-25 09:52:20.000000000 +1000
-+++ linux-2.6.30.noarch/drivers/gpu/drm/drm_crtc.c 2009-08-25 09:52:41.000000000 +1000
+diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
+index ba728ad..4b7e748 100644
+--- a/drivers/gpu/drm/drm_crtc.c
++++ b/drivers/gpu/drm/drm_crtc.c
@@ -34,6 +34,8 @@
#include "drmP.h"
#include "drm_crtc.h"
@@ -10,7 +11,7 @@ diff -up linux-2.6.30.noarch/drivers/gpu
struct drm_prop_enum_list {
int type;
char *name;
-@@ -329,6 +331,34 @@ void drm_framebuffer_cleanup(struct drm_
+@@ -330,6 +332,34 @@ void drm_framebuffer_cleanup(struct drm_framebuffer *fb)
EXPORT_SYMBOL(drm_framebuffer_cleanup);
/**
@@ -45,7 +46,7 @@ diff -up linux-2.6.30.noarch/drivers/gpu
* drm_crtc_init - Initialise a new CRTC object
* @dev: DRM device
* @crtc: CRTC object to init
-@@ -339,17 +369,19 @@ EXPORT_SYMBOL(drm_framebuffer_cleanup);
+@@ -340,17 +370,19 @@ EXPORT_SYMBOL(drm_framebuffer_cleanup);
*
* Inits a new object created as base part of an driver crtc object.
*/
@@ -66,7 +67,7 @@ diff -up linux-2.6.30.noarch/drivers/gpu
mutex_unlock(&dev->mode_config.mutex);
}
EXPORT_SYMBOL(drm_crtc_init);
-@@ -368,6 +400,9 @@ void drm_crtc_cleanup(struct drm_crtc *c
+@@ -369,6 +401,9 @@ void drm_crtc_cleanup(struct drm_crtc *crtc)
{
struct drm_device *dev = crtc->dev;
@@ -76,7 +77,7 @@ diff -up linux-2.6.30.noarch/drivers/gpu
if (crtc->gamma_store) {
kfree(crtc->gamma_store);
crtc->gamma_store = NULL;
-@@ -375,6 +410,7 @@ void drm_crtc_cleanup(struct drm_crtc *c
+@@ -376,6 +411,7 @@ void drm_crtc_cleanup(struct drm_crtc *crtc)
drm_mode_object_put(dev, &crtc->base);
list_del(&crtc->head);
@@ -84,7 +85,7 @@ diff -up linux-2.6.30.noarch/drivers/gpu
dev->mode_config.num_crtc--;
}
EXPORT_SYMBOL(drm_crtc_cleanup);
-@@ -2478,3 +2514,134 @@ out:
+@@ -2479,3 +2515,134 @@ out:
mutex_unlock(&dev->mode_config.mutex);
return ret;
}
@@ -219,10 +220,11 @@ diff -up linux-2.6.30.noarch/drivers/gpu
+
+ return ret;
+}
-diff -up linux-2.6.30.noarch/drivers/gpu/drm/drm_crtc_helper.c.pf linux-2.6.30.noarch/drivers/gpu/drm/drm_crtc_helper.c
---- linux-2.6.30.noarch/drivers/gpu/drm/drm_crtc_helper.c.pf 2009-08-25 09:52:20.000000000 +1000
-+++ linux-2.6.30.noarch/drivers/gpu/drm/drm_crtc_helper.c 2009-08-25 09:52:41.000000000 +1000
-@@ -874,8 +874,10 @@ int drm_crtc_helper_set_config(struct dr
+diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c
+index ff447f1..fec66f9 100644
+--- a/drivers/gpu/drm/drm_crtc_helper.c
++++ b/drivers/gpu/drm/drm_crtc_helper.c
+@@ -872,8 +872,10 @@ int drm_crtc_helper_set_config(struct drm_mode_set *set)
old_fb = set->crtc->fb;
if (set->crtc->fb != set->fb)
set->crtc->fb = set->fb;
@@ -231,9 +233,9 @@ diff -up linux-2.6.30.noarch/drivers/gpu
set->x, set->y, old_fb);
+ mutex_unlock(&dev->struct_mutex);
if (ret != 0)
- goto fail_set_mode;
+ goto fail;
}
-@@ -1101,3 +1103,13 @@ int drm_helper_resume_force_mode(struct
+@@ -1095,3 +1097,13 @@ int drm_helper_resume_force_mode(struct drm_device *dev)
return 0;
}
EXPORT_SYMBOL(drm_helper_resume_force_mode);
@@ -247,10 +249,11 @@ diff -up linux-2.6.30.noarch/drivers/gpu
+ return crtc_funcs->mode_set_base(crtc, x, y, old_fb);
+}
+EXPORT_SYMBOL(drm_crtc_helper_set_base);
-diff -up linux-2.6.30.noarch/drivers/gpu/drm/drm_drv.c.pf linux-2.6.30.noarch/drivers/gpu/drm/drm_drv.c
---- linux-2.6.30.noarch/drivers/gpu/drm/drm_drv.c.pf 2009-08-25 09:52:20.000000000 +1000
-+++ linux-2.6.30.noarch/drivers/gpu/drm/drm_drv.c 2009-08-25 09:52:41.000000000 +1000
-@@ -145,6 +145,7 @@ static struct drm_ioctl_desc drm_ioctls[
+diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
+index a75ca63..672f473 100644
+--- a/drivers/gpu/drm/drm_drv.c
++++ b/drivers/gpu/drm/drm_drv.c
+@@ -145,6 +145,7 @@ static struct drm_ioctl_desc drm_ioctls[] = {
DRM_IOCTL_DEF(DRM_IOCTL_MODE_GETFB, drm_mode_getfb, DRM_MASTER|DRM_CONTROL_ALLOW),
DRM_IOCTL_DEF(DRM_IOCTL_MODE_ADDFB, drm_mode_addfb, DRM_MASTER|DRM_CONTROL_ALLOW),
DRM_IOCTL_DEF(DRM_IOCTL_MODE_RMFB, drm_mode_rmfb, DRM_MASTER|DRM_CONTROL_ALLOW),
@@ -258,10 +261,11 @@ diff -up linux-2.6.30.noarch/drivers/gpu
};
#define DRM_CORE_IOCTL_COUNT ARRAY_SIZE( drm_ioctls )
-diff -up linux-2.6.30.noarch/drivers/gpu/drm/drm_fops.c.pf linux-2.6.30.noarch/drivers/gpu/drm/drm_fops.c
---- linux-2.6.30.noarch/drivers/gpu/drm/drm_fops.c.pf 2009-08-25 09:35:48.000000000 +1000
-+++ linux-2.6.30.noarch/drivers/gpu/drm/drm_fops.c 2009-08-25 09:52:41.000000000 +1000
-@@ -257,6 +257,8 @@ static int drm_open_helper(struct inode
+diff --git a/drivers/gpu/drm/drm_fops.c b/drivers/gpu/drm/drm_fops.c
+index 251bc0e..dcd9c66 100644
+--- a/drivers/gpu/drm/drm_fops.c
++++ b/drivers/gpu/drm/drm_fops.c
+@@ -257,6 +257,8 @@ static int drm_open_helper(struct inode *inode, struct file *filp,
INIT_LIST_HEAD(&priv->lhead);
INIT_LIST_HEAD(&priv->fbs);
@@ -270,7 +274,7 @@ diff -up linux-2.6.30.noarch/drivers/gpu
if (dev->driver->driver_features & DRIVER_GEM)
drm_gem_open(dev, priv);
-@@ -429,6 +431,9 @@ int drm_release(struct inode *inode, str
+@@ -429,6 +431,9 @@ int drm_release(struct inode *inode, struct file *filp)
{
struct drm_file *file_priv = filp->private_data;
struct drm_device *dev = file_priv->minor->dev;
@@ -280,7 +284,7 @@ diff -up linux-2.6.30.noarch/drivers/gpu
int retcode = 0;
lock_kernel();
-@@ -451,6 +456,19 @@ int drm_release(struct inode *inode, str
+@@ -451,6 +456,19 @@ int drm_release(struct inode *inode, struct file *filp)
if (file_priv->minor->master)
drm_master_release(dev, filp);
@@ -300,7 +304,7 @@ diff -up linux-2.6.30.noarch/drivers/gpu
if (dev->driver->driver_features & DRIVER_GEM)
drm_gem_release(dev, file_priv);
-@@ -544,9 +562,55 @@ int drm_release(struct inode *inode, str
+@@ -544,9 +562,55 @@ int drm_release(struct inode *inode, struct file *filp)
}
EXPORT_SYMBOL(drm_release);
@@ -358,9 +362,10 @@ diff -up linux-2.6.30.noarch/drivers/gpu
+ return mask;
}
EXPORT_SYMBOL(drm_poll);
-diff -up linux-2.6.30.noarch/drivers/gpu/drm/drm_irq.c.pf linux-2.6.30.noarch/drivers/gpu/drm/drm_irq.c
---- linux-2.6.30.noarch/drivers/gpu/drm/drm_irq.c.pf 2009-08-25 09:35:48.000000000 +1000
-+++ linux-2.6.30.noarch/drivers/gpu/drm/drm_irq.c 2009-08-25 09:52:41.000000000 +1000
+diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c
+index f85aaf2..2fe0be4 100644
+--- a/drivers/gpu/drm/drm_irq.c
++++ b/drivers/gpu/drm/drm_irq.c
@@ -34,6 +34,7 @@
*/
@@ -369,7 +374,7 @@ diff -up linux-2.6.30.noarch/drivers/gpu
#include <linux/interrupt.h> /* For task queue support */
-@@ -71,6 +72,44 @@ int drm_irq_by_busid(struct drm_device *
+@@ -71,6 +72,44 @@ int drm_irq_by_busid(struct drm_device *dev, void *data,
return 0;
}
@@ -414,7 +419,7 @@ diff -up linux-2.6.30.noarch/drivers/gpu
static void vblank_disable_fn(unsigned long arg)
{
struct drm_device *dev = (struct drm_device *)arg;
-@@ -161,6 +200,8 @@ int drm_vblank_init(struct drm_device *d
+@@ -161,6 +200,8 @@ int drm_vblank_init(struct drm_device *dev, int num_crtcs)
atomic_set(&dev->vblank_refcount[i], 0);
}
@@ -423,7 +428,7 @@ diff -up linux-2.6.30.noarch/drivers/gpu
dev->vblank_disable_allowed = 0;
return 0;
-@@ -626,5 +667,7 @@ void drm_handle_vblank(struct drm_device
+@@ -626,5 +667,7 @@ void drm_handle_vblank(struct drm_device *dev, int crtc)
{
atomic_inc(&dev->_vblank_count[crtc]);
DRM_WAKEUP(&dev->vbl_queue[crtc]);
@@ -431,10 +436,11 @@ diff -up linux-2.6.30.noarch/drivers/gpu
}
EXPORT_SYMBOL(drm_handle_vblank);
+
-diff -up linux-2.6.30.noarch/drivers/gpu/drm/i915/i915_drv.c.pf linux-2.6.30.noarch/drivers/gpu/drm/i915/i915_drv.c
---- linux-2.6.30.noarch/drivers/gpu/drm/i915/i915_drv.c.pf 2009-08-25 09:35:48.000000000 +1000
-+++ linux-2.6.30.noarch/drivers/gpu/drm/i915/i915_drv.c 2009-08-25 09:52:41.000000000 +1000
-@@ -203,6 +203,7 @@ static struct drm_driver driver = {
+diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
+index dbe568c..b81305e 100644
+--- a/drivers/gpu/drm/i915/i915_drv.c
++++ b/drivers/gpu/drm/i915/i915_drv.c
+@@ -206,6 +206,7 @@ static struct drm_driver driver = {
.mmap = drm_gem_mmap,
.poll = drm_poll,
.fasync = drm_fasync,
@@ -442,10 +448,11 @@ diff -up linux-2.6.30.noarch/drivers/gpu
#ifdef CONFIG_COMPAT
.compat_ioctl = i915_compat_ioctl,
#endif
-diff -up linux-2.6.30.noarch/drivers/gpu/drm/i915/intel_display.c.pf linux-2.6.30.noarch/drivers/gpu/drm/i915/intel_display.c
---- linux-2.6.30.noarch/drivers/gpu/drm/i915/intel_display.c.pf 2009-08-25 09:35:48.000000000 +1000
-+++ linux-2.6.30.noarch/drivers/gpu/drm/i915/intel_display.c 2009-08-25 09:52:41.000000000 +1000
-@@ -917,6 +917,8 @@ intel_pipe_set_base(struct drm_crtc *crt
+diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
+index 155719f..0d6e677 100644
+--- a/drivers/gpu/drm/i915/intel_display.c
++++ b/drivers/gpu/drm/i915/intel_display.c
+@@ -973,6 +973,8 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y,
u32 dspcntr, alignment;
int ret;
@@ -454,7 +461,7 @@ diff -up linux-2.6.30.noarch/drivers/gpu
/* no fb bound */
if (!crtc->fb) {
DRM_DEBUG("No FB bound\n");
-@@ -952,17 +954,14 @@ intel_pipe_set_base(struct drm_crtc *crt
+@@ -1008,17 +1010,14 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y,
BUG();
}
@@ -472,7 +479,15 @@ diff -up linux-2.6.30.noarch/drivers/gpu
return ret;
}
-@@ -998,7 +997,6 @@ intel_pipe_set_base(struct drm_crtc *crt
+@@ -1029,7 +1028,6 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y,
+ ret = i915_gem_object_get_fence_reg(obj);
+ if (ret != 0) {
+ i915_gem_object_unpin(obj);
+- mutex_unlock(&dev->struct_mutex);
+ return ret;
+ }
+ }
+@@ -1054,7 +1052,6 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y,
default:
DRM_ERROR("Unknown color depth\n");
i915_gem_object_unpin(obj);
@@ -480,7 +495,7 @@ diff -up linux-2.6.30.noarch/drivers/gpu
return -EINVAL;
}
if (IS_I965G(dev)) {
-@@ -1026,13 +1024,11 @@ intel_pipe_set_base(struct drm_crtc *crt
+@@ -1086,17 +1083,14 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y,
I915_READ(dspbase);
}
@@ -488,14 +503,18 @@ diff -up linux-2.6.30.noarch/drivers/gpu
-
if (old_fb) {
intel_fb = to_intel_framebuffer(old_fb);
+ obj_priv = intel_fb->obj->driver_private;
+ intel_wait_for_vblank(dev);
i915_gem_object_unpin(intel_fb->obj);
}
-- mutex_unlock(&dev->struct_mutex);
+ intel_increase_pllclock(crtc, true);
+- mutex_unlock(&dev->struct_mutex);
+-
if (!dev->primary->master)
return 0;
-@@ -2605,7 +2601,9 @@ static int intel_crtc_mode_set(struct dr
+
+@@ -2732,7 +2726,9 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc,
I915_WRITE(dspcntr_reg, dspcntr);
/* Flush the plane changes */
@@ -505,7 +524,7 @@ diff -up linux-2.6.30.noarch/drivers/gpu
intel_update_watermarks(dev);
-@@ -3081,6 +3079,7 @@ static const struct drm_crtc_funcs intel
+@@ -3521,6 +3517,7 @@ static const struct drm_crtc_funcs intel_crtc_funcs = {
.gamma_set = intel_crtc_gamma_set,
.set_config = drm_crtc_helper_set_config,
.destroy = intel_crtc_destroy,
@@ -513,7 +532,7 @@ diff -up linux-2.6.30.noarch/drivers/gpu
};
-@@ -3093,7 +3092,7 @@ static void intel_crtc_init(struct drm_d
+@@ -3533,7 +3530,7 @@ static void intel_crtc_init(struct drm_device *dev, int pipe)
if (intel_crtc == NULL)
return;
@@ -522,7 +541,7 @@ diff -up linux-2.6.30.noarch/drivers/gpu
drm_mode_crtc_set_gamma_size(&intel_crtc->base, 256);
intel_crtc->pipe = pipe;
-@@ -3327,9 +3326,18 @@ static int intel_user_framebuffer_create
+@@ -3717,9 +3714,18 @@ static int intel_user_framebuffer_create_handle(struct drm_framebuffer *fb,
return drm_gem_handle_create(file_priv, object, handle);
}
@@ -541,34 +560,11 @@ diff -up linux-2.6.30.noarch/drivers/gpu
};
int intel_framebuffer_create(struct drm_device *dev,
-diff -up linux-2.6.30.noarch/drivers/gpu/drm/nouveau/nv04_crtc.c.pf linux-2.6.30.noarch/drivers/gpu/drm/nouveau/nv04_crtc.c
---- linux-2.6.30.noarch/drivers/gpu/drm/nouveau/nv04_crtc.c.pf 2009-08-25 09:52:20.000000000 +1000
-+++ linux-2.6.30.noarch/drivers/gpu/drm/nouveau/nv04_crtc.c 2009-08-25 09:52:41.000000000 +1000
-@@ -1122,7 +1122,7 @@ nv04_crtc_create(struct drm_device *dev,
- nv_crtc->mode_set.connectors = (struct drm_connector **)(nv_crtc + 1);
- nv_crtc->mode_set.num_connectors = 0;
-
-- drm_crtc_init(dev, &nv_crtc->base, &nv04_crtc_funcs);
-+ drm_crtc_init(dev, &nv_crtc->base, crtc_num, &nv04_crtc_funcs);
- drm_crtc_helper_add(&nv_crtc->base, &nv04_crtc_helper_funcs);
- drm_mode_crtc_set_gamma_size(&nv_crtc->base, 256);
-
-diff -up linux-2.6.30.noarch/drivers/gpu/drm/nouveau/nv50_crtc.c.pf linux-2.6.30.noarch/drivers/gpu/drm/nouveau/nv50_crtc.c
---- linux-2.6.30.noarch/drivers/gpu/drm/nouveau/nv50_crtc.c.pf 2009-08-25 09:52:20.000000000 +1000
-+++ linux-2.6.30.noarch/drivers/gpu/drm/nouveau/nv50_crtc.c 2009-08-25 09:52:41.000000000 +1000
-@@ -810,7 +810,7 @@ nv50_crtc_create(struct drm_device *dev,
- crtc->mode_set.connectors = (struct drm_connector **)(crtc + 1);
- crtc->mode_set.num_connectors = 0;
-
-- drm_crtc_init(dev, &crtc->base, &nv50_crtc_funcs);
-+ drm_crtc_init(dev, &crtc->base, index, &nv50_crtc_funcs);
- drm_crtc_helper_add(&crtc->base, &nv50_crtc_helper_funcs);
- drm_mode_crtc_set_gamma_size(&crtc->base, 256);
-
-diff -up linux-2.6.30.noarch/drivers/gpu/drm/radeon/radeon_display.c.pf linux-2.6.30.noarch/drivers/gpu/drm/radeon/radeon_display.c
---- linux-2.6.30.noarch/drivers/gpu/drm/radeon/radeon_display.c.pf 2009-08-25 09:35:49.000000000 +1000
-+++ linux-2.6.30.noarch/drivers/gpu/drm/radeon/radeon_display.c 2009-08-25 09:52:41.000000000 +1000
-@@ -171,6 +171,7 @@ static const struct drm_crtc_funcs radeo
+diff --git a/drivers/gpu/drm/radeon/radeon_display.c b/drivers/gpu/drm/radeon/radeon_display.c
+index 9d817a6..6f2dabf 100644
+--- a/drivers/gpu/drm/radeon/radeon_display.c
++++ b/drivers/gpu/drm/radeon/radeon_display.c
+@@ -168,6 +168,7 @@ static const struct drm_crtc_funcs radeon_crtc_funcs = {
.gamma_set = radeon_crtc_gamma_set,
.set_config = drm_crtc_helper_set_config,
.destroy = radeon_crtc_destroy,
@@ -576,7 +572,7 @@ diff -up linux-2.6.30.noarch/drivers/gpu
};
static void radeon_crtc_init(struct drm_device *dev, int index)
-@@ -183,7 +184,7 @@ static void radeon_crtc_init(struct drm_
+@@ -180,7 +181,7 @@ static void radeon_crtc_init(struct drm_device *dev, int index)
if (radeon_crtc == NULL)
return;
@@ -585,21 +581,131 @@ diff -up linux-2.6.30.noarch/drivers/gpu
drm_mode_crtc_set_gamma_size(&radeon_crtc->base, 256);
radeon_crtc->crtc_id = index;
-diff -up linux-2.6.30.noarch/include/drm/drm_crtc_helper.h.pf linux-2.6.30.noarch/include/drm/drm_crtc_helper.h
---- linux-2.6.30.noarch/include/drm/drm_crtc_helper.h.pf 2009-06-10 13:05:27.000000000 +1000
-+++ linux-2.6.30.noarch/include/drm/drm_crtc_helper.h 2009-08-25 09:52:41.000000000 +1000
-@@ -123,4 +123,8 @@ static inline void drm_connector_helper_
- }
+diff --git a/include/drm/drm.h b/include/drm/drm.h
+index 7cb50bd..1920323 100644
+--- a/include/drm/drm.h
++++ b/include/drm/drm.h
+@@ -686,6 +686,7 @@ struct drm_gem_open {
+ #define DRM_IOCTL_MODE_GETFB DRM_IOWR(0xAD, struct drm_mode_fb_cmd)
+ #define DRM_IOCTL_MODE_ADDFB DRM_IOWR(0xAE, struct drm_mode_fb_cmd)
+ #define DRM_IOCTL_MODE_RMFB DRM_IOWR(0xAF, unsigned int)
++#define DRM_IOCTL_MODE_PAGE_FLIP DRM_IOW( 0xB0, struct drm_mode_page_flip)
- extern int drm_helper_resume_force_mode(struct drm_device *dev);
+ /**
+ * Device specific ioctls should only be in their respective headers
+@@ -698,6 +699,30 @@ struct drm_gem_open {
+ #define DRM_COMMAND_BASE 0x40
+ #define DRM_COMMAND_END 0xA0
+
++/**
++ * Header for events written back to userspace on the drm fd. The
++ * type defines the type of event, the length specifies the total
++ * length of the event (including the header), and user_data is
++ * typically a 64 bit value passed with the ioctl that triggered the
++ * event. A read on the drm fd will always only return complete
++ * events, that is, if for example the read buffer is 100 bytes, and
++ * there are two 64 byte events pending, only one will be returned.
++ */
++struct drm_event {
++ __u32 type;
++ __u32 length;
++};
+
-+extern int drm_crtc_helper_set_base(struct drm_crtc *crtc, int x, int y,
-+ struct drm_framebuffer *old_fb);
++#define DRM_EVENT_MODE_PAGE_FLIP 0x01
+
- #endif
-diff -up linux-2.6.30.noarch/include/drm/drm_crtc.h.pf linux-2.6.30.noarch/include/drm/drm_crtc.h
---- linux-2.6.30.noarch/include/drm/drm_crtc.h.pf 2009-08-25 09:52:20.000000000 +1000
-+++ linux-2.6.30.noarch/include/drm/drm_crtc.h 2009-08-25 09:52:41.000000000 +1000
++struct drm_event_page_flip {
++ struct drm_event base;
++ __u64 user_data;
++ __u32 tv_sec;
++ __u32 tv_usec;
++ __u32 frame;
++};
++
+ /* typedef area */
+ #ifndef __KERNEL__
+ typedef struct drm_clip_rect drm_clip_rect_t;
+diff --git a/include/drm/drmP.h b/include/drm/drmP.h
+index eeefb63..5431888 100644
+--- a/include/drm/drmP.h
++++ b/include/drm/drmP.h
+@@ -426,6 +426,14 @@ struct drm_buf_entry {
+ struct drm_freelist freelist;
+ };
+
++/* Event queued up for userspace to read */
++struct drm_pending_event {
++ struct drm_event *event;
++ struct list_head link;
++ struct drm_file *file_priv;
++ void (*destroy) (struct drm_pending_event *event);
++};
++
+ /** File private data */
+ struct drm_file {
+ int authenticated;
+@@ -449,6 +457,9 @@ struct drm_file {
+ struct drm_master *master; /* master this node is currently associated with
+ N.B. not always minor->master */
+ struct list_head fbs;
++
++ wait_queue_head_t event_wait;
++ struct list_head event_list;
+ };
+
+ /** Wait queue */
+@@ -897,6 +908,16 @@ struct drm_minor {
+ struct drm_mode_group mode_group;
+ };
+
++struct drm_pending_flip {
++ struct drm_pending_event pending_event;
++ struct drm_framebuffer *old_fb;
++ struct drm_crtc *crtc;
++ u32 frame;
++ int pipe;
++ struct list_head link;
++ struct drm_event_page_flip event;
++};
++
+ /**
+ * DRM device structure. This structure represent a complete card that
+ * may contain multiple heads.
+@@ -996,6 +1017,13 @@ struct drm_device {
+
+ u32 max_vblank_count; /**< size of vblank counter register */
+
++ struct work_struct flip_work;
++
++ /**
++ * List of objects waiting on flip completion
++ */
++ struct list_head flip_list;
++
+ /*@} */
+ cycles_t ctx_start;
+ cycles_t lck_start;
+@@ -1132,6 +1160,8 @@ extern int drm_lastclose(struct drm_device *dev);
+ extern int drm_open(struct inode *inode, struct file *filp);
+ extern int drm_stub_open(struct inode *inode, struct file *filp);
+ extern int drm_fasync(int fd, struct file *filp, int on);
++extern ssize_t drm_read(struct file *filp, char __user *buffer,
++ size_t count, loff_t *offset);
+ extern int drm_release(struct inode *inode, struct file *filp);
+
+ /* Mapping support (drm_vm.h) */
+@@ -1298,6 +1328,8 @@ extern void drm_vblank_pre_modeset(struct drm_device *dev, int crtc);
+ extern void drm_vblank_post_modeset(struct drm_device *dev, int crtc);
+ extern int drm_modeset_ctl(struct drm_device *dev, void *data,
+ struct drm_file *file_priv);
++extern void drm_finish_pending_flip(struct drm_device *dev,
++ struct drm_pending_flip *f, u32 frame);
+
+ /* AGP/GART support (drm_agpsupport.h) */
+ extern struct drm_agp_head *drm_agp_init(struct drm_device *dev);
+diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
+index ae1e9e1..525f770 100644
+--- a/include/drm/drm_crtc.h
++++ b/include/drm/drm_crtc.h
@@ -238,6 +238,12 @@ struct drm_display_info {
};
@@ -613,7 +719,7 @@ diff -up linux-2.6.30.noarch/include/drm
void (*destroy)(struct drm_framebuffer *framebuffer);
int (*create_handle)(struct drm_framebuffer *fb,
struct drm_file *file_priv,
-@@ -288,6 +294,7 @@ struct drm_property {
+@@ -290,6 +296,7 @@ struct drm_property {
struct drm_crtc;
struct drm_connector;
struct drm_encoder;
@@ -621,7 +727,7 @@ diff -up linux-2.6.30.noarch/include/drm
/**
* drm_crtc_funcs - control CRTCs for a given device
-@@ -331,17 +338,29 @@ struct drm_crtc_funcs {
+@@ -333,17 +340,29 @@ struct drm_crtc_funcs {
void (*destroy)(struct drm_crtc *crtc);
int (*set_config)(struct drm_mode_set *set);
@@ -651,7 +757,7 @@ diff -up linux-2.6.30.noarch/include/drm
*
* Each CRTC may have one or more connectors associated with it. This structure
* allows the CRTC to be controlled.
-@@ -359,6 +378,7 @@ struct drm_crtc {
+@@ -361,6 +380,7 @@ struct drm_crtc {
struct drm_display_mode mode;
@@ -659,7 +765,7 @@ diff -up linux-2.6.30.noarch/include/drm
int x, y;
struct drm_display_mode *desired_mode;
int desired_x, desired_y;
-@@ -368,6 +388,10 @@ struct drm_crtc {
+@@ -370,6 +390,10 @@ struct drm_crtc {
uint32_t gamma_size;
uint16_t *gamma_store;
@@ -670,7 +776,7 @@ diff -up linux-2.6.30.noarch/include/drm
/* if you are using the helper */
void *helper_private;
};
-@@ -595,6 +619,7 @@ struct drm_mode_config {
+@@ -597,6 +621,7 @@ struct drm_mode_config {
extern void drm_crtc_init(struct drm_device *dev,
struct drm_crtc *crtc,
@@ -678,7 +784,7 @@ diff -up linux-2.6.30.noarch/include/drm
const struct drm_crtc_funcs *funcs);
extern void drm_crtc_cleanup(struct drm_crtc *crtc);
-@@ -742,6 +767,8 @@ extern int drm_mode_gamma_get_ioctl(stru
+@@ -744,6 +769,8 @@ extern int drm_mode_gamma_get_ioctl(struct drm_device *dev,
extern int drm_mode_gamma_set_ioctl(struct drm_device *dev,
void *data, struct drm_file *file_priv);
extern bool drm_detect_hdmi_monitor(struct edid *edid);
@@ -687,51 +793,23 @@ diff -up linux-2.6.30.noarch/include/drm
extern struct drm_display_mode *drm_cvt_mode(struct drm_device *dev,
int hdisplay, int vdisplay, int vrefresh,
bool reduced, bool interlaced);
-diff -up linux-2.6.30.noarch/include/drm/drm.h.pf linux-2.6.30.noarch/include/drm/drm.h
---- linux-2.6.30.noarch/include/drm/drm.h.pf 2009-06-10 13:05:27.000000000 +1000
-+++ linux-2.6.30.noarch/include/drm/drm.h 2009-08-25 09:52:41.000000000 +1000
-@@ -686,6 +686,7 @@ struct drm_gem_open {
- #define DRM_IOCTL_MODE_GETFB DRM_IOWR(0xAD, struct drm_mode_fb_cmd)
- #define DRM_IOCTL_MODE_ADDFB DRM_IOWR(0xAE, struct drm_mode_fb_cmd)
- #define DRM_IOCTL_MODE_RMFB DRM_IOWR(0xAF, unsigned int)
-+#define DRM_IOCTL_MODE_PAGE_FLIP DRM_IOW( 0xB0, struct drm_mode_page_flip)
-
- /**
- * Device specific ioctls should only be in their respective headers
-@@ -698,6 +699,30 @@ struct drm_gem_open {
- #define DRM_COMMAND_BASE 0x40
- #define DRM_COMMAND_END 0xA0
+diff --git a/include/drm/drm_crtc_helper.h b/include/drm/drm_crtc_helper.h
+index 4c8daca..b5bd0b8 100644
+--- a/include/drm/drm_crtc_helper.h
++++ b/include/drm/drm_crtc_helper.h
+@@ -126,4 +126,8 @@ static inline void drm_connector_helper_add(struct drm_connector *connector,
+ }
-+/**
-+ * Header for events written back to userspace on the drm fd. The
-+ * type defines the type of event, the length specifies the total
-+ * length of the event (including the header), and user_data is
-+ * typically a 64 bit value passed with the ioctl that triggered the
-+ * event. A read on the drm fd will always only return complete
-+ * events, that is, if for example the read buffer is 100 bytes, and
-+ * there are two 64 byte events pending, only one will be returned.
-+ */
-+struct drm_event {
-+ __u32 type;
-+ __u32 length;
-+};
-+
-+#define DRM_EVENT_MODE_PAGE_FLIP 0x01
+ extern int drm_helper_resume_force_mode(struct drm_device *dev);
+
-+struct drm_event_page_flip {
-+ struct drm_event base;
-+ __u64 user_data;
-+ __u32 tv_sec;
-+ __u32 tv_usec;
-+ __u32 frame;
-+};
++extern int drm_crtc_helper_set_base(struct drm_crtc *crtc, int x, int y,
++ struct drm_framebuffer *old_fb);
+
- /* typedef area */
- #ifndef __KERNEL__
- typedef struct drm_clip_rect drm_clip_rect_t;
-diff -up linux-2.6.30.noarch/include/drm/drm_mode.h.pf linux-2.6.30.noarch/include/drm/drm_mode.h
---- linux-2.6.30.noarch/include/drm/drm_mode.h.pf 2009-08-25 09:52:20.000000000 +1000
-+++ linux-2.6.30.noarch/include/drm/drm_mode.h 2009-08-25 09:52:41.000000000 +1000
+ #endif
+diff --git a/include/drm/drm_mode.h b/include/drm/drm_mode.h
+index 1f90841..6f08a77 100644
+--- a/include/drm/drm_mode.h
++++ b/include/drm/drm_mode.h
@@ -268,4 +268,20 @@ struct drm_mode_crtc_lut {
__u64 blue;
};
@@ -753,80 +831,27 @@ diff -up linux-2.6.30.noarch/include/drm
+};
+
#endif
-diff -up linux-2.6.30.noarch/include/drm/drmP.h.pf linux-2.6.30.noarch/include/drm/drmP.h
---- linux-2.6.30.noarch/include/drm/drmP.h.pf 2009-08-25 09:52:20.000000000 +1000
-+++ linux-2.6.30.noarch/include/drm/drmP.h 2009-08-25 09:52:41.000000000 +1000
-@@ -426,6 +426,14 @@ struct drm_buf_entry {
- struct drm_freelist freelist;
- };
-
-+/* Event queued up for userspace to read */
-+struct drm_pending_event {
-+ struct drm_event *event;
-+ struct list_head link;
-+ struct drm_file *file_priv;
-+ void (*destroy) (struct drm_pending_event *event);
-+};
-+
- /** File private data */
- struct drm_file {
- int authenticated;
-@@ -449,6 +457,9 @@ struct drm_file {
- struct drm_master *master; /* master this node is currently associated with
- N.B. not always minor->master */
- struct list_head fbs;
-+
-+ wait_queue_head_t event_wait;
-+ struct list_head event_list;
- };
-
- /** Wait queue */
-@@ -897,6 +908,16 @@ struct drm_minor {
- struct drm_mode_group mode_group;
- };
-
-+struct drm_pending_flip {
-+ struct drm_pending_event pending_event;
-+ struct drm_framebuffer *old_fb;
-+ struct drm_crtc *crtc;
-+ u32 frame;
-+ int pipe;
-+ struct list_head link;
-+ struct drm_event_page_flip event;
-+};
-+
- /**
- * DRM device structure. This structure represent a complete card that
- * may contain multiple heads.
-@@ -996,6 +1017,13 @@ struct drm_device {
+diff -up linux-2.6.30.noarch/drivers/gpu/drm/nouveau/nv04_crtc.c.pf linux-2.6.30.noarch/drivers/gpu/drm/nouveau/nv04_crtc.c
+--- linux-2.6.30.noarch/drivers/gpu/drm/nouveau/nv04_crtc.c.pf 2009-08-25 09:52:20.000000000 +1000
++++ linux-2.6.30.noarch/drivers/gpu/drm/nouveau/nv04_crtc.c 2009-08-25 09:52:41.000000000 +1000
+@@ -1122,7 +1122,7 @@ nv04_crtc_create(struct drm_device *dev,
+ nv_crtc->mode_set.connectors = (struct drm_connector **)(nv_crtc + 1);
+ nv_crtc->mode_set.num_connectors = 0;
- u32 max_vblank_count; /**< size of vblank counter register */
+- drm_crtc_init(dev, &nv_crtc->base, &nv04_crtc_funcs);
++ drm_crtc_init(dev, &nv_crtc->base, crtc_num, &nv04_crtc_funcs);
+ drm_crtc_helper_add(&nv_crtc->base, &nv04_crtc_helper_funcs);
+ drm_mode_crtc_set_gamma_size(&nv_crtc->base, 256);
-+ struct work_struct flip_work;
-+
-+ /**
-+ * List of objects waiting on flip completion
-+ */
-+ struct list_head flip_list;
-+
- /*@} */
- cycles_t ctx_start;
- cycles_t lck_start;
-@@ -1132,6 +1160,8 @@ extern int drm_lastclose(struct drm_devi
- extern int drm_open(struct inode *inode, struct file *filp);
- extern int drm_stub_open(struct inode *inode, struct file *filp);
- extern int drm_fasync(int fd, struct file *filp, int on);
-+extern ssize_t drm_read(struct file *filp, char __user *buffer,
-+ size_t count, loff_t *offset);
- extern int drm_release(struct inode *inode, struct file *filp);
+diff -up linux-2.6.30.noarch/drivers/gpu/drm/nouveau/nv50_crtc.c.pf linux-2.6.30.noarch/drivers/gpu/drm/nouveau/nv50_crtc.c
+--- linux-2.6.30.noarch/drivers/gpu/drm/nouveau/nv50_crtc.c.pf 2009-08-25 09:52:20.000000000 +1000
++++ linux-2.6.30.noarch/drivers/gpu/drm/nouveau/nv50_crtc.c 2009-08-25 09:52:41.000000000 +1000
+@@ -810,7 +810,7 @@ nv50_crtc_create(struct drm_device *dev,
+ crtc->mode_set.connectors = (struct drm_connector **)(crtc + 1);
+ crtc->mode_set.num_connectors = 0;
- /* Mapping support (drm_vm.h) */
-@@ -1300,6 +1330,8 @@ extern void drm_vblank_pre_modeset(struc
- extern void drm_vblank_post_modeset(struct drm_device *dev, int crtc);
- extern int drm_modeset_ctl(struct drm_device *dev, void *data,
- struct drm_file *file_priv);
-+extern void drm_finish_pending_flip(struct drm_device *dev,
-+ struct drm_pending_flip *f, u32 frame);
+- drm_crtc_init(dev, &crtc->base, &nv50_crtc_funcs);
++ drm_crtc_init(dev, &crtc->base, index, &nv50_crtc_funcs);
+ drm_crtc_helper_add(&crtc->base, &nv50_crtc_helper_funcs);
+ drm_mode_crtc_set_gamma_size(&crtc->base, 256);
- /* AGP/GART support (drm_agpsupport.h) */
- extern struct drm_agp_head *drm_agp_init(struct drm_device *dev);
Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/kernel.spec,v
retrieving revision 1.1768
retrieving revision 1.1769
diff -u -p -r1.1768 -r1.1769
--- kernel.spec 8 Sep 2009 02:05:24 -0000 1.1768
+++ kernel.spec 8 Sep 2009 03:47:17 -0000 1.1769
@@ -696,10 +696,6 @@ Patch1821: drm-page-flip.patch
# intel drm is all merged upstream
Patch1824: drm-intel-next.patch
Patch1825: drm-intel-pm.patch
-Patch1826: drm-r600-kms.patch
-Patch1827: drm-rv710-ucode-fix.patch
-Patch1828: drm-god-shut-up-about-edid-already.patch
-Patch1829: drm-ddc-caching-bug.patch
# vga arb
Patch1900: linux-2.6-vga-arb.patch
@@ -1327,10 +1323,6 @@ ApplyPatch linux-2.6-e1000-ich9.patch
# Nouveau DRM + drm fixes
ApplyPatch drm-next.patch
-ApplyPatch drm-r600-kms.patch
-ApplyPatch drm-rv710-ucode-fix.patch
-ApplyPatch drm-god-shut-up-about-edid-already.patch
-ApplyPatch drm-ddc-caching-bug.patch
ApplyPatch drm-nouveau.patch
# pm broken on my thinkpad t60p - airlied
@@ -1339,7 +1331,8 @@ ApplyPatch drm-i915-resume-force-mode.pa
ApplyPatch drm-intel-big-hammer.patch
ApplyPatch drm-page-flip.patch
ApplyOptionalPatch drm-intel-next.patch
-ApplyPatch drm-intel-pm.patch
+#this appears to be upstream - mjg59?
+#ApplyPatch drm-intel-pm.patch
# VGA arb + drm
ApplyPatch linux-2.6-vga-arb.patch
@@ -2027,6 +2020,9 @@ fi
# and build.
%changelog
+* Tue Sep 08 2009 Dave Airlie <airlied at redhat.com> 2.6.31-0.206.rc9.git1
+- drm: rebase to drm-next - r600 accel + kms should start working now
+
* Mon Sep 07 2009 Chuck Ebbert <cebbert at redhat.com> 2.6.31-0.205.rc9.git1
- 2.6.31-rc9-git1
- Temporarily hack the drm-next patch so it still applies; the result
--- drm-ddc-caching-bug.patch DELETED ---
--- drm-god-shut-up-about-edid-already.patch DELETED ---
--- drm-r600-kms.patch DELETED ---
--- drm-rv710-ucode-fix.patch DELETED ---
More information about the fedora-extras-commits
mailing list