Commit graph

122 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
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
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
Eric Anholt
05204b9c8d Merge branch 'origin' 2007-07-19 06:31:26 -07:00
Dave Airlie
a64b5d8d37 fix some missing whitespace/tab 2007-07-18 15:49:45 +10:00
Eric Anholt
3f04fe7890 Fix FreeBSD build. 2007-07-16 01:53:06 -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
Michel Dänzer
3d5d41fa98 i915: Fix handling of breadcrumb counter wraparounds. 2007-06-15 17:13:11 +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
Wang Zhenyu
3917f85c73 i915: Add support for 965GME/GLE chip. 2007-05-31 11:09:07 +01:00
Jung-uk Kim
b0c8d885ce Update a bunch of FreeBSD port code.
Tested on r200/r300.  i915 updates still remain to be done.
2007-05-29 15:02:44 -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
a88f541e65 i915: Fix build for drm_i915_hwz_t union member which is now named. 2007-05-11 12:53:00 +02:00
Michel Dänzer
fa5279e289 i915: Invalidate all non-static indirect state at the beginning of HWZ render. 2007-05-11 12:49:26 +02:00
Michel Dänzer
7dc43ddeaa i915: HWZ render sub-ioctl supports waiting for pending flips on request. 2007-05-11 11:15:35 +02: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
9c3c981134 i915: Fixup handling of total number of bin cliprects. 2007-05-11 09:43:52 +02:00
Keith Packard
e4d163d81a Allow vblank interrupts to remain disabled across VT switch.
i915_driver_irq_postinstall was forcing vblank interrupts to pipe A when
called with vblank interrupts disabled. This caused vblank interrupts to be
accidentally re-enabled when VT switching the X server. Instead, start the
driver with vblank interrupts enabled on pipe A to support older X servers,
but then leave control over the state to the X server if it is able to do so.
2007-05-10 13:15:32 -07: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
6120026907 i915: Fix modifications of Cache_Mode_0 register. 2007-05-09 15:19:09 +02:00
Michel Dänzer
a8b8d7cece i915: Fix potential issue related to BPL layout.
Only round up the number of BPL rows for calculating the BPL size, or we may
end up firing incorrectly initialized bin batchbuffers.
2007-05-03 19:41:13 +02:00
Michel Dänzer
e6aba21ac9 i915: Clean up HWZ debugging.
Disable most debugging output by default.

Also require valid static indirect state to be passed in for rendering.
2007-05-03 12:55:15 +02:00
Michel Dänzer
f9f3e60aea i915: HWZ resource cleanup improvements.
Free the BMP on X server shutdown, BPLs and bins on client exit.
2007-05-03 12:25:25 +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
b04896ca96 i915: Absolute HW offset for static state instead of relative to batch_start.
With the corresponding Mesa change, I can see rendering from the HWB, if not
quite correct yet...
2007-05-02 16:42:01 +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
Dave Airlie
9f9c19065c remove DRM_GETSAREA and replace with drm_getsarea function 2007-04-28 15:07:43 +10: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
f7554ec36c i915: Some minor HWZ cleanup and additional debugging output.
Mostly to clarify where the HWB is hanging.
2007-04-23 10:07:57 +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
ad172d79d1 i915: Don't always read/write LP_RING register in generalized ring functions. 2007-04-18 19:35:58 +02:00
Michel Dänzer
5f3c5781df i915: Miscellaneous HWZ fixes.
Also extend debugging output.
2007-04-13 18:43:47 +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
e43a68db2b i915: BPL must be 16KB aligned. 2007-04-10 15:10:49 +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
744503f7d6 i915: BPL initialization fixes. 2007-04-09 17:25:30 +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