rpms/kernel/F-10 drm-f10-compat.patch, NONE, 1.1 drm-modesetting-radeon.patch, 1.78, 1.79 drm-next.patch, 1.15, 1.16 kernel.spec, 1.1314, 1.1315
Dave Airlie
airlied at fedoraproject.org
Fri Apr 3 03:26:40 UTC 2009
- Previous message (by thread): rpms/nautilus/devel .cvsignore, 1.93, 1.94 nautilus.spec, 1.267, 1.268 sources, 1.97, 1.98
- Next message (by thread): rpms/anaconda/devel .cvsignore, 1.630, 1.631 anaconda.spec, 1.778, 1.779 sources, 1.764, 1.765
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: airlied
Update of /cvs/pkgs/rpms/kernel/F-10
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv27073
Modified Files:
drm-modesetting-radeon.patch drm-next.patch kernel.spec
Added Files:
drm-f10-compat.patch
Log Message:
* Fri Apr 03 2009 Dave Airlie <airlied at redhat.com>
- add backwards drm compat for radeon kms
drm-f10-compat.patch:
--- NEW FILE drm-f10-compat.patch ---
>From 5b64dc2000826365cff157de0bbeaedc21eb90d7 Mon Sep 17 00:00:00 2001
From: Dave Airlie <airlied at redhat.com>
Date: Fri, 3 Apr 2009 13:19:09 +1000
Subject: [PATCH] drm: backwards compat layer on top of F11 DRM for F10
for radeon kms
---
drivers/gpu/drm/radeon/radeon_gem.c | 254 +++++++++++++++++++++++++++++++++++
include/drm/drm.h | 39 +++---
include/drm/drm_mode.h | 23 ++--
include/drm/radeon_drm.h | 18 +++-
4 files changed, 306 insertions(+), 28 deletions(-)
diff --git a/drivers/gpu/drm/radeon/radeon_gem.c b/drivers/gpu/drm/radeon/radeon_gem.c
index ab9c005..2fd1c5d 100644
--- a/drivers/gpu/drm/radeon/radeon_gem.c
+++ b/drivers/gpu/drm/radeon/radeon_gem.c
@@ -30,6 +30,9 @@
static int radeon_gem_ib_init(struct drm_device *dev);
static int radeon_gem_ib_destroy(struct drm_device *dev);
+static int radeon_gem_dma_bufs_init(struct drm_device *dev);
+static void radeon_gem_dma_bufs_destroy(struct drm_device *dev);
+
int radeon_gem_init_object(struct drm_gem_object *obj)
{
struct drm_radeon_gem_object *obj_priv;
@@ -721,6 +724,7 @@ int radeon_alloc_gart_objects(struct drm_device *dev)
/* init the indirect buffers */
radeon_gem_ib_init(dev);
+ radeon_gem_dma_bufs_init(dev);
return 0;
}
@@ -1158,6 +1162,8 @@ void radeon_gem_mm_fini(struct drm_device *dev)
{
drm_radeon_private_t *dev_priv = dev->dev_private;
+ radeon_gem_dma_bufs_destroy(dev);
+
radeon_gem_ib_destroy(dev);
mutex_lock(&dev->struct_mutex);
@@ -1583,3 +1589,251 @@ void radeon_gem_update_offsets(struct drm_device *dev, struct drm_master *master
}
+
+#define RADEON_DMA_BUFFER_SIZE (64 * 1024)
+#define RADEON_DMA_BUFFER_COUNT (16)
+
+
+/**
+ * Cleanup after an error on one of the addbufs() functions.
+ *
+ * \param dev DRM device.
+ * \param entry buffer entry where the error occurred.
+ *
+ * Frees any pages and buffers associated with the given entry.
+ */
+static void drm_cleanup_buf_error(struct drm_device * dev,
+ struct drm_buf_entry * entry)
+{
+ int i;
+
+ if (entry->seg_count) {
+ for (i = 0; i < entry->seg_count; i++) {
+ if (entry->seglist[i]) {
+ drm_pci_free(dev, entry->seglist[i]);
+ }
+ }
+ drm_free(entry->seglist,
+ entry->seg_count *
+ sizeof(*entry->seglist), DRM_MEM_SEGS);
+
+ entry->seg_count = 0;
+ }
+
+ if (entry->buf_count) {
+ for (i = 0; i < entry->buf_count; i++) {
+ if (entry->buflist[i].dev_private) {
+ drm_free(entry->buflist[i].dev_private,
+ entry->buflist[i].dev_priv_size,
+ DRM_MEM_BUFS);
+ }
+ }
+ drm_free(entry->buflist,
+ entry->buf_count *
+ sizeof(*entry->buflist), DRM_MEM_BUFS);
+
+ entry->buf_count = 0;
+ }
+}
+
+static int radeon_gem_addbufs(struct drm_device *dev)
+{
+ struct drm_radeon_private *dev_priv = dev->dev_private;
+ struct drm_device_dma *dma = dev->dma;
+ struct drm_buf_entry *entry;
+ struct drm_buf *buf;
+ unsigned long offset;
+ unsigned long agp_offset;
+ int count;
+ int order;
+ int size;
+ int alignment;
+ int page_order;
+ int total;
+ int byte_count;
+ int i;
+ struct drm_buf **temp_buflist;
+
+ if (!dma)
+ return -EINVAL;
+
+ count = RADEON_DMA_BUFFER_COUNT;
+ order = drm_order(RADEON_DMA_BUFFER_SIZE);
+ size = 1 << order;
+
+ alignment = PAGE_ALIGN(size);
+ page_order = order - PAGE_SHIFT > 0 ? order - PAGE_SHIFT : 0;
+ total = PAGE_SIZE << page_order;
+
+ byte_count = 0;
+ agp_offset = dev_priv->mm.dma_bufs.bo->offset;
+
+ DRM_DEBUG("count: %d\n", count);
+ DRM_DEBUG("order: %d\n", order);
+ DRM_DEBUG("size: %d\n", size);
+ DRM_DEBUG("agp_offset: %lu\n", agp_offset);
+ DRM_DEBUG("alignment: %d\n", alignment);
+ DRM_DEBUG("page_order: %d\n", page_order);
+ DRM_DEBUG("total: %d\n", total);
+
+ if (order < DRM_MIN_ORDER || order > DRM_MAX_ORDER)
+ return -EINVAL;
+ if (dev->queue_count)
+ return -EBUSY; /* Not while in use */
+
+ spin_lock(&dev->count_lock);
+ if (dev->buf_use) {
+ spin_unlock(&dev->count_lock);
+ return -EBUSY;
+ }
+ atomic_inc(&dev->buf_alloc);
+ spin_unlock(&dev->count_lock);
+
+ mutex_lock(&dev->struct_mutex);
+ entry = &dma->bufs[order];
+ if (entry->buf_count) {
+ mutex_unlock(&dev->struct_mutex);
+ atomic_dec(&dev->buf_alloc);
+ return -ENOMEM; /* May only call once for each order */
+ }
+
+ if (count < 0 || count > 4096) {
+ mutex_unlock(&dev->struct_mutex);
+ atomic_dec(&dev->buf_alloc);
+ return -EINVAL;
+ }
+
+ entry->buflist = drm_alloc(count * sizeof(*entry->buflist),
+ DRM_MEM_BUFS);
+ if (!entry->buflist) {
+ mutex_unlock(&dev->struct_mutex);
+ atomic_dec(&dev->buf_alloc);
+ return -ENOMEM;
+ }
+ memset(entry->buflist, 0, count * sizeof(*entry->buflist));
+
+ entry->buf_size = size;
+ entry->page_order = page_order;
+
+ offset = 0;
+
+ while (entry->buf_count < count) {
+ buf = &entry->buflist[entry->buf_count];
+ buf->idx = dma->buf_count + entry->buf_count;
+ buf->total = alignment;
+ buf->order = order;
+ buf->used = 0;
+
+ buf->offset = (dma->byte_count + offset);
+ buf->bus_address = dev_priv->gart_vm_start + agp_offset + offset;
+ buf->address = (void *)(agp_offset + offset);
+ buf->next = NULL;
+ buf->waiting = 0;
+ buf->pending = 0;
+ init_waitqueue_head(&buf->dma_wait);
+ buf->file_priv = NULL;
+
+ buf->dev_priv_size = dev->driver->dev_priv_size;
+ buf->dev_private = drm_alloc(buf->dev_priv_size, DRM_MEM_BUFS);
+ if (!buf->dev_private) {
+ /* Set count correctly so we free the proper amount. */
+ entry->buf_count = count;
+ drm_cleanup_buf_error(dev, entry);
+ mutex_unlock(&dev->struct_mutex);
+ atomic_dec(&dev->buf_alloc);
+ return -ENOMEM;
+ }
+
+ memset(buf->dev_private, 0, buf->dev_priv_size);
+
+ DRM_DEBUG("buffer %d @ %p\n", entry->buf_count, buf->address);
+
+ offset += alignment;
+ entry->buf_count++;
+ byte_count += PAGE_SIZE << page_order;
+ }
+
+ DRM_DEBUG("byte_count: %d\n", byte_count);
+
+ temp_buflist = drm_realloc(dma->buflist,
+ dma->buf_count * sizeof(*dma->buflist),
+ (dma->buf_count + entry->buf_count)
+ * sizeof(*dma->buflist), DRM_MEM_BUFS);
+ if (!temp_buflist) {
+ /* Free the entry because it isn't valid */
+ drm_cleanup_buf_error(dev, entry);
+ mutex_unlock(&dev->struct_mutex);
+ atomic_dec(&dev->buf_alloc);
+ return -ENOMEM;
+ }
+ dma->buflist = temp_buflist;
+
+ for (i = 0; i < entry->buf_count; i++) {
+ dma->buflist[i + dma->buf_count] = &entry->buflist[i];
+ }
+
+ dma->buf_count += entry->buf_count;
+ dma->seg_count += entry->seg_count;
+ dma->page_count += byte_count >> PAGE_SHIFT;
+ dma->byte_count += byte_count;
+
+ DRM_DEBUG("dma->buf_count : %d\n", dma->buf_count);
+ DRM_DEBUG("entry->buf_count : %d\n", entry->buf_count);
+
+ mutex_unlock(&dev->struct_mutex);
+
+ dma->flags = _DRM_DMA_USE_SG;
+ atomic_dec(&dev->buf_alloc);
+ return 0;
+}
+
+static int radeon_gem_dma_bufs_init(struct drm_device *dev)
+{
+ struct drm_radeon_private *dev_priv = dev->dev_private;
+ int size = RADEON_DMA_BUFFER_SIZE * RADEON_DMA_BUFFER_COUNT;
+ int ret;
+
+ ret = drm_dma_setup(dev);
+ if (ret < 0)
+ return ret;
+
+ ret = drm_buffer_object_create(dev, size, drm_bo_type_kernel,
+ DRM_BO_FLAG_READ | DRM_BO_FLAG_WRITE | DRM_BO_FLAG_NO_EVICT |
+ DRM_BO_FLAG_MEM_TT | DRM_BO_FLAG_MAPPABLE, 0,
+ 0, 0, &dev_priv->mm.dma_bufs.bo);
+ if (ret) {
+ DRM_ERROR("Failed to create DMA bufs\n");
+ return -ENOMEM;
+ }
+
+ ret = drm_bo_kmap(dev_priv->mm.dma_bufs.bo, 0, size >> PAGE_SHIFT,
+ &dev_priv->mm.dma_bufs.kmap);
+ if (ret) {
+ DRM_ERROR("Failed to mmap DMA buffers\n");
+ return -ENOMEM;
+ }
+ dev_priv->mm.gart_useable -= size;
+ DRM_DEBUG("\n");
+ radeon_gem_addbufs(dev);
+
+ DRM_DEBUG("%lx %d\n", dev_priv->mm.dma_bufs.bo->map_list.hash.key, size);
+ dev->agp_buffer_token = dev_priv->mm.dma_bufs.bo->map_list.hash.key << PAGE_SHIFT;
+ dev_priv->mm.fake_agp_map.handle = dev_priv->mm.dma_bufs.kmap.virtual;
+ dev_priv->mm.fake_agp_map.size = size;
+
+ dev->agp_buffer_map = &dev_priv->mm.fake_agp_map;
+ dev_priv->gart_buffers_offset = dev_priv->mm.dma_bufs.bo->offset + dev_priv->gart_vm_start;
+ return 0;
+}
+
+static void radeon_gem_dma_bufs_destroy(struct drm_device *dev)
+{
+
+ struct drm_radeon_private *dev_priv = dev->dev_private;
+ drm_dma_takedown(dev);
+
+ if (dev_priv->mm.dma_bufs.bo) {
+ drm_bo_kunmap(&dev_priv->mm.dma_bufs.kmap);
+ drm_bo_usage_deref_unlocked(&dev_priv->mm.dma_bufs.bo);
+ }
+}
diff --git a/include/drm/drm.h b/include/drm/drm.h
index 17a1e2c..fa02570 100644
--- a/include/drm/drm.h
+++ b/include/drm/drm.h
@@ -671,23 +671,28 @@ struct drm_gem_open {
#define DRM_IOCTL_UPDATE_DRAW DRM_IOW(0x3f, struct drm_update_draw)
-#define DRM_IOCTL_MODE_GETRESOURCES DRM_IOWR(0xA0, struct drm_mode_card_res)
-#define DRM_IOCTL_MODE_GETCRTC DRM_IOWR(0xA1, struct drm_mode_crtc)
-#define DRM_IOCTL_MODE_SETCRTC DRM_IOWR(0xA2, struct drm_mode_crtc)
-#define DRM_IOCTL_MODE_CURSOR DRM_IOWR(0xA3, struct drm_mode_cursor)
-#define DRM_IOCTL_MODE_GETGAMMA DRM_IOWR(0xA4, struct drm_mode_crtc_lut)
-#define DRM_IOCTL_MODE_SETGAMMA DRM_IOWR(0xA5, struct drm_mode_crtc_lut)
-#define DRM_IOCTL_MODE_GETENCODER DRM_IOWR(0xA6, struct drm_mode_get_encoder)
-#define DRM_IOCTL_MODE_GETCONNECTOR DRM_IOWR(0xA7, struct drm_mode_get_connector)
-#define DRM_IOCTL_MODE_ATTACHMODE DRM_IOWR(0xA8, struct drm_mode_mode_cmd)
-#define DRM_IOCTL_MODE_DETACHMODE DRM_IOWR(0xA9, struct drm_mode_mode_cmd)
-
-#define DRM_IOCTL_MODE_GETPROPERTY DRM_IOWR(0xAA, struct drm_mode_get_property)
-#define DRM_IOCTL_MODE_SETPROPERTY DRM_IOWR(0xAB, struct drm_mode_connector_set_property)
-#define DRM_IOCTL_MODE_GETPROPBLOB DRM_IOWR(0xAC, struct drm_mode_get_blob)
-#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_GETRESOURCES DRM_IOWR(0xA0, struct drm_mode_card_res)
+#define DRM_IOCTL_MODE_GETCRTC DRM_IOWR(0xA1, struct drm_mode_crtc)
+#define DRM_IOCTL_MODE_GETCONNECTOR DRM_IOWR(0xA2, struct drm_mode_get_connector)
+#define DRM_IOCTL_MODE_SETCRTC DRM_IOWR(0xA3, struct drm_mode_crtc)
+#define DRM_IOCTL_MODE_ADDFB DRM_IOWR(0xA4, struct drm_mode_fb_cmd)
+#define DRM_IOCTL_MODE_RMFB DRM_IOWR(0xA5, unsigned int)
+#define DRM_IOCTL_MODE_GETFB DRM_IOWR(0xA6, struct drm_mode_fb_cmd)
+
+#define DRM_IOCTL_MODE_SETPROPERTY DRM_IOWR(0xA7, struct drm_mode_connector_set_property)
+#define DRM_IOCTL_MODE_GETPROPBLOB DRM_IOWR(0xA8, struct drm_mode_get_blob)
+#define DRM_IOCTL_MODE_ATTACHMODE DRM_IOWR(0xA9, struct drm_mode_mode_cmd)
+#define DRM_IOCTL_MODE_DETACHMODE DRM_IOWR(0xAA, struct drm_mode_mode_cmd)
+
+#define DRM_IOCTL_MODE_GETPROPERTY DRM_IOWR(0xAB, struct drm_mode_get_property)
+#define DRM_IOCTL_MODE_CURSOR DRM_IOWR(0xAC, struct drm_mode_cursor)
+#define DRM_IOCTL_MODE_HOTPLUG DRM_IOWR(0xAD, struct drm_mode_hotplug)
+#define DRM_IOCTL_WAIT_HOTPLUG DRM_IOWR(0xAE, union drm_wait_hotplug)
+
+#define DRM_IOCTL_MODE_REPLACEFB DRM_IOWR(0xAF, struct drm_mode_fb_cmd)
+#define DRM_IOCTL_MODE_GETENCODER DRM_IOWR(0xB0, struct drm_mode_get_encoder)
+#define DRM_IOCTL_MODE_GETGAMMA DRM_IOWR(0xB1, struct drm_mode_crtc_lut)
+#define DRM_IOCTL_MODE_SETGAMMA DRM_IOWR(0xB2, struct drm_mode_crtc_lut)
/**
* Device specific ioctls should only be in their respective headers
diff --git a/include/drm/drm_mode.h b/include/drm/drm_mode.h
index 601d2bd..58417e5 100644
--- a/include/drm/drm_mode.h
+++ b/include/drm/drm_mode.h
@@ -126,10 +126,11 @@ struct drm_mode_crtc {
#define DRM_MODE_ENCODER_TVDAC 4
struct drm_mode_get_encoder {
- uint32_t encoder_id;
- uint32_t encoder_type;
- uint32_t crtc_id; /**< Id of crtc */
+ unsigned int encoder_type;
+ unsigned int encoder_id;
+
+ unsigned int crtc_id; /**< Id of crtc */
uint32_t possible_crtcs;
uint32_t possible_clones;
@@ -216,13 +217,15 @@ struct drm_mode_get_blob {
};
struct drm_mode_fb_cmd {
- uint32_t fb_id;
- uint32_t width, height;
- uint32_t pitch;
- uint32_t bpp;
- uint32_t depth;
- /* driver specific handle */
- uint32_t handle;
+ union {
+ unsigned int fb_id;
+ unsigned int buffer_id;
+ };
+ unsigned int width, height;
+ unsigned int pitch;
+ unsigned int bpp;
+ unsigned int handle;
+ unsigned int depth;
};
struct drm_mode_mode_cmd {
diff --git a/include/drm/radeon_drm.h b/include/drm/radeon_drm.h
index f716e0a..d6a233f 100644
--- a/include/drm/radeon_drm.h
+++ b/include/drm/radeon_drm.h
@@ -514,7 +514,8 @@ typedef struct {
#define DRM_RADEON_GEM_SET_DOMAIN 0x23
#define DRM_RADEON_GEM_WAIT_RENDERING 0x24
-#define DRM_RADEON_CS 0x26
+#define DRM_RADEON_CS 0x26
+#define DRM_RADEON_CS2 0x26
#define DRM_IOCTL_RADEON_CP_INIT DRM_IOW( DRM_COMMAND_BASE + DRM_RADEON_CP_INIT, drm_radeon_init_t)
#define DRM_IOCTL_RADEON_CP_START DRM_IO( DRM_COMMAND_BASE + DRM_RADEON_CP_START)
@@ -554,6 +555,7 @@ typedef struct {
#define DRM_IOCTL_RADEON_GEM_SET_DOMAIN DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_SET_DOMAIN, struct drm_radeon_gem_set_domain)
#define DRM_IOCTL_RADEON_GEM_WAIT_RENDERING DRM_IOW(DRM_COMMAND_BASE + DRM_RADEON_GEM_WAIT_RENDERING, struct drm_radeon_gem_wait_rendering)
#define DRM_IOCTL_RADEON_CS DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_CS, struct drm_radeon_cs)
+#define DRM_IOCTL_RADEON_CS2 DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_CS2, struct drm_radeon_cs2)
typedef struct drm_radeon_init {
@@ -869,6 +871,14 @@ struct drm_radeon_gem_pwrite {
/* New interface which obsolete all previous interface.
*/
+
+
+struct drm_radeon_cs_old {
+ uint32_t dwords;
+ uint32_t cs_id;
+ uint64_t packets;
+};
+
#define RADEON_CHUNK_ID_RELOCS 0x01
#define RADEON_CHUNK_ID_IB 0x02
#define RADEON_CHUNK_ID_OLD 0xff
@@ -886,5 +896,11 @@ struct drm_radeon_cs {
cs chunks */
};
+struct drm_radeon_cs2 {
+ uint32_t num_chunks;
+ uint32_t cs_id;
+ uint64_t chunks; /* this points to uint64_t * which point to
+ cs chunks */
+};
#endif
--
1.6.0.6
drm-modesetting-radeon.patch:
View full diff with command:
/usr/bin/cvs -f diff -kk -u -N -r 1.78 -r 1.79 drm-modesetting-radeon.patch
Index: drm-modesetting-radeon.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-10/drm-modesetting-radeon.patch,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -r1.78 -r1.79
--- drm-modesetting-radeon.patch 13 Mar 2009 05:42:46 -0000 1.78
+++ drm-modesetting-radeon.patch 3 Apr 2009 03:26:36 -0000 1.79
@@ -1,4 +1,169 @@
-commit 784e2287e60f91c16814fbb757ea316b3027ddd1
+commit dea27f6e83efabdc3e37bc5a91d29d6dab893853
+Author: Dave Airlie <airlied at redhat.com>
+Date: Wed Mar 18 17:07:07 2009 +1000
+
+ radeon: fixup encoder oops due to wrong ordering on init calls
+
+commit 4a90f1edefee2cba39d135f2866e1bacc1ac647e
+Author: Dave Airlie <airlied at redhat.com>
+Date: Thu Mar 19 00:16:00 2009 +1000
+
+ drm/ttm: re-org the whole cached/uncached allocator yet again.
+
+ This removes the allocator type, and instead tracks when pages
+ were allocated from which pool and frees them back into that pool
+
+commit c8ae93fa4ac69112f4fc16477f73e0a98bba2765
+Author: Dave Airlie <airlied at redhat.com>
+Date: Sun Mar 15 18:26:42 2009 +1000
+
+ ttm: prefetch pages on pagefault
+
+commit f4df0e7870378ec40c268b95fb4b5d13533095fd
+Author: Alex Deucher <alexdeucher at gmail.com>
+Date: Mon Mar 16 03:52:13 2009 -0400
+
+ radeon: make sure to free connector priv when done
+
+ Signed-off-by: Alex Deucher <alexdeucher at gmail.com>
+
+commit 96d923793eb924750b26e8ab2a4264131e17cd5b
+Author: Alex Deucher <alexdeucher at gmail.com>
+Date: Mon Mar 16 03:36:16 2009 -0400
+
+ radeon: fix combios asic init
+
+ - igp chips don't have asic_init3/4 or ram reset tables
+ - write out the detected ram size to the CONFIG_MEMSIZE register
+ - some r1xx chips require ram detection rather than reading size
+ from bios tables
+ - asic_init5 table isn't needed
+
+ Signed-off-by: Alex Deucher <alexdeucher at gmail.com>
+
+commit 68f14af742eda9fd28c920776ce5396e304f8a82
+Author: Alex Deucher <alexdeucher at gmail.com>
+Date: Mon Mar 16 03:16:35 2009 -0400
+
+ radeon: rework bios scratch regsiter handling
+
+ split bios scratch reg handling into 3 functions:
+
+ - connected/active
+ - crtc to encoder mapping
+ - encoder dpms state
+
+ Hook the functions in at the appropriate places in
+ the driver. DVI-I is a bit messy since we need to know
+ digital vs analog so we have to update the scratch regs
+ twice: once in detect() and again after we know digital/analog
+ in get_modes().
+
+ Signed-off-by: Alex Deucher <alexdeucher at gmail.com>
+
+commit 3ba04861b4d399a7c6e21f0a7279d5f087fc4a8c
+Author: Alex Deucher <alexdeucher at gmail.com>
+Date: Sat Mar 14 16:43:14 2009 -0400
+
+ radeon: rework combios encoder/connector setup
+
+ - along the same lines as atom
+ - re-enable atom and legacy paths for r4xx cards
+ - remove bios_connector struct
+
+ Signed-off-by: Alex Deucher <alexdeucher at gmail.com>
+
+commit 2ed15179f72e66a020a7f318cc4c3fa57865e4ba
+Author: Alex Deucher <alexdeucher at gmail.com>
+Date: Thu Mar 12 16:02:01 2009 -0400
+
+ radeon: fix misleading messages
+
+ Signed-off-by: Alex Deucher <alexdeucher at gmail.com>
+
+commit cb917ec2b585f5ac873ab2e6938da9a3b730c0a1
+Author: Alex Deucher <alexdeucher at gmail.com>
+Date: Thu Mar 12 14:27:06 2009 -0400
+
+ atom: fix up encoder routines to deal with connector setup
+
+ often times the links or lanes used are dependant on the
+ connector rather than the encoder.
+
+ Signed-off-by: Alex Deucher <alexdeucher at gmail.com>
+
+commit abe11890fc272189712f2e6268a8751e25b7b7b5
+Author: Alex Deucher <alexdeucher at gmail.com>
+Date: Thu Mar 12 13:43:03 2009 -0400
+
+ atom: re-enable quirks
+
+ Signed-off-by: Alex Deucher <alexdeucher at gmail.com>
+
+commit 6a45dbd73c14735711f1803e8a3dd1063b7b3021
+Author: Alex Deucher <alexdeucher at gmail.com>
+Date: Thu Mar 12 13:21:32 2009 -0400
+
+ object table: don't add ddc for tv/cv
+
+ Signed-off-by: Alex Deucher <alexdeucher at gmail.com>
+
+commit 6fb018a3740510f140bcd5b6b89904e9d3167811
+Author: Alex Deucher <alexdeucher at gmail.com>
+Date: Thu Mar 12 13:10:50 2009 -0400
+
+ radeon: major restructuring of atom output/connector setup
+
+ - add connectors and encoders while parsing the bios tables.
+ - pull in fixed up object header parsing for r6xx+
+
+ Signed-off-by: Alex Deucher <alexdeucher at gmail.com>
+
+commit 034267381be779a1bbdb5f6f97c1471fb8538a04
+Author: Alex Deucher <alexdeucher at gmail.com>
+Date: Wed Mar 4 13:02:26 2009 -0500
+
+ RS600 doesn't have DFP quirk in connector table
+
+ Signed-off-by: Alex Deucher <alexdeucher at gmail.com>
+
+commit b7936094db13c736e4bee7494c2b99a8e5ced042
+Author: Alex Deucher <alexdeucher at gmail.com>
+Date: Thu Mar 5 16:37:57 2009 -0500
+
+ R6xx/R7xx: don't mess with RADEON_HOST_PATH_CNTL
+
+ these chips don't have this reg at this location.
+
+ Signed-off-by: Alex Deucher <alexdeucher at gmail.com>
+
+commit a1fdbf2f4de3988f5e3319ee9f267f7b27e8fc6e
+Author: Alex Deucher <alexdeucher at gmail.com>
+Date: Wed Mar 11 16:50:19 2009 -0400
+
+ radeon: make sure to free enc_priv when done
+
+ Signed-off-by: Alex Deucher <alexdeucher at gmail.com>
+
+commit d54586a52852497d82f322c536515d223697fdf4
+Author: Alex Deucher <alexdeucher at gmail.com>
+Date: Wed Mar 11 15:43:16 2009 -0400
+
+ radeon: restructure encoders
+
+ move encoder specific data into encoder specific structs
+
+ Signed-off-by: Alex Deucher <alexdeucher at gmail.com>
+
+commit 0215044d42faded71b8591a79550c0bf04908458
+Author: Alex Deucher <alexdeucher at gmail.com>
+Date: Wed Mar 11 11:23:16 2009 -0400
+
+ radeon: atom modesetting updates
+
+ Signed-off-by: Alex Deucher <alexdeucher at gmail.com>
+
+commit 121d45a2e9562836138c658224def839bb166f68
Author: Dave Airlie <airlied at redhat.com>
Date: Thu Mar 12 11:39:05 2009 +1000
@@ -17,7 +182,7 @@
Signed-off-by: Tom "spot" Callaway <tcallawa at redhat.com>
-commit 42a73c53bce752bca305c4ec40bff9873042ba6d
+commit 36bbbdea9a2e77c1d1da7504bc5f03267d0e0d6c
Author: Dave Airlie <airlied at dhcp-1-203.bne.redhat.com>
Date: Thu Mar 12 10:58:05 2009 +1000
@@ -26,7 +191,7 @@
This makes the IB get routine a lot smarter and hopefully
fixes some cases where it exits
-commit 64e61a039f5e28b5d288fd2b50d44d3d42327976
+commit 5047f54c5cf7cbd48c4894ba4950dbad158c3184
Author: Dave Airlie <airlied at dhcp-1-203.bne.redhat.com>
Date: Thu Mar 12 10:57:17 2009 +1000
@@ -38,7 +203,7 @@
only happens on r300 hw for me
[...9464 lines suppressed...]
++ struct radeon_native_mode native_mode;
++};
+
-+ /* legacy primary dac */
-+ uint32_t ps2_pdac_adj;
-+
++struct radeon_encoder_tv_dac {
+ /* legacy tv dac */
+ uint32_t ps2_tvdac_adj;
+ uint32_t ntsc_tvdac_adj;
+ uint32_t pal_tvdac_adj;
++
+ enum radeon_tv_std tv_std;
++};
+
++struct radeon_encoder_int_tmds {
+ /* legacy int tmds */
+ struct radeon_tmds_pll tmds_pll[4];
+};
+
++struct radeon_encoder_atom_dig {
++ /* atom dig */
++ uint32_t transmitter_config;
++ bool coherent_mode;
++ /* atom lvds */
++ uint32_t lvds_misc;
++ uint16_t panel_pwr_delay;
++ /* panel mode */
++ struct radeon_native_mode native_mode;
++};
++
++struct radeon_encoder {
++ struct drm_encoder base;
++ uint32_t encoder_id;
++ uint32_t devices;
++ uint32_t flags;
++ enum radeon_rmx_type rmx_type;
++ struct radeon_native_mode native_mode;
++ void *enc_priv;
++};
++
++struct radeon_connector_atom_dig {
++ uint32_t igp_lane_info;
++ bool linkb;
++};
++
+struct radeon_connector {
+ struct drm_connector base;
++ uint32_t connector_id;
++ uint32_t devices;
+ struct radeon_i2c_chan *ddc_bus;
+ int use_digital;
++ void *con_priv;
+};
+
+struct radeon_framebuffer {
@@ -29798,16 +31453,14 @@
+ uint32_t *post_div_p,
+ int flags);
+
-+struct drm_encoder *radeon_encoder_lvtma_add(struct drm_device *dev, int bios_index);
-+struct drm_encoder *radeon_encoder_atom_dac_add(struct drm_device *dev, int bios_index, int dac_id, int with_tv);
-+struct drm_encoder *radeon_encoder_atom_tmds_add(struct drm_device *dev, int bios_index, int tmds_type);
+struct drm_encoder *radeon_encoder_legacy_lvds_add(struct drm_device *dev, int bios_index);
+struct drm_encoder *radeon_encoder_legacy_primary_dac_add(struct drm_device *dev, int bios_index, int with_tv);
+struct drm_encoder *radeon_encoder_legacy_tv_dac_add(struct drm_device *dev, int bios_index, int with_tv);
+struct drm_encoder *radeon_encoder_legacy_tmds_int_add(struct drm_device *dev, int bios_index);
+struct drm_encoder *radeon_encoder_legacy_tmds_ext_add(struct drm_device *dev, int bios_index);
-+extern void atombios_ext_tmds_setup(struct drm_encoder *encoder,
-+ struct drm_display_mode *mode);
++extern void atombios_external_tmds_setup(struct drm_encoder *encoder,
++ struct drm_display_mode *mode);
++extern int atombios_get_encoder_mode(struct drm_encoder *encoder);
+
+extern void radeon_crtc_load_lut(struct drm_crtc *crtc);
+extern int atombios_crtc_set_base(struct drm_crtc *crtc, int x, int y,
@@ -29833,18 +31486,31 @@
+
+extern bool radeon_atom_get_clock_info(struct drm_device *dev);
+extern bool radeon_combios_get_clock_info(struct drm_device *dev);
-+extern void radeon_atombios_get_lvds_info(struct radeon_encoder *encoder);
-+extern void radeon_atombios_get_tmds_info(struct radeon_encoder *encoder);
-+extern bool radeon_combios_get_lvds_info(struct radeon_encoder *encoder);
-+extern bool radeon_combios_get_tmds_info(struct radeon_encoder *encoder);
++extern struct radeon_encoder_atom_dig *
++radeon_atombios_get_lvds_info(struct radeon_encoder *encoder);
++extern struct radeon_encoder_int_tmds *
++radeon_atombios_get_tmds_info(struct radeon_encoder *encoder);
++extern struct radeon_encoder_lvds *
++radeon_combios_get_lvds_info(struct radeon_encoder *encoder);
++extern struct radeon_encoder_int_tmds *
++radeon_combios_get_tmds_info(struct radeon_encoder *encoder);
+extern void radeon_combios_get_ext_tmds_info(struct radeon_encoder *encoder);
-+extern bool radeon_combios_get_tv_info(struct radeon_encoder *encoder);
-+extern bool radeon_combios_get_tv_dac_info(struct radeon_encoder *encoder);
-+extern bool radeon_combios_get_primary_dac_info(struct radeon_encoder *encoder);
++extern struct radeon_encoder_tv_dac *
++radeon_combios_get_tv_dac_info(struct radeon_encoder *encoder);
++extern struct radeon_encoder_primary_dac *
++radeon_combios_get_primary_dac_info(struct radeon_encoder *encoder);
+extern void radeon_combios_output_lock(struct drm_encoder *encoder, bool lock);
+extern void radeon_combios_initialize_bios_scratch_regs(struct drm_device *dev);
+extern void radeon_atom_output_lock(struct drm_encoder *encoder, bool lock);
+extern void radeon_atom_initialize_bios_scratch_regs(struct drm_device *dev);
++extern void
++radeon_atombios_encoder_crtc_scratch_regs(struct drm_encoder *encoder, int crtc);
++extern void
++radeon_atombios_encoder_dpms_scratch_regs(struct drm_encoder *encoder, bool on);
++extern void
++radeon_combios_encoder_crtc_scratch_regs(struct drm_encoder *encoder, int crtc);
++extern void
++radeon_combios_encoder_dpms_scratch_regs(struct drm_encoder *encoder, bool on);
+extern void radeon_crtc_fb_gamma_set(struct drm_crtc *crtc, u16 red, u16 green,
+ u16 blue, int regno);
+struct drm_framebuffer *radeon_framebuffer_create(struct drm_device *dev,
@@ -29865,7 +31531,9 @@
+void radeon_atom_dyn_clk_setup(struct drm_device *dev, int enable);
+void radeon_combios_dyn_clk_setup(struct drm_device *dev, int enable);
+void radeon_get_clock_info(struct drm_device *dev);
-+extern bool radeon_get_atom_connector_info_from_bios_connector_table(struct drm_device *dev);
++
++extern bool radeon_get_atom_connector_info_from_object_table(struct drm_device *dev);
++extern bool radeon_get_atom_connector_info_from_supported_devices_table(struct drm_device *dev);
+
+void radeon_rmx_mode_fixup(struct drm_encoder *encoder,
+ struct drm_display_mode *mode,
@@ -30145,10 +31813,10 @@
+
diff --git a/drivers/gpu/drm/radeon/radeon_reg.h b/drivers/gpu/drm/radeon/radeon_reg.h
new file mode 100644
-index 0000000..9ccf839
+index 0000000..0edb592
--- /dev/null
+++ b/drivers/gpu/drm/radeon/radeon_reg.h
-@@ -0,0 +1,5337 @@
+@@ -0,0 +1,5344 @@
+/*
+ * Copyright 2000 ATI Technologies Inc., Markham, Ontario, and
+ * VA Linux Systems Inc., Fremont, California.
@@ -30328,6 +31996,13 @@
+# define RADEON_CV1_CRTC_SHIFT 13
+# define RADEON_DFP2_CRTC_MASK (1 << 14)
+# define RADEON_DFP2_CRTC_SHIFT 14
++# define RADEON_ACC_REQ_LCD1 (1 << 16)
++# define RADEON_ACC_REQ_CRT1 (1 << 17)
++# define RADEON_ACC_REQ_TV1 (1 << 18)
++# define RADEON_ACC_REQ_DFP1 (1 << 19)
++# define RADEON_ACC_REQ_CRT2 (1 << 21)
++# define RADEON_ACC_REQ_TV2 (1 << 22)
++# define RADEON_ACC_REQ_DFP2 (1 << 23)
+#define RADEON_BIOS_6_SCRATCH 0x0028
+# define RADEON_ACC_MODE_CHANGE (1 << 2)
+# define RADEON_EXT_DESKTOP_MODE (1 << 3)
@@ -35933,7 +37608,7 @@
#endif
diff --git a/include/drm/drm_objects.h b/include/drm/drm_objects.h
new file mode 100644
-index 0000000..60016d6
+index 0000000..686a6c4
--- /dev/null
+++ b/include/drm/drm_objects.h
@@ -0,0 +1,913 @@
@@ -36385,7 +38060,7 @@
+extern void drm_ttm_fixup_caching(struct drm_ttm *ttm);
+extern struct page *drm_ttm_get_page(struct drm_ttm *ttm, int index);
+extern void drm_ttm_cache_flush(struct page *pages[], unsigned long num_pages);
-+extern int drm_ttm_populate(struct drm_ttm *ttm);
++extern int drm_ttm_populate(struct drm_ttm *ttm, int cached);
+extern int drm_ttm_set_user(struct drm_ttm *ttm,
+ struct task_struct *tsk,
+ unsigned long start,
@@ -36452,6 +38127,10 @@
+ * intent was.
+ */
+#define DRM_TTM_PAGE_USER_DMA (1 << 8)
++/*
++ * The pages in this TTM were allocated cached
++ */
++#define DRM_TTM_PAGE_ALLOC_CACHED (1 << 9)
+
+/***************************************************
+ * Buffer objects. (drm_bo.c, drm_bo_move.c)
@@ -36600,9 +38279,6 @@
+#define _DRM_FLAG_MEMTYPE_CMA 0x00000010 /* Can't map aperture */
+#define _DRM_FLAG_MEMTYPE_CSELECT 0x00000020 /* Select caching */
+
-+#define _DRM_BM_ALLOCATOR_CACHED 0x0
-+#define _DRM_BM_ALLOCATOR_UNCACHED 0x1
-+
+struct drm_buffer_manager {
+ struct drm_bo_lock bm_lock;
+ struct mutex evict_mutex;
@@ -36617,7 +38293,6 @@
+ unsigned long cur_pages;
+ atomic_t count;
+ struct page *dummy_read_page;
-+ int allocator_type;
+};
+
+struct drm_bo_driver {
drm-next.patch:
Index: drm-next.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-10/drm-next.patch,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- drm-next.patch 13 Mar 2009 05:42:49 -0000 1.15
+++ drm-next.patch 3 Apr 2009 03:26:37 -0000 1.16
@@ -1,3 +1,14 @@
+commit 41f13fe81dd1b08723ab9f3fc3c7f29cfa81f1a5
+Author: Alex Deucher <alexdeucher at gmail.com>
+Date: Mon Mar 16 15:37:02 2009 -0400
+
+ drm/radeon: fix logic in r600_page_table_init() to match ati_gart
+
+ This fixes page table init on rs600.
+
+ Signed-off-by: Alex Deucher <alexdeucher at gmail.com>
+ Signed-off-by: Dave Airlie <airlied at redhat.com>
+
commit 06f0a488c1b642d3cd7769da66600e5148c3fad8
Author: Dave Airlie <airlied at redhat.com>
Date: Fri Mar 13 09:35:32 2009 +1000
@@ -3949,7 +3960,7 @@
cmdbuf->bufsz -= sizeof(u64);
diff --git a/drivers/gpu/drm/radeon/r600_cp.c b/drivers/gpu/drm/radeon/r600_cp.c
new file mode 100644
-index 0000000..76eb0d5
+index 0000000..9d14eee
--- /dev/null
+++ b/drivers/gpu/drm/radeon/r600_cp.c
@@ -0,0 +1,2253 @@
@@ -4127,7 +4138,6 @@
+ if (entry->busaddr[i] == 0) {
+ DRM_ERROR("unable to map PCIGART pages!\n");
+ r600_page_table_cleanup(dev, gart_info);
-+ ret = -EINVAL;
+ goto done;
+ }
+ entry_addr = entry->busaddr[i];
@@ -4146,6 +4156,7 @@
+ entry_addr += ATI_PCIGART_PAGE_SIZE;
+ }
+ }
++ ret = 1;
+done:
+ return ret;
+}
@@ -6050,7 +6061,7 @@
+ dev_priv->gart_info.addr,
+ dev_priv->pcigart_offset);
+
-+ if (r600_page_table_init(dev)) {
++ if (!r600_page_table_init(dev)) {
+ DRM_ERROR("Failed to init GART table\n");
+ r600_do_cleanup_cp(dev);
+ return -EINVAL;
Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-10/kernel.spec,v
retrieving revision 1.1314
retrieving revision 1.1315
diff -u -r1.1314 -r1.1315
--- kernel.spec 2 Apr 2009 23:54:23 -0000 1.1314
+++ kernel.spec 3 Apr 2009 03:26:37 -0000 1.1315
@@ -648,6 +648,7 @@
Patch1812: drm-modesetting-radeon.patch
Patch1814: drm-nouveau.patch
Patch1816: drm-no-gem-on-i8xx.patch
+Patch1817: drm-f10-compat.patch
# kludge to make ich9 e1000 work
Patch2000: linux-2.6-e1000-ich9.patch
@@ -1222,6 +1223,7 @@
ApplyPatch drm-modesetting-radeon.patch
ApplyPatch drm-nouveau.patch
ApplyPatch drm-no-gem-on-i8xx.patch
+ApplyPatch drm-f10-compat.patch
# linux1394 git patches
ApplyPatch linux-2.6-firewire-git-update.patch
@@ -1819,6 +1821,9 @@
%kernel_variant_files -k vmlinux %{with_kdump} kdump
%changelog
+* Fri Apr 03 2009 Dave Airlie <airlied at redhat.com>
+- add backwards drm compat for radeon kms
+
* Thu Apr 02 2009 Chuck Ebbert <cebbert at redhat.com> 2.6.29.1-14
- Linux 2.6.29.1
- Dropped patches, merged upstream:
- Previous message (by thread): rpms/nautilus/devel .cvsignore, 1.93, 1.94 nautilus.spec, 1.267, 1.268 sources, 1.97, 1.98
- Next message (by thread): rpms/anaconda/devel .cvsignore, 1.630, 1.631 anaconda.spec, 1.778, 1.779 sources, 1.764, 1.765
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list