Commit Graph

2665 Commits

Author SHA1 Message Date
Eric Anholt c2c670ef18 Remove more DRI1 dead code. 2010-02-20 12:57:21 -05:00
Eric Anholt b320449f75 Remove dead i830_ring.h. 2010-02-20 12:55:13 -05:00
Eric Anholt 6d48b26098 Remove dead i830_display.h. 2010-02-20 12:55:13 -05:00
Eric Anholt 4126f73051 Remove dead i830_bios.h. 2010-02-20 12:55:13 -05:00
Eric Anholt ca173c1eaf Remove the last tool now that it's been moved to gpu_tools. 2010-02-20 12:55:13 -05:00
Eric Anholt 6da7cda583 Remove swf_dumper. We have intel_mmio_read in gpu_tools to do this. 2010-02-20 12:55:13 -05:00
Eric Anholt 71c613c847 Remove bios_reader now that it's moved to gpu_tools. 2010-02-20 12:55:13 -05:00
Eric Anholt 7ada4eb383 Remove intel_hotplug tool now that it won't work with KMS.
We'd want to put something like it in sysfs or something if we wanted
this tool to exist again.
2010-02-20 12:55:13 -05:00
Eric Anholt 3284aacfe0 Remove dead i830_bios.c.
Things that used it are now either in the kernel or stashed off in
gpu_tools.
2010-02-20 12:55:13 -05:00
Eric Anholt 761d386a94 Remove intel_gtt and intel_lid now that they're in gpu_tools. 2010-02-20 12:55:13 -05:00
Eric Anholt 6199af00cb Remove xprintf.c from the old "I can't believe it's not an X Server" tools. 2010-02-20 12:55:13 -05:00
Eric Anholt cba8e3136a Remove intel_statuspage, now that we have /debug/dri/0/i915_gem_hws 2010-02-20 12:55:13 -05:00
Eric Anholt 40f5f72e30 Remove dead main.c from reg_dumper/ 2010-02-20 12:55:13 -05:00
Eric Anholt 0c5e4a65f5 Delete the audio dumping tool now that it lives in gpu_tools. 2010-02-20 12:55:13 -05:00
Eric Anholt a86869e6c3 Fix an unused variable warning for !INTEL_XVMC. 2010-02-20 12:55:13 -05:00
Eric Anholt ec5deb2bcb Remove dead assignments noticed by clang. 2010-02-20 12:55:13 -05:00
Eric Anholt a4180eabfa Remove stale junk in VideoRam setup, noticed by clang. 2010-02-20 12:55:13 -05:00
Eric Anholt 03657d4a69 Remove dead UMS CRTC resize code. 2010-02-20 12:55:13 -05:00
Chris Wilson 1c3aaad09d dri2: Silence the compiler for an unused function with proto < 4
Move the unused function into the #if DRI2INFOREC_VERSION >= 4 block.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-02-17 17:49:48 +00:00
Jesse Barnes 00e7312dc4 DRI2: handle full height blits without tearing in CopyRegion
On 965 and up, if we detect a full height blit, we should just wait for
vblank, rather than try to do a scanline wait for the whole display.

On pre-965, doing a scanline wait followed by a blit works, but in the
full height case we need to give the blitter time to start up, so we
wait until the bottom line of the blit minus 2 padding scanlines to
accommodate.

Fixes FDO bug #22475.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-02-11 09:46:12 -08:00
Jesse Barnes f0d760bfd7 Disable bo reuse on shadow framebuffer
This keeps us from trying to set tiling on it while pinned, which also
keeps us from trying to unpin it in the kernel, causing an error.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-02-10 11:24:46 -08:00
Jesse Barnes 6610bcbac5 DRI2: only use version 4 APIs if kernel support exists
Check for page flipping support before enabling flip and vblank event
support needed for the new DRI2 APIs.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-02-05 17:18:50 -08:00
Keith Packard 1a76fa5574 Initialize DRI2 info rec version 4 list of driver names
With DRI2 supporting multiple subsystems, the video driver must
initialize the list of driver names instead of just passing the single
driver name used by Mesa. Without this, the X server will fail to
initialize DRI2 as the numDrivers field in this structure will be
uninitialized.

Signed-off-by: Keith Packard <keithp@keithp.com>
2010-01-31 18:08:23 -08:00
Eric Anholt 93cd943d41 intel: Use the compositing-aware colorkey filler instead of homebrew fail.
Of course, it's still fail since you can't correctly composite
colorkey overlay, but at least this doesn't spam colorkey to the root
window.

Tested-by: Daniel Vetter <daniel@ffwll.ch>
2010-01-17 12:36:13 -08:00
Jesse Barnes 96f45c66ee DRI2: if the swap condition is satisfied, complete it immediately
If we get to the point where we check the divisor/remainder equation and
it's satisfied, we should complete the swap immediately.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-01-13 13:25:45 -05:00
Jesse Barnes 51c7590632 DRI2: support new DRI2 APIs
The new interfaces allow for improved buffer swap, and support for the
SGI_swap_control, SGI_video_sync and OML_sync_control GLX extensions.

The Intel implementation allows page flipping to occur for swaps that
are full screen and not rotated.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-01-13 13:25:45 -05:00
Chris Wilson 4902f546be i965: Ensure that URB_FENCE is aligned to 64-bytes
The PRM (Vol 1, p32) specifies that the URB_FENCE command must not cross
a cache-line boundary (64-bytes) in order to workaround a silicon issue.
Ensure that it does not by inserting an alignment point before the atomic
section.

This is a slightly too large hammer, but the easiest method to work with
the current BEGIN_BATCH/ADVANCE_BATCH protections.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-01-08 19:21:31 +00:00
Chris Wilson 83626aba35 uxa-glyphs: Enable TILING_X on glyph caches.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-01-08 19:21:31 +00:00
Chris Wilson 50e07da809 i830: Do not use vtSema when chosing mapping type.
The mapping type to use is determined by the tiling of the underlying
object, not by whether or not not we control the vt. This was a
left-over wart that was intended to mean that we had GEM and so could
use GTT mappings.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-01-08 19:21:31 +00:00
Chris Wilson 7a2b7cfab5 Consolidate determining maximum sizes for use with GEM
Add a small wrapper function so that the callsites need only call the
single function when checking the available aperture size for
determining the maximum viable size for operations. This will allow us
to easily extend this set in the future by only needing to adding the
check to a single location.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-01-08 19:21:31 +00:00
Daniel Vetter 229d23fb18 Xv: don't enable XVMC port on unsupported configs
This just makes it _really_ clear, what's supported. No other changes.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Eric Anholt <eric@anholt.net>
2010-01-07 10:26:01 -08:00
Daniel Vetter ce7ba18f57 Xv: consolidate xmvc passthrough handling
It's now all in I830PutImageTextured. Also kill some leftovers
from XVMC-on-overlay support and ums-XVMC-on-i915 support. Plus
a small comment as a reminder for where to add i915 xvmc support
back in.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Eric Anholt <eric@anholt.net>
2010-01-07 10:25:07 -08:00
Daniel Vetter 1ac7c94083 Xv: hide ugly semantics in i830_clip_video_helper
I'm still curious as to why fixed-point semantics are necessary
for this generic XV helper function that's been causing all this.
Can modern X really run on hw without floating-point support?

Anyway, the ugliness is now all nicely under the carpet (in
i830_clip_video_helper).

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Eric Anholt <eric@anholt.net>
2010-01-07 10:25:07 -08:00
Daniel Vetter 31f13fa8a0 Xv: move users of x1, x2, y1, y2 to PutImage
After this there are no other external users of these strange variables,
so we can nicely hide them somewhere in the next changeset.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Eric Anholt <eric@anholt.net>
2010-01-07 10:25:07 -08:00
Daniel Vetter ce6526b9b4 Xv: kill unnecessary parameters for hw PutImage functions
This is the first part of my small crusade to rip out x1, x2, y1, y2
from I830PutImage*. These variables have strange semantics (they
change from simple integers to fixed-point values somewhere in
the middle) and don't really seem to be what we actually need.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Eric Anholt <eric@anholt.net>
2010-01-07 10:25:07 -08:00
Daniel Vetter cf74caaa91 Xv: kill an unnecessary if
We always pass a non-null pointer for crtc_ret, no point to check
for this.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Eric Anholt <eric@anholt.net>
2010-01-07 10:25:07 -08:00
Daniel Vetter d8353c737b Xv: split up I830PutImage into textured and !textured case
This wasn't making much sense anymore, and further cleanups will
make this even more apparent. This change just makes two copies of
I830PutImage and kills the not-applicable if-clauses in both
versions.

There is one small functional change in here: The textured video
path doesn't munch around with adaptor_priv->videoStatus anymore,
which is only used by the overlay. This could prevent the overlay
from being switched off if someone would use textured video at the
same time.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Eric Anholt <eric@anholt.net>
2010-01-07 10:25:07 -08:00
Tobias Doerffel 8d6faf7dc5 Fix compiler warning in i830_copy_video_data() if XvMC is disabled
The variable "intel" is unused when building i830_video.c without XvMC
support which results in a compiler warning:

  i830_video.c: In function 'i830_copy_video_data':
  i830_video.c:1443: warning: unused variable `intel'

Trivial fix via #ifdef.
2009-12-10 14:07:30 -08:00
Daniel Vetter bd81734465 Xv: enable drmmode overlay
Now that libdrm 2.4.16 is released (and already required) we can
unconditionally enable this.

Please add something like this to the release-notes/NEWS file:

* Overlay support for kernel modesetting. This needs at least kernel
  v2.6.33 to work. A backport to 2.6.32 is available at:

  http://gitorious.org/daniel-s-linux-stuff/linux-kernel/commits/intel-kms-overlay-for-2.6.32

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2009-12-10 13:54:11 -08:00
Chris Wilson 37f631d669 Revert "uxa-glyphs: Enable TILING_X on glyph caches."
This reverts commit 3f11bbec42.

For unknown reasons, enabling tiling for the glyph cache is causing
glyph corruption both across suspend and resume and VT switching, on a
wide range of chipsets (reports include both i8xx and gm45)

This strongly suggests that we are handling tiling, or updates to tiled
buffers, incorrectly across i915_gem_idle(). However, until we can find
the root cause, we want to fix this regression before the next stable
release, so simply revert this patch. :(

Fixes:
  [Bug 25406] fonts garbled after resuming from suspend since 6729b508
  http://bugs.freedesktop.org/show_bug.cgi?id=25406

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-12-10 08:54:46 +00:00
Chris Wilson 093bb9ebe6 i965: Only use the affine kernels if both src and mask are affine
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-12-08 23:45:28 +00:00
Chris Wilson 0cf04ea4d7 i965: Set src_filter before testing.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-12-08 23:44:45 +00:00
Chris Wilson 417ad2712e Assert that we only call OUT_BATCH() inside a BATCH
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-12-08 23:43:57 +00:00
Chris Wilson 47416b1eea i965: Maximum number of vertices per composite is 24, not 18
Beware the potential buffer overflow.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-12-08 13:48:48 +00:00
Chris Wilson cd475bad23 batch: Ensure we send a MI_FLUSH in the block handler for TFP
This should restore the previous level of synchronisation between
textures and pixmaps, but *does not* guarantee that a texture will be
flushed before use. tfp should be fixed so that the ddx can submit the
batch if required to flush the pixmap.

A side-effect of this patch is to rename intel_batch_flush() to
intel_batch_submit() to reduce the confusion of executing a batch buffer
with that of emitting a MI_FLUSH.

Should fix the remaining rendering corruption involving tfp [inc compiz]:

  Bug 25431 [i915 bisected] piglit/texturing_tfp regressed
  http://bugs.freedesktop.org/show_bug.cgi?id=25431

  Bug 25481 Wrong cursor format and cursor blink rate with compiz enabled
  http://bugs.freedesktop.org/show_bug.cgi?id=25481

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-12-07 11:15:42 +00:00
Chris Wilson 415aab474e intel: And remember to flush the batch...
In commit 98e11210

  Remove flush parameter from intel_batch_flush()

Maxi spotted that I had broken screen updating. It appears in my haste
to eliminate the extra parameter I removed a call to intel_batch_flush()
when throttling, i.e. when pushing the updates to the screen before
idling.

Should fix:

  Bug 25409 [bisected] rendering corruption since a938673e
  https://bugs.freedesktop.org/show_bug.cgi?id=25409

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-12-04 09:08:43 +00:00
Chris Wilson a938673ee8 batch: Downgrade batch submission from a FatalError.
If we wedge the GPU then we will return -EIO for the current batch and
then attempt to reset the GPU. Meanwhile the X server detects the error,
throws a FatalError and to all intents and purposes appears to crash to
the user - whereas before it often just appeared to momentarily freeze.
Of course, on older hardware the server remains frozen until we can find
a way to reset those GPUs at runtime.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-12-02 20:54:54 +00:00
Chris Wilson 98e1121036 Remove flush parameter from intel_batch_flush()
There is only a single caller that wishes to forcibly append a flush
into the batch: intel_sync(). So move the logic there.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-12-02 20:49:54 +00:00
Chris Wilson 57336c26f1 Rename I830Sync() to intel_sync()
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-12-02 20:43:05 +00:00
Chris Wilson 370157f493 batch: Avoid flushing a NULL batch
During shutdown from a FatalError during batchbuffer submission, it is
possible for the batch_ptr to be NULL, so we must be careful not to
append a flush on this error path.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-12-02 20:38:51 +00:00