Commit Graph

2541 Commits

Author SHA1 Message Date
Eric Anholt 09beee378c Don't do GTT maps on objects bigger than half the available aperture size.
The basic problem is that software fallbacks will do single instructions that
copy from one GTT-mapped BO into another GTT-mapped BO.  If we can't get both
of them bound simultanously, we fault one in, retry the instruction, fault the
other in (kicking out #1), retry the instruction, fault #1 back in
(kicking out #2), etc.

Note that we'll still get into a nasty spot if you do a composite operation
with a mask where all 3 are big-but-less-than-half-available-aperture, where
you'll thrash.  It at least means you'll make progress, though, since each
instruction will only be operating on two BOs at at time, and the situation
seems unlikely.

Bug #20152 (3/3)
2009-05-19 10:09:41 -07:00
Eric Anholt 34660fd2df Only sync XV to vblank when drawing to the frontbuffer.
This fixes emitting syncs to random pipes with boxes bigger than that
pipe's vertical, leading to GPU hangs.

Bug #21738
2009-05-18 10:44:34 -07:00
Keith Packard 87332a7cc1 Use drm_intel_bo_disable_reuse API to flag scanout and cursor buffers
Buffers referenced by the kernel for scanout or cursor display should not be
reused by the driver. Use the new drm API to disable reuse of these buffers.

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-05-15 17:29:13 -07:00
Jesse Barnes ebe05200df Add --enable-debug flag to configure
Defaults to enabled.
2009-05-15 08:50:17 -07:00
Keith Packard 04772b6c09 If DRM can't figure out which pipe to sync on, then don't sync at all.
Syncing to the wrong pipe can wedge the hardware if the exclusion area is
larger than the vtotal

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-05-14 17:01:54 -07:00
Carl Worth 128c1c3b7d Use libdrm to lookup pipe for tear-free sync of XV
Previously, the code was trying to examine a driver_private field,
but those fields are only set by the userland-modesetting code so
would fail in the case of KMS. This fixes bug #21076:

[945GME] [KMS] XV_SYNC_TO_VBLANK does not prevent tearing of xv video
https://bugs.freedesktop.org/show_bug.cgi?id=21076
2009-05-14 17:01:53 -07:00
Wu Fengguang 2572fcc619 README: kill an evil dot
To make copy and paste a more pleasure.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
2009-05-14 14:04:52 -07:00
Eric Anholt b9462516d1 Remove dead "avail" variable from XAA stuff. 2009-05-14 14:04:38 -07:00
Jesse Barnes 1c68bc376a Add new have_gem flag
Prior to this patch, code that wanted to check whether GEM was present
would look at pI830->memory_manager.  This turned out to be occasionally
problematic in the KMS case, since memory_manager didn't always get set
correctly.  So add a new pI830->have_gem flag to make things clear in
the various code paths, and set it after GEM initializes or when KMS is
detected.

Reviewed-by: Eric Anholt <eric@anholt.net>
Tested-by: Magnus Kessler <Magnus.Kessler@gmx.net>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2009-05-13 13:19:53 -07:00
Keith Packard 5236784708 Load i915 and fbcon when checking for KMS
Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
2009-05-12 14:38:30 -07:00
Keith Packard ff7494b4c4 Add DP link and GMCH M and N registers
Signed-off-by: Eric Anholt <eric@anholt.net>
2009-05-12 14:38:29 -07:00
Keith Packard e54a23bff0 Fallback when VT inactive
While the VT is inactive, pI830->batch_bo will be NULL, so use that as a
simple check for when to not use the accelerator. The alternative is to
ignore VT switch and just keep drawing, which would also be fine.

Bug #21468.

Signed-off-by: Keith Packard <keithp@keithp.com>
[anholt: Removed extra return FALSE -- I830FALLBACK does that.]
Signed-off-by: Eric Anholt <eric@anholt.net>
2009-05-12 14:27:57 -07:00
Wu Fengguang 660bd745c2 Remove the offset parameter from i830_allocator_init()
offset is redundant.  i830_allocator_init() is only called
in one place with offset=0.

Acked-by: Magnus Kessler <Magnus.Kessler@gmx.net>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
2009-05-12 14:25:10 -07:00
Carl Worth b1f5cc3349 RELEASING: Better instructions for where to send announcements
The xorg-announce list doesn't need to hear about development
snapshots and release candidates. The intel-gfx list is good for
that.
2009-05-12 11:46:17 -07:00
Alan Coopersmith f16ee21884 Fix "Unkown" typo in two FatalError messages
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2009-05-10 16:25:24 -07:00
Stijn van Drongelen 8d27247829 Fix typo in (unused) INTEL_BIOS_32 macro
Debian bug#527062 <http://bugs.debian.org/527062>

[jcristau: fix same typo in bios_reader.c]
Signed-off-by: Julien Cristau <jcristau@debian.org>
2009-05-05 16:38:59 +02:00
Arkadiusz Miśkiewicz a8a771a853 Restore CFLAGS after tests.
Reverts single line of broken commit e5133a94dc.

Signed-off-by: Eric Anholt <eric@anholt.net>
2009-05-04 11:05:20 -07:00
Keith Packard 8255cca2c9 Split i915 textured video commands to fit into batch buffers.
i915 textured video commands are quite long, but must be contained in the
same batch buffer as the 3D setup commands. When the number of clip rects
for the video becomes too large for the associated commands to fit in the
same batch buffer, this change breaks the sequence into pieces, ensuring
that each batch contains the necessary setup sequence.

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-05-01 18:34:43 -07:00
Keith Packard e5e0fb846b Call down to lower CloseScreen before shutting down DRM allocator
Lower level functions will destroy objects that are managed by the DRM
allocator, so make sure those are done before the allocator shuts down.

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-05-01 12:26:04 -07:00
Keith Packard cfb98f3da9 Revert "Leave allocator running until lower-level CloseScreens are done"
Uh, oops -- the FD used to talk to the kernel is closed before the
allocator_fini function is called now.

This reverts commit 1872869e6f.
2009-05-01 12:23:32 -07:00
Keith Packard 11a853bd8e Hold reference to video binding table until all rects are painted.
The optimization of unreferencing the binding table when the relocation is
posted causes the object to be dereferenced for each box in the clip list,
causing general chaos in the buffer manager. It's easier to just hold a
reference to the object until all of the boxes are painted and then drop it.

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-05-01 11:55:13 -07:00
Keith Packard ed492131c1 3D_STATE_VERTEX_BUFFERS takes four 32-bit values, not three.
The spec says this command takes an extra (mbz) 32-bit value, so let's
provide it with one.

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-05-01 11:54:48 -07:00
Keith Packard 66d1536a2e Don't bother to enable VF statistics during 965 video playback
This was used while bringing up the driver to debug vertext fetches.

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-05-01 11:54:42 -07:00
Keith Packard 1872869e6f Leave allocator running until lower-level CloseScreens are done
The lower level close screen functions will free allocated objects, causing
a crash if the allocator isn't still available.

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-05-01 11:54:32 -07:00
Keith Packard 1142353b48 intel_batch_start_atomic: fix size passed to intel_batch_require_space (*4)
intel_batch_start_atomic takes an argument in 32-bit units, and so it must
multiply that by 4 before passing it to intel_batch_require_space, which
takes an argument in bytes.

We should figure out what units we want to use and use the same everywhere...

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-05-01 11:54:26 -07:00
Keith Packard 8232177a00 Allow cursors to roam past 2048x2048 limit.
There's no reason to clip cursor positions to an artificial limit; the
hardware cursor limits always mirror the hardware display limits.

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-04-30 15:30:05 -07:00
Carl Worth 417f3784b7 Add doltlibtool to DISTCLEANFILES
Otherwise make distcheck fails.
2009-04-28 20:42:22 -07:00
Carl Worth bc9a688476 NEWS: Add notes for 2.7.99.1 snapshot 2009-04-28 20:37:13 -07:00
Kristian Høgsberg a90cab4320 Remove a handful of pointless comments
CVS keywords, comments about how the source was once reformatted,
and the ad-hoc changelog comment in in i830_driver.c
2009-04-28 13:27:53 -04:00
Eric Anholt c231b41f3f Remove checks for xf86RotateFreeShadow, introduced in server 1.4. 2009-04-27 17:06:00 -07:00
Eric Anholt e5133a94dc unifdef LIBPCIACCESS and XSERVER_LIBPCIACCESS.
Depending on new server means these are always present.
2009-04-27 17:05:59 -07:00
Eric Anholt 4653a7db62 Rely on BO pixmaps being present in acceleration paths. 2009-04-27 17:05:59 -07:00
Eric Anholt 1784efc1f0 Remove XF86DRM_MODE.
We now depend on server 1.6 and current libdrm, so no need to ifdef it.
2009-04-27 17:05:59 -07:00
Eric Anholt d82ea4372f Replace I830Sync's irq emit/wait code with bufmgr use.
This pre-GEM code was all sorts of broken -- see intel_bufmgr_fake.c for
the hoops that must be jumped to use that kernel interface successfully.
Yet we continued to use it even with KMS/DRI2/UXA, which may account for
some hangs.
2009-04-27 17:05:59 -07:00
Eric Anholt 612c1f1f18 Remove I830_XV ifdef.
The developers of the driver don't ever run or test without XV.  Don't do it.
2009-04-27 17:05:59 -07:00
Eric Anholt af6892f2b8 Replace i830WaitSync with just I830Sync(), as nearly all callers had it wrong.
People were trying to BEGIN_BATCH()/ADVANCE_BATCH() then i830WaitSync on the
results, which wouldn't necessarily wait and lead to various painful bugs,
since only EXA called MarkSync and only for certain rendering operations.
2009-04-27 17:05:59 -07:00
Eric Anholt 393abc15b7 Now that video destination pixmaps are always in BOs, no more MarkSync. 2009-04-27 17:05:59 -07:00
Eric Anholt dc71573292 Remove can_resize, which is now always true (except when a bug interfered) 2009-04-27 17:05:59 -07:00
Eric Anholt 96df22740b unifdef I830_USE_UXA.
We only have on acceleration architecture now, and you can always build it
if you're building the driver.
2009-04-27 17:05:59 -07:00
Eric Anholt fa81ae1637 Remove EXA support.
UXA has completely replaced EXA at this point.  UXA is the same rendering
core as EXA, but relying on kernel memory management or a fake bufmgr instead
of trying to manage memory in the X Server.
2009-04-27 17:05:59 -07:00
Eric Anholt 1b10745a25 Remove XAA support.
While EXA/UXA aren't completely good replacements (see bugzilla for
performance and stability problems), we are pretty sure at this point that
it's the right way to go and that having multiple acceleration architectures
is getting in the way of producing a stable codebase.
2009-04-27 17:05:59 -07:00
Eric Anholt 30c226eeb3 Remove DRI1 support.
This was blocked on wide distribution of X Server 1.6 (now in the current or
next version of major distributions) and solutions for a couple of significant
architectural problems (vblank sync and frontbuffer rendering, which we now
have code or good plans for).

This includes disabling XVMC which is DRI1-only currently.
2009-04-27 17:05:55 -07:00
Eric Anholt 47591334a1 Remove pre-server-1.5 support. 2009-04-27 16:50:34 -07:00
Eric Anholt 3187c7698b Fix assert at startup with DRI initialiation failure.
In this path, we'd make it to allocator_init -> init_bufmgr without
GEM and without FbBase being initialized, leading to assertion failure
to catch this mistake.

Comedy ensued when trying to move just the MapMem up, leading to the rest
of the commit.  Some day (like tomorrow after I rebase intel-cleanup) I'll
clean this path up.

Tested with 2 X Servers on 2.6.28 (one gets DRI2, one fails successfully),
2 UMS X Servers on 2.6.30rc2 (each gets DRI2), and 2 KMS X Servers on
2.6.30rc2 (success all around).
2009-04-27 16:32:25 -07:00
Eric Anholt fbaf13c935 Don't clear the framebuffer if it isn't currently bound.
This segfault can be triggered in non-KMS memory init before the EnterVT,
and will happen anyway at EnterVT time.
2009-04-27 16:32:25 -07:00
Eric Anholt ab878118b9 Don't initialize DRI2 if the fd we get is not master-capable. 2009-04-27 16:32:25 -07:00
Eric Anholt 385ac2197b Fix drmSetMaster/DropMaster error messages. 2009-04-27 16:32:25 -07:00
Pierre Willenbrock 5b05a589ef format == 0 means "use default" in I830DRI2CreateBuffer
Reviewed-by: Ian Romanick <idr@freedesktop.org>
2009-04-27 12:00:49 -07:00
Eric Anholt e55d943126 Don't try to do anything for I830Sync when VT switched.
Fixes a crash with fake bufmgr and UXA.
2009-04-27 11:19:00 -07:00
Shuang He 9748aa5594 Free front buffer bo when X exit
It's needed when KMS or DRI2 is enabled, or there will be memory leak.
Also fixes a segfault at startup with fake bufmgr.

Signed-off-by: Eric Anholt <eric@anholt.net>
2009-04-24 16:48:25 -07:00