Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/external/bsd/drm/dist implement DRM_RADEON_CS ioctl, nec...



details:   https://anonhg.NetBSD.org/src/rev/3dfa7bd7a9ab
branches:  trunk
changeset: 755148:3dfa7bd7a9ab
user:      mrg <mrg%NetBSD.org@localhost>
date:      Mon May 24 01:39:06 2010 +0000

description:
implement DRM_RADEON_CS ioctl, necessary for r600_dri to function.

this is mostly from freebsd (though it also exists in other versions
of the drm code) svn commits:

--
SVN rev 196470 on 2009-08-23 14:55:57Z by rnoland

Add kernel support for Radeon R6/7xx 3D.

You will still need Mesa from git and possibly an updated DDX driver,
but this is working fairly well now.
--
SVN rev 196142 on 2009-08-12 12:57:02Z by rnoland

Add support for radeon RS880 IGP chips to drm.
--
SVN rev 195501 on 2009-07-09 16:39:28Z by rnoland

Add support for Radeon HD 4770 (RV740) chips.
--
SVN rev 196471 on 2009-08-23 15:02:58Z by rnoland

Add GET_PARAM support for Z pipes.

This is needed for occulsion queries on rv530 chips.
--
SVN rev 198695 on 2009-10-30 18:07:22Z by rnoland

A bit of cleanup work on radeon_freelist_get()

  * Fix the main loop to search all buffers before sleeping.
  * Remove dead code
--
SVN rev 197606 on 2009-09-28 22:41:28Z by rnoland

Fix offset handling
--
SVN rev 197605 on 2009-09-28 22:40:29Z by rnoland

radeon_family is an enum, so ordering can be important.

sync up with what amd is shipping.
--
SVN rev 197603 on 2009-09-28 22:37:07Z by rnoland

R600 doesn't support IRQs yet, so don't try to use them.
--

special thanks to robert noland @ freebsd for making this an
easy port!

diffstat:

 sys/external/bsd/drm/dist/bsd-core/drmP.h            |     3 +
 sys/external/bsd/drm/dist/shared-core/r600_blit.c    |  2000 ++++++++++++++++++
 sys/external/bsd/drm/dist/shared-core/r600_cp.c      |   188 +-
 sys/external/bsd/drm/dist/shared-core/radeon_cp.c    |     9 +-
 sys/external/bsd/drm/dist/shared-core/radeon_cs.c    |   856 +++++++
 sys/external/bsd/drm/dist/shared-core/radeon_drm.h   |    24 +
 sys/external/bsd/drm/dist/shared-core/radeon_drv.h   |    99 +-
 sys/external/bsd/drm/dist/shared-core/radeon_state.c |    25 +-
 8 files changed, 3183 insertions(+), 21 deletions(-)

diffs (truncated from 3524 to 300 lines):

diff -r 4db6292fb662 -r 3dfa7bd7a9ab sys/external/bsd/drm/dist/bsd-core/drmP.h
--- a/sys/external/bsd/drm/dist/bsd-core/drmP.h Mon May 24 00:29:30 2010 +0000
+++ b/sys/external/bsd/drm/dist/bsd-core/drmP.h Mon May 24 01:39:06 2010 +0000
@@ -621,6 +621,9 @@
        int                     flags;
        void *                  vaddr;
 } pci_map_data_t;
+
+/* XXX */
+#define readl(va) (*(volatile u_int32_t *) (va))
 #endif
 
 typedef struct drm_local_map {
diff -r 4db6292fb662 -r 3dfa7bd7a9ab sys/external/bsd/drm/dist/shared-core/r600_blit.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/external/bsd/drm/dist/shared-core/r600_blit.c Mon May 24 01:39:06 2010 +0000
@@ -0,0 +1,2000 @@
+/*-
+ * Copyright 2009 Advanced Micro Devices, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions 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 NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) 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:
+ *     Alex Deucher <alexander.deucher%amd.com@localhost>
+ */
+
+#include <sys/cdefs.h>
+/*__FBSDID("$FreeBSD: src/sys/dev/drm/r600_blit.c,v 1.5 2009/10/30 18:08:46 rnoland Exp $");*/
+
+#include "drmP.h"
+#include "drm.h"
+#include "radeon_drm.h"
+#include "radeon_drv.h"
+
+static u32 r6xx_default_state[] =
+{
+       0xc0002400,
+       0x00000000,
+       0xc0012800,
+       0x80000000,
+       0x80000000,
+       0xc0004600,
+       0x00000016,
+       0xc0016800,
+       0x00000010,
+       0x00028000,
+       0xc0016800,
+       0x00000010,
+       0x00008000,
+       0xc0016800,
+       0x00000542,
+       0x07000003,
+       0xc0016800,
+       0x000005c5,
+       0x00000000,
+       0xc0016800,
+       0x00000363,
+       0x00000000,
+       0xc0016800,
+       0x0000060c,
+       0x82000000,
+       0xc0016800,
+       0x0000060e,
+       0x01020204,
+       0xc0016f00,
+       0x00000000,
+       0x00000000,
+       0xc0016f00,
+       0x00000001,
+       0x00000000,
+       0xc0096900,
+       0x0000022a,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0xc0016900,
+       0x00000004,
+       0x00000000,
+       0xc0016900,
+       0x0000000a,
+       0x00000000,
+       0xc0016900,
+       0x0000000b,
+       0x00000000,
+       0xc0016900,
+       0x0000010c,
+       0x00000000,
+       0xc0016900,
+       0x0000010d,
+       0x00000000,
+       0xc0016900,
+       0x00000200,
+       0x00000000,
+       0xc0016900,
+       0x00000343,
+       0x00000060,
+       0xc0016900,
+       0x00000344,
+       0x00000040,
+       0xc0016900,
+       0x00000351,
+       0x0000aa00,
+       0xc0016900,
+       0x00000104,
+       0x00000000,
+       0xc0016900,
+       0x0000010e,
+       0x00000000,
+       0xc0046900,
+       0x00000105,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0xc0036900,
+       0x00000109,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0xc0046900,
+       0x0000030c,
+       0x01000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0xc0046900,
+       0x00000048,
+       0x3f800000,
+       0x00000000,
+       0x3f800000,
+       0x3f800000,
+       0xc0016900,
+       0x0000008e,
+       0x0000000f,
+       0xc0016900,
+       0x00000080,
+       0x00000000,
+       0xc0016900,
+       0x00000083,
+       0x0000ffff,
+       0xc0016900,
+       0x00000084,
+       0x00000000,
+       0xc0016900,
+       0x00000085,
+       0x20002000,
+       0xc0016900,
+       0x00000086,
+       0x00000000,
+       0xc0016900,
+       0x00000087,
+       0x20002000,
+       0xc0016900,
+       0x00000088,
+       0x00000000,
+       0xc0016900,
+       0x00000089,
+       0x20002000,
+       0xc0016900,
+       0x0000008a,
+       0x00000000,
+       0xc0016900,
+       0x0000008b,
+       0x20002000,
+       0xc0016900,
+       0x0000008c,
+       0x00000000,
+       0xc0016900,
+       0x00000094,
+       0x80000000,
+       0xc0016900,
+       0x00000095,
+       0x20002000,
+       0xc0026900,
+       0x000000b4,
+       0x00000000,
+       0x3f800000,
+       0xc0016900,
+       0x00000096,
+       0x80000000,
+       0xc0016900,
+       0x00000097,
+       0x20002000,
+       0xc0026900,
+       0x000000b6,
+       0x00000000,
+       0x3f800000,
+       0xc0016900,
+       0x00000098,
+       0x80000000,
+       0xc0016900,
+       0x00000099,
+       0x20002000,
+       0xc0026900,
+       0x000000b8,
+       0x00000000,
+       0x3f800000,
+       0xc0016900,
+       0x0000009a,
+       0x80000000,
+       0xc0016900,
+       0x0000009b,
+       0x20002000,
+       0xc0026900,
+       0x000000ba,
+       0x00000000,
+       0x3f800000,
+       0xc0016900,
+       0x0000009c,
+       0x80000000,
+       0xc0016900,
+       0x0000009d,
+       0x20002000,
+       0xc0026900,
+       0x000000bc,
+       0x00000000,
+       0x3f800000,
+       0xc0016900,
+       0x0000009e,
+       0x80000000,
+       0xc0016900,
+       0x0000009f,
+       0x20002000,
+       0xc0026900,
+       0x000000be,
+       0x00000000,
+       0x3f800000,
+       0xc0016900,
+       0x000000a0,
+       0x80000000,
+       0xc0016900,
+       0x000000a1,
+       0x20002000,
+       0xc0026900,
+       0x000000c0,
+       0x00000000,
+       0x3f800000,
+       0xc0016900,
+       0x000000a2,
+       0x80000000,
+       0xc0016900,
+       0x000000a3,
+       0x20002000,
+       0xc0026900,
+       0x000000c2,
+       0x00000000,
+       0x3f800000,
+       0xc0016900,
+       0x000000a4,
+       0x80000000,
+       0xc0016900,
+       0x000000a5,
+       0x20002000,
+       0xc0026900,
+       0x000000c4,
+       0x00000000,
+       0x3f800000,
+       0xc0016900,
+       0x000000a6,
+       0x80000000,
+       0xc0016900,
+       0x000000a7,
+       0x20002000,
+       0xc0026900,
+       0x000000c6,
+       0x00000000,
+       0x3f800000,
+       0xc0016900,
+       0x000000a8,
+       0x80000000,
+       0xc0016900,
+       0x000000a9,
+       0x20002000,
+       0xc0026900,
+       0x000000c8,
+       0x00000000,
+       0x3f800000,



Home | Main Index | Thread Index | Old Index