Commit Graph

3036 Commits

Author SHA1 Message Date
Daniel Vetter 804263c10d render: tell the kernel explicitly when fences are needed
This slighlty improves xrender performance on fence reg starved
i8xx hw.

I've also changed a few function calls to the new names from the
compat ones while looking at the code.

The i915 textured video path is not converted because atm the xv
code does not use tiled surfaces.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2010-04-13 08:34:20 +02:00
Daniel Vetter a619a78312 i915 render: use tiling bits where possible
This is in preparation to explicit fence allocation with execbuf2.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2010-04-13 08:34:20 +02:00
Daniel Vetter 55cd36046e i830 render: use tiling bits where possible
This is in preparation to explicit fence allocation with execbuf2.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2010-04-13 08:34:20 +02:00
Eric Anholt 6d50553e8f Revert "uxa: Try using put_image when copying from a memory buffer."
This reverts commit 27195d7dba.
put_image often calls copy_area. Which calls put_image.  Exhausting of
the stack follows.
2010-04-12 13:46:24 -07:00
Chris Wilson 28024f6c5f Revert "uxa: Add fallback warnings for PutImage."
This reverts commit 299b0338d0.
A debugging patch, it was never intended to go into master
2010-04-12 13:44:01 +01:00
Chris Wilson 27195d7dba uxa: Try using put_image when copying from a memory buffer.
Often, for example in the fallback for ShmPutImage, we will attempt to
use uxa_copy_area() copying to a normal pixmap from a memory buffer.
This triggers a fallback, and maps the destination pixmap back into the
GTT. The accelerated put_image path will attempt to stream a blit to the
destination pixmap if it is currently active, avoiding the stall.
2010-04-10 18:50:26 +01:00
Chris Wilson 385563417d Review i830_pad_drawable_width()
We appear to have a confusion of stride in terms of pixels, pitch in
terms of bytes and the actual width of the surface.
i830_pad_drawable_width() appears to be operating aligning *pixels* to a
64 pixel boundary and has never used the chars-per-pixel causing
considerable confusion in its callers. Remove the parameter and ensure
that the callers are expecting a value in pixels returned, multiplying
by cpp where necessary to get the pitch.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-04-10 18:08:07 +01:00
Chris Wilson 299b0338d0 uxa: Add fallback warnings for PutImage. 2010-04-10 18:08:07 +01:00
Daniel Vetter 80f52482c7 XvMC: fix memory overflow
Caught by a malloc library assert.

Note to self: Don't just copy&paste codelines around :(

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Buzilla: https://bugs.freedesktop.org/show_bug.cgi?id=27540
Tested-by: Nick Bowler <nbowler@draconx.ca>
Tested-by: Calvin Walton <calvin.walton@gmail.com>
2010-04-08 22:35:10 +02:00
Daniel Vetter 3d7723526b Xv: fixup overlay stride confusion
For some reason I've made a mess out of the overlay stride constrains.
Fix it up.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Tested-by: Calvin Walton <calvin.walton@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=27453
2010-04-08 22:21:01 +02:00
Daniel Vetter bdf0ee509c i965 Xv: fix chroma pitch
In my recent fix for the chroma pitch for i915 xvmc I've forgotten about
i965 class hw. For videos with a non-even sized stride (measured in dwords)
the chroma pitch was internally incosistent and one dword off.

Fix this by using pitch2 for the chroma pitch in i965 textured video like
everywhere else.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=27417
Tested-by: Nick Bowler <nbowler@draconx.ca>
Tested-by: Sven Arvidsson <sa@whiz.se>
2010-04-08 17:21:18 +02:00
Daniel Vetter f6cb28e909 libXvMC: rip out debug stuff
Almost totatlly unused, but surely totally useless.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2010-04-08 11:22:24 +02:00
Daniel Vetter 676028ec0c libXvMC: unify CreateSurface
Simply store the desired bo size in intel_xvmc_context and initialize
it in the driver's create_context function.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2010-04-08 11:22:24 +02:00
Daniel Vetter 3f590a4577 libXvMC i915: kill unused context private fields
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2010-04-08 11:22:24 +02:00
Daniel Vetter 8a31dacb06 libXvMC: derive driver context from struct intel_xvmc_context
... by putting struct intel_xvmc_surface at the beginning. Also kill
the common context handling code and simply keep a pointer in the
surface private to the context.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2010-04-08 11:22:24 +02:00
Daniel Vetter 16e5edde4d libXvMC: unify DestroySurface
Surface bo's can be freed by the common code, then there's nothing
driver specific left.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2010-04-08 11:22:24 +02:00
Daniel Vetter 5f64122551 libXvMC: drop get_surface_status driver callback
It's unused. Also drop all related generic code that tries to do
clever stuff with this callback. These are all remnants from a
pre-gem world.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2010-04-08 11:22:23 +02:00
Daniel Vetter 6c44ce9e12 libXvMC i915: s/i915XvMCSurface/struct intel_xvmc_surface/
The private surface struct now adds nothing. Drop it.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2010-04-08 11:22:23 +02:00
Daniel Vetter 583ec1f2f7 libXvMC i915: rip out unneeded surface fields
All of these are also stored in the context. Also kill the context
reference counting. Doesn't serve a purpose besides occupying a
pointer to the context in the private surface struct.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2010-04-08 11:22:23 +02:00
Daniel Vetter c9aaaed829 libXvMC: unify PutSurface
Now that the drm bo is in the common structure, do the PutImage
handling in common code, too.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2010-04-08 11:22:23 +02:00
Daniel Vetter 4edff6c972 libXvMC: move drm_intel_bo to common intel_xvmc_surface
i965 lost the last field in it's private surface struct. Kill it
and any associated headers.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2010-04-08 11:22:23 +02:00
Daniel Vetter 9eeabf876d libXvMC: derive driver surfaces from struct intel_xvmc_surface
... by putting struct intel_xvmc_surface at the beginning. This
will allow to consolidate surface and bo handling.

Also kill some now dead code used to handle the common surface
structure.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2010-04-08 11:22:23 +02:00
Daniel Vetter a0058369bb XvMC: kill intel_xvmc_command
We only passed around and actually used the gem handle. Don't
need a struct for one field alone ...

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2010-04-08 11:22:23 +02:00
Daniel Vetter 79fe4caafd XvMC: dynamically allocate adaptor
And kill all the static structures. This way it's clearer what's
common and what's specific. And the code is shorter too.

Also clean up src/i830_hwmc.c - kill the nonstandard surface types
for i915 and the associated code.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2010-04-08 11:22:23 +02:00
Daniel Vetter 00b63ecb19 XvMC: directly set driver type in context creation
Instead of threading it through a global variable.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2010-04-08 11:22:23 +02:00
Daniel Vetter 411cdcb6fc XvMC: init driver in one function call
No point splitting this up. Gets rid of two #ifdef INTEL_XVMC blocks
in i830_video.c.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2010-04-08 11:22:22 +02:00
Daniel Vetter b666e3e29f XvMC: move i965 specific stuff to common context
Like for the i915. With this create_context is now also shared.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2010-04-08 11:22:22 +02:00
Daniel Vetter e0068b1e63 XvMC: move i915 specific stuff to common context
Doing the same with the i965 code will allow us to share the
create_context function.

src/i915_hwmc.h is now almost empty. Move the last #defines to
src/xvmv/i915_xvmc.c where they are actually used and delete the
file.

Also rename the ddx context struct to something sane.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2010-04-08 11:22:17 +02:00
Daniel Vetter 8cab7b84da XvMC: unify destroy context function
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2010-04-08 11:22:17 +02:00
Daniel Vetter 323464b8e2 XvMC: clean up i830_hwmc.c
- Drop unnecessary macros
- Denote i965 specific stuff

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2010-04-08 11:22:17 +02:00
Daniel Vetter cfa907adf8 XvMC: unify surface functions
Like for the subpicture stuff, share the "do-nothing" functions ...
And fix function name spelling, too.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2010-04-08 11:22:17 +02:00
Daniel Vetter 036cd4bb82 i965 XvMC: don't create any surface state in the ddx
Like for i915. Also drop that now totally superflous limit on the
available surfaces.

Move the surface struct into the userspace library header now that
the ddx doesn't use it anymore.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2010-04-08 11:22:17 +02:00
Daniel Vetter 69218cc1b5 XvMC: unify subpicture functions
The XvMC driver api in the server is insane. Even for optional stuff
like subpicture support it doesn't check for NULL-pointers. So we
have to retain some dummy functions.

Wonder how many copies of these things exist on fdo ...

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2010-04-08 11:22:17 +02:00
Daniel Vetter 5d104e9c5c XvMC: unify PutImage handling
Both xvmc are handing in the bo in the exact same way. So move the code
to src/i830_video.c and kill this great oeuvre of spaghetti-code.

The xvmc driver ini and fini also lost their last use, kill them, too.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2010-04-08 11:22:16 +02:00
Daniel Vetter ebc0ffba79 XvMC: merge *_hwmc.c into i830_hwmc.c
After unifying i915 and i965, not much will be left of these files.
Therefore merge them to make the following changes easier.

This creates some warnings about some redefined macros, but when this
is all cleaned up they'll all be gone.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2010-04-08 11:22:16 +02:00
Daniel Vetter 8199f8f191 i915 XvMC: kill more subpict support remnants
This things just won't die!

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2010-04-08 11:21:08 +02:00
Daniel Vetter 29ba8a84f7 XvMC: everyone's using execbuffer!
XvMC was switched over from batchbuffers a few years ago ...

Signed-off-by: Daniel Vetter <daniel@fliege.ffwll.ch>
2010-04-08 11:13:44 +02:00
Carl Worth 440b4d207b Increase version to 2.11.0
In preparation for release.
2010-03-29 11:23:03 -07:00
Carl Worth 1119c45238 NEWS: Add release notes for the 2.11.0 release.
Hurrah! We made it.
2010-03-29 11:23:03 -07:00
Jesse Barnes df3b268479 DRI2: release our private front buffer ref when buffer swapping
Pauli pointed out that we take a ref on the front buffer when exchanging
but forget to release it.  The ref is necessary since the set functions
will drop refs as necessary, but once we set the front buffer to point
at the back pixmap, we ned to release our private ref again, or we'll
leak buffers.

Reported-by: Pauli Nieminen <suokkos@gmail.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-03-26 10:46:43 -07:00
Gaetan Nadon 362a49e71f uxa make: remove unused XORG_INCS and DIX_CFLAGS variables
Most likely copied from xserver makefile.

Acked-by: Dan Nicholson <dbn.lists@gmail.com>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2010-03-25 15:49:14 -04:00
Chris Wilson 0d1ac4da52 uxa: Perform the xrgb -> argb conversion not inplace
After reports of segmentation faults caused by
d6b7f96fde and vmware, the most obvious
cause would be illegally writing to the src data when performing the alpha
fill inline. So force the image upload to go via a fresh buffer whenever
we need to modify the incoming data.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reported-and-tested-by: Jeff Chua <jeff.chua.linux@gmail.com>
2010-03-25 13:33:55 +00:00
Chris Wilson 0c47195ca8 i830: Clip solid fills to surface.
There is a reasonable surfeit of evidence to support this error,
for instance: http://bugs.freedesktop.org/attachment.cgi?id=34417

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-03-24 17:37:39 +00:00
Chris Wilson 5537079c29 uxa: After filling the alpha channel xrgb src is compatible with argb dst.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-03-24 16:42:05 +00:00
Chris Wilson 90a971c607 uxa: Only reduce a composite to a BLT if it is wholly contained
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-03-24 16:42:05 +00:00
Chris Wilson 2eec53d0b9 uxa: Default to using TILING_X for pixmaps.
On memory constrained hardware, tiling is vital for good performance as
it minimizes cache misses.  The downside is that for older hardware
(which often suffers from the lack of bandwidth) requires the use of
fences for many operations, which are in short supply and so may cause
shorter batchbuffers. However our batch buffers are typically short and
so this is unlikely to be a concern and not affect the performance wins.

A quick bit of testing suggests the effect is inconclusive on
firefox/i945:
                  linear            tiled
  xcb             205.470           206.219
  xcb-render-0.0  404.704           388.413
  xlib            166.410           170.805

A secondary effect of the patch is to workaround a G31 specific hang
when attempting to use linear 2048x2048 surfaces. Bonus!

Fixes:
  Bug 25375 - Performance issue using texture from pixmap (tfp) glx extension on 945
  http://bugs.freedesktop.org/show_bug.cgi?id=25375

  Bug 27100 - GPU Hung copying a 2048x1152 pixmap
  http://bugs.freedesktop.org/show_bug.cgi?id=27100

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Tested-by: John <jvinla@gmail.com>
2010-03-24 16:37:41 +00:00
Carl Worth 9c037f61a4 Update version to 2.10.903
For today's snapshot.
2010-03-22 15:23:04 -07:00
Carl Worth 11142cffe4 NEWS: Add notes for 2.10.903
For today's snapshot.
2010-03-22 15:22:28 -07:00
Carl Worth f206816154 man: Update list of available 'sclaing mode' property values.
Include the names from the current kernel driver along with accurate
descriptions of each. Indicate how to use the values with:

	xrandr --output output --set property value

and point the user to "xrandr --prop" for an accurate list of
currently available values.

Closes bug:

	xf86-video-intel manpage needs update for KMS xrandr properties
	http://bugs.freedesktop.org/show_bug.cgi?id=25606
2010-03-22 14:16:25 -07:00
Matthias Hopf d1dfab6b16 Clear drmmode_output->mode_output in drmmode_output_destroy(). 2010-03-22 11:48:44 -07:00