Commit graph

99 commits

Author SHA1 Message Date
Michel Dänzer
b257bbe48a Merge remote branch 'upstream/master' into i915-zone-rendering
Conflicts:

	linux-core/drm_bo.c
	linux-core/drm_objects.h
	linux-core/i915_buffer.c
	shared-core/i915_dma.c
	shared-core/i915_drm.h
	shared-core/i915_drv.h
	shared-core/i915_irq.c
2007-09-07 20:17:49 +02:00
Keith Packard
c78e610fa4 Add register defines for hw binning 2007-08-28 12:23:51 -07:00
Keith Whitwell
cbf7c5cace i915: Document HWZ related definitions. 2007-08-21 12:48:46 +02:00
Dave Airlie
da27986870 i915: i965 non-secure batchbuffer bit has moved. 2007-08-11 08:57:53 +10: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
05204b9c8d Merge branch 'origin' 2007-07-19 06:31:26 -07:00
Eric Anholt
33a50412c2 Add dry-coded DRM drawable private information storage for FreeBSD.
With this, all modules build again.
2007-07-18 14:22:49 -07:00
Eric Anholt
3f04fe7890 Fix FreeBSD build. 2007-07-16 01:53:06 -07:00
Dave Airlie
be85ad0333 drm: detypedef ttm/bo/fence code 2007-07-16 13:37:02 +10:00
Dave Airlie
21ee6fbfb8 drm: remove drmP.h internal typedefs 2007-07-16 12:32:51 +10:00
Dave Airlie
2c9e05cf4c Merge branch 'master' into cleanup
Conflicts:

	libdrm/xf86drm.c
	linux-core/drm_bo.c
	linux-core/drm_fence.c
2007-07-11 11:23:41 +10:00
Michel Dänzer
3d5d41fa98 i915: Fix handling of breadcrumb counter wraparounds. 2007-06-15 17:13:11 +02:00
Thomas Hellstrom
b6b5df24b9 Try to make buffer object / fence object ioctl args 64-bit safe.
Introduce tile members for future tiled buffer support.
Allow user-space to explicitly define a fence-class.
Remove the implicit fence-class mechanism.
64-bit wide buffer object flag member.
2007-06-12 12:21:38 +02:00
Wang Zhenyu
109e2a10f2 Add support for the G33, Q33, and Q35 chipsets.
These require that the status page be referenced by a pointer in GTT, rather
than phsyical memory.  So, we have the X Server allocate that memory and tell
us the address, instead.
2007-06-05 11:15:29 -07:00
Michel Dänzer
6677565a32 i915: HWZ userspace interface cleanup.
Remove anything dealing with the unused 'HWZ' ring buffer, do round robing of
available BPLs internally and rename static_state_offset to static_state_start.
2007-05-14 15:29:38 +02:00
Keith Whitwell
9d6e1d44ce i915: Move hwz code to new file. 2007-05-13 14:15:40 +01:00
Michel Dänzer
2efd48b313 i915: Detect HWB out of memory condition.
Just refrain from doing anything with the HWB after it happens for now.
2007-05-11 10:05:27 +02:00
Michel Dänzer
c05ff1302c i915: Handle cliprects for HWZ.
In the alloc sub-ioctl, use the cliprects to calculate the binning rectangles
and per-bin cliprects. Then in the render sub-ioctl repeat each bin batchbuffer
for each bin cliprect.
2007-05-10 19:36:06 +02:00
Michel Dänzer
a09c68e274 i915: Track HWZ state per file handle.
This allows several contexts to use HWZ concurrently. The global BMP state is
still kept in the device struct.
2007-05-10 16:10:43 +02:00
Michel Dänzer
e266adcd1b i915: Use HW status page DWORD 16 instead of 5 for fence sequence.
The first 16 DWORDs are reserved, number 5 for ring buffer 1 head in particular.
2007-05-03 12:21:57 +02:00
Michel Dänzer
0db4b34424 i915: HWZ improvements.
* Fix stupid error in BPL initialization. The HWB no longer hangs, and we can
  see bin batchbuffers fully initialized by it. No actual rendering occurs
  though.
* Set physical address space for LOAD_INDIRECT of static indirect state.
* Free and re-allocate BPLs when necessary.
* Use TTM buffer object in the virtual address BPL path.
* Some more debugging output.
2007-05-02 12:13:13 +02:00
Michel Dänzer
3786b8c921 i915: Initialize PRIV1 regardless of HWZ.
Might be useful for indirect state on older hardware.
2007-05-01 19:51:17 +02:00
Michel Dänzer
476c5daed0 Merge remote branch 'upstream/master' into i915-zone-rendering
Conflicts:

	shared-core/i915_irq.c
2007-05-01 13:27:54 +02:00
Michel Dänzer
579f9c09eb i915: Add PRIV1 memory type.
This is backed by physically contiguous memory and can be referenced by
userspace by its physical address.
2007-05-01 13:24:22 +02:00
Michel Dänzer
021ccee6c3 i915: More HWZ fixes and extended debugging output.
Also initialize invariant state at the beginning of the rendering stream, and
start an alternative code path for using GTT relative BPL addresses (currently
always hangs the HWB during the first frame).
2007-04-26 13:52:15 +02:00
Michel Dänzer
a09bf2337d i915: HWZ reorganization.
* Feed the HWB synchronously, and print out any batchbuffer commands it
  generates.
* Put the rendering commands into the normal ring buffer.
* Emit static state in the rendering stream, the HWB doesn't support it.

Various other minor changes.
2007-04-24 19:10:48 +02:00
Michel Dänzer
b65ddb2f88 i915: Various HWZ fixes.
Still doesn't work quite correctly, but at least it no longer locks up or hangs
with simple apps.
2007-04-19 20:27:51 +02:00
Michel Dänzer
333dad97bb i915: Emit BIN_CONTROL state. 2007-04-11 19:22:53 +02:00
Michel Dänzer
3da7d2c13b i915: Various calculation fixes. 2007-04-11 19:09:08 +02:00
Michel Dänzer
974fe15f85 i915: Synchronize HWB and HWZ ring buffers before writing to them. 2007-04-10 15:20:55 +02:00
Michel Dänzer
f9c3905e75 i915: Flesh out HWZ render sub-ioctl. 2007-04-10 15:10:39 +02:00
Michel Dänzer
d0332ff450 i915: Initialize bin preambles before rendering when necessary. 2007-04-09 18:51:43 +02:00
Michel Dänzer
e4e4b92dc0 i915: Re-initialize BPL before each render. 2007-04-09 16:09:26 +02:00
Michel Dänzer
989e9229a4 i915: Only pass down relevant HWZ sub-ioctl structure pointer.
Remember state between sub-ioctls.
2007-04-09 16:07:56 +02:00
Michel Dänzer
fc34e6bf18 i915: Initialize HWB and HWZ ring buffers in HWZ init sub-ioctl. 2007-04-05 13:03:31 +02:00
Michel Dänzer
85ac18ae4d i915: Generalize ring buffer handling for several ring buffers. 2007-04-05 12:12:05 +02:00
Michel Dänzer
d8d7051f02 i915: Initialize BPLs before using them the first time. 2007-04-05 11:13:58 +02:00
Michel Dänzer
8c7eb2e726 i915: Allocate initial bin pages. 2007-03-30 17:30:46 +02:00
Michel Dänzer
df98ee85ac i915: Allocate the BPLs. 2007-03-30 15:30:49 +02:00
Dave Airlie
81b811da37 drm/i915: set the bo up at firstopen time not after DMA init
This is required to use TTM to allocate the ring buffer.
2007-03-27 18:01:31 +10:00
Michel Dänzer
d5f2195464 i915: Allocate and initialize the BMP. 2007-03-21 18:58:52 +01:00
Michel Dänzer
a9abb4c337 i915: Add skeleton for HWZ ioctl. 2007-03-21 17:35:14 +01:00
Dave Airlie
26aba875e1 more whitespace issues 2007-03-19 08:56:24 +11:00
Michel Dänzer
a33859184a i915: Eliminate dev_priv->current_page.
Always use dev_priv->sarea_priv->pf_current_page directly. This allows clients
to modify it as well while they hold the HW lock, e.g. in order to sync pages
between pipes.
2007-02-28 17:48:56 +01:00
Michel Dänzer
1cdc1b6fba i915: Don't emit waits for pending flips before emitting synchronous flips.
The assumption is that synchronous flips are not isolated usually, and waiting
for all of them could result in stalling the pipeline for long periods of time.

Also use i915_emit_mi_flush() instead of an old-fashioned way to achieve the
same effect.
2007-02-28 15:23:19 +01:00
Michel Dänzer
1a0d890a42 i915: Add support for scheduled buffer swaps to be done as flips.
Unfortunately, emitting asynchronous flips during vertical blank results in
tearing. So we have to wait for the previous vertical blank and emit a
synchronous flip.
2007-02-22 17:21:18 +01:00
Michel Dänzer
6f89584e13 i915: Improved page flipping support, including triple buffering.
Pages are tracked independently on each pipe.

Bump the minor version for 3D clients to know page flipping is usable, and
bump driver date.
2007-02-19 15:08:40 +01:00
Michel Dänzer
34aa3393d0 i915: Page flipping enhancements.
Leave it to the client to wait for the flip to complete when necessary,
but wait for a previous flip to complete before emitting another one. This
should help avoid unnecessary stalling of the ring due to pending flips.

Call i915_do_cleanup_pageflip() unconditionally in preclose.
2007-02-19 15:08:40 +01:00
Michel Dänzer
078e430726 i915: Unify breadcrumb emission. 2007-02-19 15:08:40 +01:00