Commit Graph

114 Commits (efa485b2cf2f1f46760a3d9297ba1a73a2dbcd05)

Author SHA1 Message Date
Jesse Barnes 9583c099b4 Revert "Merge branch 'modesetting-gem'"
This reverts commit 6656db1055.

We really just want the libdrm and ioctl bits, not all the driver
stuff.
2008-12-10 15:50:22 -08:00
Dave Airlie 28c9eb7b74 radeon: commit ring after emitting the buffer discards 2008-11-03 09:50:46 +10:00
Dave Airlie 31f8d4218c radeon: add wait rendering API 2008-11-03 09:44:03 +10:00
Dave Airlie 4ccec67a23 radeon: remove unused gem indirect ioctl 2008-11-03 09:42:01 +10:00
Dave Airlie 8b2925468d radeon: make new CS2 command submission interface port older interface to this 2008-11-03 09:39:53 +10:00
Dave Airlie b167ccf10f radeon: fix kernel_mm properly 2008-08-14 09:17:43 +10:00
Dave Airlie b0ee12e6bb radeon: use mm_enabled variable to denote memory manager running 2008-08-14 09:14:14 +10:00
Dave Airlie 18020e5e96 radeon: make buffer swap for older drivers work again on GEM 2008-08-14 09:12:36 +10:00
Dave Airlie d59f41b8cf radeon: add userspace call for mm support check 2008-08-14 09:11:15 +10:00
Dave Airlie 513d4c3ff1 radeon: fix setting new memmap in right place 2008-08-06 10:21:20 +10:00
Dave Airlie aa8e15f8b5 radeon: add userspace mm enable switch 2008-08-04 14:59:17 +10:00
Dave Airlie d659302e09 radeon: add some handles to the sarea + kernel mm available check 2008-07-30 17:05:50 +10:00
Dave Airlie 38835f9cd2 radeon command submission start
take code from Jerome munge into a TTM IB re-use
2008-07-28 15:21:13 +10:00
Dave Airlie df9871064e radeon: add initial atombios modesetting and GEM -> TTM translation layer.
This is an initial import of the atom bios parser with modesetting support
for r500 hw using atombios. It also includes a simple memory manager
layer that translates a radeon GEM style interface onto TTM internally.

So far this memory manager has only been used for pinned object allocation
for the DDX to test modesetting.
2008-07-26 08:56:23 +10:00
Alan Hourihane 3a3f39d144 Merge branch 'master' of git+ssh://git.freedesktop.org/git/mesa/drm into modesetting-101
Conflicts:

	shared-core/i915_dma.c
	shared-core/i915_drv.h
2008-05-28 21:01:18 +01:00
Alex Deucher 59c953245c RADEON: add get_param for number of GB pipes 2008-05-27 18:34:33 -04:00
Alan Hourihane b6dc381fab Merge branch 'master' of git+ssh://git.freedesktop.org/git/mesa/drm into modesetting-101
Conflicts:

	shared-core/i915_dma.c
	shared-core/i915_drv.h
	shared-core/i915_irq.c
2008-03-12 10:18:33 +00:00
Dave Airlie ce3733572e drm/radeon: check sarea_priv exists 2008-03-08 08:30:30 +10:00
Alan Hourihane 1e66322633 Merge branch 'master' of git+ssh://git.freedesktop.org/git/mesa/drm into modesetting-101
Conflicts:

	shared-core/i915_dma.c
2008-02-26 15:42:41 +00:00
Roland Scheidegger d6098db140 fix texture uploads with large 3d textures (bug 13980)
Texture uploads could hit the blitter coordinate limit, adjust the texture
offset when uploading the pieces. Make sure to check the end address of the
upload too.
2008-02-23 11:01:36 +01:00
Dave Airlie 8bf8cd63bb missing bits 2008-02-14 07:37:34 +10:00
Márton Németh 9ab620d661 drm: cleanup DRM_DEBUG() parameters
As DRM_DEBUG macro already prints out the __FUNCTION__ string (see
drivers/char/drm/drmP.h), it is not worth doing this again. At some
other places the ending "\n" was added.

airlied:- I cleaned up a few that this patch missed also
2008-01-03 16:56:04 +10:00
Dave Airlie 5dc5c36e62 drm: major whitespace/coding style realignment with kernel 2007-11-22 16:10:36 +10:00
Dave Airlie a90510966e radeon: refactor out the fb/agp location read/write.
Add a new get param to get the fb location into userspace. Mesa currently
hits MMIO to do this, but this isn't always possible.
2007-11-18 19:25:31 +10:00
Dave Airlie 7f6bf84c23 drm: remove lots of spurious whitespace.
Kernel "cleanfile" script run.
2007-11-05 12:42:22 +10:00
chaohong guo f863d23e01 radeon: Commit the ring after each partial texture upload blit.
This makes sure each blit starts as early as possible, which may improve
texture upload performance in some cases.
2007-09-29 18:08:04 +02:00
Eric Anholt 5b38e13416 Replace DRM_IOCTL_ARGS with (dev, data, file_priv) and remove DRM_DEVICE.
The data is now in kernel space, copied in/out as appropriate according to the
This results in DRM_COPY_{TO,FROM}_USER going away, and error paths to deal
with those failures.  This also means that XFree86 4.2.0 support for i810 DRM
is lost.
2007-07-20 18:16:42 -07:00
Eric Anholt c1119b1b09 Replace filp in ioctl arguments with drm_file *file_priv.
As a fallout, replace filp storage with file_priv storage for "unique
identifier of a client" all over the DRM.  There is a 1:1 mapping, so this
should be a noop.  This could be a minor performance improvement, as everything
on Linux dereferenced filp to get file_priv anyway, while only the mmap ioctls
went the other direction.
2007-07-20 13:39:45 -07:00
Eric Anholt e39286eb5e Remove DRM_ERR OS macro.
This was used to make all ioctl handlers return -errno on linux and errno on
*BSD.  Instead, just return -errno in shared code, and flip sign on return from
shared code to *BSD code.
2007-07-20 12:53:52 -07:00
Dave Airlie 21ee6fbfb8 drm: remove drmP.h internal typedefs 2007-07-16 12:32:51 +10:00
Dave Airlie b95ac8b7b3 drm: detypedef drm.h and fixup all problems 2007-07-16 11:22:15 +10:00
Dave Airlie 4e9d215bdf radeon: add support for vblank on crtc2
This add support for CRTC2 vblank on radeon similiar to the i915 support
2007-06-03 16:28:21 +10:00
Michel Dänzer ca1cd3257c radeon: Don't mess up page flipping when a file descriptor is closed.
There can still be other contexts that may use page flipping later on, so don't
just unilaterally 'clean it up', which could lead to the wrong page being
displayed, e.g. when running 3D apps with a GLX compositing manager such as
compiz using page flipping.
2007-04-29 12:37:51 +02:00
Dave Airlie 188a93c9df radeon: make PCI GART aperture size variable, but making table size variable
This is precursor to getting a TTM backend for this stuff, and also
allows the PCI table to be allocated at fb 0
2007-03-04 19:10:46 +11:00
Michel Dänzer aefc7a3443 Unify radeon offset checking.
Replace r300_check_offset() with generic radeon_check_offset(), which doesn't
reject valid offsets when the framebuffer area is at the very end of the card's
32 bit address space. Make radeon_check_and_fixup_offset() use
radeon_check_offset() as well.

This fixes https://bugs.freedesktop.org/show_bug.cgi?id=7697 .
2006-12-14 19:31:56 +01:00
Roland Scheidegger a9f57a2b9c only allow specific type-3 packets to pass the verifier instead of all for r100/r200 as others might be unsafe (r300 already does this), and add checking for these we need but aren't safe. Check the RADEON_CP_INDX_BUFFER packet on both r200 and r300 as it isn't safe neither. 2006-10-10 02:24:19 +02:00
Roland Scheidegger 1f71b8d7a4 do a TCL state flush before accessing VAP_CNTL to prevent lockups on r200 when enabling/disabling vertex programs 2006-09-20 19:44:57 +02:00
Michel Dänzer 6ba9127753 Use register writes instead of BITBLT_MULTI packets for buffer swap blits.
This takes up two more ring buffer entries per rectangle blitted but makes sure
the blit is performed top to bottom, reducing the likelyhood of tearing.
2006-09-15 16:55:40 +02:00
Dave Airlie 3cc64a943a drm: use radeon specific names for radeon flags 2006-09-12 06:13:14 +10:00
Dave Airlie 9b984b34e9 drm: lots of small cleanups and whitespace issues fixed up
remove a mach64 warning, align a lot of things from linux kernel
2006-08-28 11:31:43 +10:00
Michel Dänzer b99e332236 Bug #7595: Avoid u32 overflows in radeon_check_and_fixup_offset().
The overflows could cause valid offsets to get rejected under some
circumstances, e.g. when the framebuffer resides at the very end of the card's
address space.
2006-08-26 12:23:47 +02:00
Michel Dänzer e337eadcec Implement RADEON_PARAM_SCRATCH_OFFSET getparam.
When this succeeds, userspace can read the scratch register contents from the
mapped writeback page directly.
2006-07-19 19:07:06 +02:00
Michel Dänzer 7dea64677b Some debug output when the getparam ioctl is called with an unknown parameter. 2006-07-19 19:01:33 +02:00
Roland Scheidegger f4e6e4499c Add support for r200 vertex programs (R200_EMIT_VAP_PVS_CNTL, and new
packet type for making it possible to address whole tcl vector space
    and have a larger count)
2006-05-24 18:36:24 +00:00
Roland Scheidegger e1b627c17e Do a tcl state flush before accessing tcl vector space. This fixes some
more problems with flickering (bug #6637). drm may not be appropriate
    place for this, since doing that flush there might both be overkill and
    insufficient in some cases. However, it's hard to figure out when that
    flush is needed, so this has to suffice. There does not seem to be a
    performance penalty associated with it.
2006-05-20 09:08:18 +00:00
Eric Anholt 1327222f9b Err, use "ifndef" rather than "if !", to avoid compiler warning. 2006-04-18 06:12:22 +00:00
Eric Anholt 40b70e3244 Use __LP64__ instead of checking the linux-specific BITS_PER_LONG. 2006-04-18 05:57:28 +00:00
Eric Anholt 6cb366b5a8 Compile fixes for FreeBSD. 2006-04-08 09:45:43 +00:00
Dave Airlie 985738f203 radeon fix up the PCI ids for new memory map like the kernel one.. not
perfect but should be very safe... align some other kernel bits i810
    align with kernel
2006-03-25 07:16:14 +00:00
Dave Airlie ea40d3dd41 Fix bug I reintroduced 2006-03-08 23:01:32 +00:00