rpms/xorg-x11-drv-ati/devel radeon-modeset.patch, 1.17, 1.18 xorg-x11-drv-ati.spec, 1.124, 1.125
Dave Airlie
airlied at fedoraproject.org
Fri Oct 10 05:21:42 UTC 2008
Author: airlied
Update of /cvs/pkgs/rpms/xorg-x11-drv-ati/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv19282
Modified Files:
radeon-modeset.patch xorg-x11-drv-ati.spec
Log Message:
- fix rotation
- make output names compatible with non-kms
radeon-modeset.patch:
Index: radeon-modeset.patch
===================================================================
RCS file: /cvs/pkgs/rpms/xorg-x11-drv-ati/devel/radeon-modeset.patch,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- radeon-modeset.patch 10 Oct 2008 04:47:51 -0000 1.17
+++ radeon-modeset.patch 10 Oct 2008 05:21:11 -0000 1.18
@@ -1,3 +1,15 @@
+commit db1d00f76acdc9868546694d4f3ab3a869ad2396
+Author: Dave Airlie <airlied at redhat.com>
+Date: Fri Oct 10 15:18:41 2008 +1000
+
+ radeon: drmmode make names same as for non-kms drivers
+
+commit b1a87b4b67cae5a31c87f884f40f7116ac8ecdf2
+Author: Dave Airlie <airlied at redhat.com>
+Date: Fri Oct 10 15:10:28 2008 +1000
+
+ radeon: fix rotation under kms
+
commit 1eb523e28c7a1f69a9fe7b247b7828399d7e6a75
Author: Dave Airlie <airlied at redhat.com>
Date: Fri Oct 10 14:44:39 2008 +1000
@@ -505,10 +517,10 @@
+ radeon_dri_bufmgr.h
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
new file mode 100644
-index 0000000..644978e
+index 0000000..1d04ddb
--- /dev/null
+++ b/src/drmmode_display.c
-@@ -0,0 +1,752 @@
+@@ -0,0 +1,771 @@
+/*
+ * Copyright © 2007 Red Hat, Inc.
+ *
@@ -543,8 +555,10 @@
+#ifdef XF86DRM_MODE
+#include "radeon.h"
+#include "radeon_reg.h"
++#include "radeon_drm.h"
+#include "sarea.h"
+
++
+static Bool drmmode_resize_fb(ScrnInfoPtr scrn, drmmode_ptr drmmode, int width, int height);
+
+static Bool
@@ -835,11 +849,11 @@
+ if (rotate_bo == NULL)
+ return NULL;
+
-+ radeon_bufmgr_pin(rotate_bo);
++ dri_bo_pin(rotate_bo, RADEON_GEM_DOMAIN_VRAM);
+ dri_bo_map(rotate_bo, 1);
+
+ ret = drmModeAddFB(drmmode->fd, width, height, crtc->scrn->depth,
-+ crtc->scrn->bitsPerPixel, rotate_pitch, radeon_bufmgr_get_handle(rotate_bo),
++ crtc->scrn->bitsPerPixel, rotate_pitch, dri_bo_get_handle(rotate_bo),
+ &drmmode_crtc->rotate_fb_id);
+ if (ret) {
+ ErrorF("failed to add rotate fb\n");
@@ -1082,8 +1096,25 @@
+ return;
+ }
+
-+ snprintf(name, 32, "%s%d", output_names[koutput->connector_type], koutput->connector_type_id);
-+
++ /* need to do smart conversion here for compat with non-kms ATI driver */
++ if (koutput->connector_type_id == 1) {
++ switch(koutput->connector_type) {
++ case DRM_MODE_CONNECTOR_VGA:
++ case DRM_MODE_CONNECTOR_DVII:
++ case DRM_MODE_CONNECTOR_DVID:
++ case DRM_MODE_CONNECTOR_DVIA:
++ case DRM_MODE_CONNECTOR_HDMIA:
++ case DRM_MODE_CONNECTOR_HDMIB:
++ snprintf(name, 32, "%s-%d", output_names[koutput->connector_type], koutput->connector_type_id - 1);
++ break;
++ default:
++ snprintf(name, 32, "%s", output_names[koutput->connector_type]);
++ break;
++ }
++ } else {
++ snprintf(name, 32, "%s-%d", output_names[koutput->connector_type], koutput->connector_type_id - 1);
++ }
++
+ output = xf86OutputCreate (pScrn, &drmmode_output_funcs, name);
+ if (!output) {
+ drmModeFreeEncoder(kencoder);
@@ -1876,10 +1907,10 @@
Bool
diff --git a/src/radeon_bufmgr.h b/src/radeon_bufmgr.h
new file mode 100644
-index 0000000..dc23438
+index 0000000..1e93bc2
--- /dev/null
+++ b/src/radeon_bufmgr.h
-@@ -0,0 +1,32 @@
+@@ -0,0 +1,29 @@
+/**
+ * @file intel_bufmgr.h
+ *
@@ -1907,17 +1938,14 @@
+extern void radeon_bufmgr_exa_wait_rendering(dri_bo *bo);
+extern dri_bo *radeon_bufmgr_exa_create_bo(dri_bufmgr *bufmgr, struct radeon_memory *mem);
+void radeon_bufmgr_post_submit(dri_bufmgr *bufmgr);
-+void radeon_bufmgr_pin(dri_bo *buf);
-+void radeon_bufmgr_unpin(dri_bo *buf);
-+uint32_t radeon_bufmgr_get_handle(dri_bo *buf);
+void radeon_bufmgr_gem_enable_reuse(dri_bufmgr *bufmgr);
+#endif
diff --git a/src/radeon_bufmgr_exa.c b/src/radeon_bufmgr_exa.c
new file mode 100644
-index 0000000..586ecd6
+index 0000000..0f493a5
--- /dev/null
+++ b/src/radeon_bufmgr_exa.c
-@@ -0,0 +1,324 @@
+@@ -0,0 +1,328 @@
+/**************************************************************************
+ *
+ * Copyright © 2007-2008 Red Hat Inc.
@@ -2171,6 +2199,30 @@
+ *count_p = __count;
+}
+
++static int radeon_bufmgr_exa_pin(dri_bo *buf)
++{
++ dri_bufmgr_exa *bufmgr_exa = (dri_bufmgr_exa *)buf->bufmgr;
++ dri_bo_exa *exa_buf = (dri_bo_exa *)buf;
++
++ return !radeon_bind_memory(bufmgr_exa->pScrn, exa_buf->mem);
++}
++
++static void radeon_bufmgr_exa_unpin(dri_bo *buf)
++{
++ dri_bufmgr_exa *bufmgr_exa = (dri_bufmgr_exa *)buf->bufmgr;
++ dri_bo_exa *exa_buf = (dri_bo_exa *)buf;
++
++ radeon_unbind_memory(bufmgr_exa->pScrn, exa_buf->mem);
++}
++
++static uint32_t radeon_bufmgr_get_handle(dri_bo *buf)
++{
++ dri_bo_exa *exa_buf = (dri_bo_exa *)buf;
++
++ return exa_buf->mem->kernel_bo_handle;
++}
++
++
+/**
+ * Initializes the EXA buffer manager, which is just a thin wrapper
+ * around the EXA allocator.
@@ -2196,6 +2248,9 @@
+ bufmgr_exa->bufmgr.destroy = dri_bufmgr_exa_destroy;
+ //bufmgr_exa->bufmgr.bo_wait_rendering = radeon_bufmgr_exa_wait_rendering;
+ bufmgr_exa->radeon_bufmgr.emit_reloc = radeon_bufmgr_exa_emit_reloc;
++ bufmgr_exa->bufmgr.pin = radeon_bufmgr_exa_pin;
++ bufmgr_exa->bufmgr.unpin = radeon_bufmgr_exa_unpin;
++ bufmgr_exa->bufmgr.get_handle = radeon_bufmgr_get_handle;
+ return &bufmgr_exa->bufmgr;
+}
+
@@ -2219,29 +2274,6 @@
+ bufmgr_exa->reloc_head = NULL;
+
+}
-+
-+void radeon_bufmgr_pin(dri_bo *buf)
-+{
-+ dri_bufmgr_exa *bufmgr_exa = (dri_bufmgr_exa *)buf->bufmgr;
-+ dri_bo_exa *exa_buf = (dri_bo_exa *)buf;
-+
-+ radeon_bind_memory(bufmgr_exa->pScrn, exa_buf->mem);
-+}
-+
-+void radeon_bufmgr_unpin(dri_bo *buf)
-+{
-+ dri_bufmgr_exa *bufmgr_exa = (dri_bufmgr_exa *)buf->bufmgr;
-+ dri_bo_exa *exa_buf = (dri_bo_exa *)buf;
-+
-+ radeon_unbind_memory(bufmgr_exa->pScrn, exa_buf->mem);
-+}
-+
-+uint32_t radeon_bufmgr_get_handle(dri_bo *buf)
-+{
-+ dri_bo_exa *exa_buf = (dri_bo_exa *)buf;
-+
-+ return exa_buf->mem->kernel_bo_handle;
-+}
diff --git a/src/radeon_bufmgr_exa.h b/src/radeon_bufmgr_exa.h
new file mode 100644
index 0000000..0d79b58
@@ -2264,10 +2296,10 @@
+#endif
diff --git a/src/radeon_bufmgr_gem.c b/src/radeon_bufmgr_gem.c
new file mode 100644
-index 0000000..b4e9c92
+index 0000000..10cd2a0
--- /dev/null
+++ b/src/radeon_bufmgr_gem.c
-@@ -0,0 +1,546 @@
+@@ -0,0 +1,573 @@
+/**************************************************************************
+ *
+ * Copyright © 2007-2008 Red Hat Inc.
@@ -2730,6 +2762,43 @@
+ }
+}
+
++static int radeon_gem_bufmgr_pin(dri_bo *bo, int domain)
++{
++ dri_bufmgr_gem *bufmgr_gem = (dri_bufmgr_gem *)bo->bufmgr;
++ dri_bo_gem *gem_bo = (dri_bo_gem *)bo;
++ struct drm_radeon_gem_pin pin;
++ int ret;
++
++ pin.pin_domain = domain;
++ pin.handle = gem_bo->gem_handle;
++ pin.alignment = 0;
++
++ ret = ioctl(bufmgr_gem->fd, DRM_IOCTL_RADEON_GEM_PIN, &pin);
++ if (ret != 0)
++ return -1;
++
++ return 0;
++}
++
++static void radeon_gem_bufmgr_unpin(dri_bo *bo)
++{
++
++ dri_bufmgr_gem *bufmgr_gem = (dri_bufmgr_gem *)bo->bufmgr;
++ dri_bo_gem *gem_bo = (dri_bo_gem *)bo;
++ struct drm_radeon_gem_unpin unpin;
++
++ unpin.handle = gem_bo->gem_handle;
++ ioctl(bufmgr_gem->fd, DRM_IOCTL_RADEON_GEM_UNPIN, &unpin);
++}
++
++
++static uint32_t radeon_gem_bufmgr_get_handle(dri_bo *buf)
++{
++ dri_bo_gem *gem_bo = (dri_bo_gem *)buf;
++
++ return gem_bo->gem_handle;
++}
++
+/**
+ * Initializes the GEM buffer manager, which is just a thin wrapper
+ * around the GEM allocator.
@@ -2754,8 +2823,11 @@
+ bufmgr_gem->bufmgr.bo_map = dri_gem_bo_map;
+ bufmgr_gem->bufmgr.bo_unmap = dri_gem_bo_unmap;
+ bufmgr_gem->bufmgr.destroy = dri_bufmgr_gem_destroy;
++ bufmgr_gem->bufmgr.pin = radeon_gem_bufmgr_pin;
++ bufmgr_gem->bufmgr.unpin = radeon_gem_bufmgr_unpin;
+ //bufmgr_gem->bufmgr.bo_wait_rendering = radeon_bufmgr_gem_wait_rendering;
+ bufmgr_gem->radeon_bufmgr.emit_reloc = radeon_bufmgr_gem_emit_reloc;
++ bufmgr_gem->bufmgr.get_handle = radeon_gem_bufmgr_get_handle;
+ /* Initialize the linked lists for BO reuse cache. */
+ for (i = 0; i < RADEON_GEM_BO_BUCKETS; i++)
+ bufmgr_gem->cache_bucket[i].tail = &bufmgr_gem->cache_bucket[i].head;
@@ -2785,20 +2857,7 @@
+
+}
+
-+void radeon_gem_bufmgr_pin(dri_bo *buf)
-+{
-+}
+
-+void radeon_gem_bufmgr_unpin(dri_bo *buf)
-+{
-+}
-+
-+uint32_t radeon_gem_bufmgr_get_handle(dri_bo *buf)
-+{
-+ dri_bo_gem *gem_bo = (dri_bo_gem *)buf;
-+
-+ return gem_bo->gem_handle;
-+}
+
+void radeon_bufmgr_emit_reloc(dri_bo *buf, uint32_t *head, uint32_t *count_p, uint32_t read_domains, uint32_t write_domain)
+{
@@ -3659,10 +3718,10 @@
+}
diff --git a/src/radeon_dri_bufmgr.c b/src/radeon_dri_bufmgr.c
new file mode 100644
-index 0000000..37cc305
+index 0000000..2ba2951
--- /dev/null
+++ b/src/radeon_dri_bufmgr.c
-@@ -0,0 +1,159 @@
+@@ -0,0 +1,174 @@
+/*
+ * Copyright © 2007 Intel Corporation
+ *
@@ -3822,12 +3881,27 @@
+{
+ return bo->bufmgr->check_aperture_space(bo);
+}
++
++int dri_bo_pin(dri_bo *bo, int domain)
++{
++ return bo->bufmgr->pin(bo, domain);
++}
++
++void dri_bo_unpin(dri_bo *bo)
++{
++ bo->bufmgr->unpin(bo);
++}
++
++uint32_t dri_bo_get_handle(dri_bo *bo)
++{
++ return bo->bufmgr->get_handle(bo);
++}
diff --git a/src/radeon_dri_bufmgr.h b/src/radeon_dri_bufmgr.h
new file mode 100644
-index 0000000..687cbeb
+index 0000000..a2b8a4f
--- /dev/null
+++ b/src/radeon_dri_bufmgr.h
-@@ -0,0 +1,260 @@
+@@ -0,0 +1,270 @@
+/**************************************************************************
+ *
+ * Copyright © 2007 Intel Corporation
@@ -4007,6 +4081,11 @@
+ void (*post_submit)(dri_bo *batch_buf, dri_fence **fence);
+
+ int (*check_aperture_space)(dri_bo *bo);
++
++ int (*pin)(dri_bo *bo, int domain);
++ void (*unpin)(dri_bo *bo);
++
++ uint32_t (*get_handle)(dri_bo *bo);
+ int debug; /**< Enables verbose debugging printouts */
+};
+
@@ -4049,6 +4128,11 @@
+void dri_post_submit(dri_bo *batch_buf, dri_fence **last_fence);
+int dri_bufmgr_check_aperture_space(dri_bo *bo);
+
++int dri_bo_pin(dri_bo *bo, int domain);
++void dri_bo_unpin(dri_bo *bo);
++
++uint32_t dri_bo_get_handle(dri_bo *bo);
++
+#ifndef TTM_API
+/* reuse some TTM API */
+
@@ -6577,7 +6661,7 @@
blendcntl = RADEONGetBlendCntl(op, pMaskPicture, pDstPicture->format);
diff --git a/src/radeon_legacy_memory.c b/src/radeon_legacy_memory.c
-index 2a9ee94..230861c 100644
+index 2a9ee94..0423571 100644
--- a/src/radeon_legacy_memory.c
+++ b/src/radeon_legacy_memory.c
@@ -21,6 +21,19 @@ radeon_legacy_allocate_memory(ScrnInfoPtr pScrn,
@@ -6605,7 +6689,7 @@
RADEONInfoPtr info = RADEONPTR(pScrn);
+ if (info->new_cs) {
-+ struct dri_bo *bo = mem_struct;
++ dri_bo *bo = mem_struct;
+ dri_bo_unreference(bo);
+ return;
+ }
Index: xorg-x11-drv-ati.spec
===================================================================
RCS file: /cvs/pkgs/rpms/xorg-x11-drv-ati/devel/xorg-x11-drv-ati.spec,v
retrieving revision 1.124
retrieving revision 1.125
diff -u -r1.124 -r1.125
--- xorg-x11-drv-ati.spec 10 Oct 2008 04:47:52 -0000 1.124
+++ xorg-x11-drv-ati.spec 10 Oct 2008 05:21:11 -0000 1.125
@@ -5,7 +5,7 @@
Summary: Xorg X11 ati video driver
Name: xorg-x11-drv-ati
Version: 6.9.0
-Release: 24%{?dist}
+Release: 25%{?dist}
URL: http://www.x.org
License: MIT
Group: User Interface/X Hardware Support
@@ -72,6 +72,10 @@
%{_mandir}/man4/radeon.4*
%changelog
+* Fri Oct 10 2008 Dave Airlie <airlied at redhat.com> 6.9.0-25
+- fix rotation
+- make output names compatible with non-kms
+
* Fri Oct 10 2008 Dave Airlie <airlied at redhat.com> 6.9.0-24
- radeon-modeset.patch - fix silly debugging fallback.
More information about the scm-commits
mailing list