Commit Graph

168 Commits

Author SHA1 Message Date
Chris Wilson 5c663ce844 Rename common infrastructure to the intel namespace.
After splitting out the i810 driver into its own legacy directory, we
can identify the common routines not as i830 but as intel. This
clarifies the code which *is* i830 specific.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-06-25 13:18:01 +01:00
Chris Wilson 797d173a9a i810: Move into a legacy directory.
The driver is still built but is no longer under active development so
move it and supporting files to a new directory.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-06-25 13:18:01 +01:00
Chris Wilson 6ea8ce640f xvmc: Build fix with -pedantic
Fixes:

  Bug 27352 - RPMLINT error causes build breakage
  https://bugs.freedesktop.org/show_bug.cgi?id=27352

Reported-by: Johannes Obermayr <johannesobermayr@gmx.de>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-05-11 19:39:01 +01:00
Daniel Vetter 72fd7d191c Fix "make dist"
This is some fallout from my xvmc cleanup.

Original-Patch-by: Rico Tzschichholz <ricotz@t-online.de>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2010-04-19 21:56:57 +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 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 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 318aa9ed79 i915 XvMC: fixup colors
My cleanup accidently created a inconsistency in the YUV plane ordering.
I think we can safely assume that I'm colorblind ;)

As Carl Worth rightly pointed out, this change deserves a more elaborate
explanation:

For Xv planar formats, the three planes are stored consecutively in
memory, ordered Y U V. Now for some totally odd reason (= none at all),
i915 xvmc stored it in Y V U order. Right after the release of 2.10, with
commit "Xv: consolidate xmvc passthrough handling" I've inadvertently
broken xvmc support (which started this whole odyssey into xvmc). When
fixing stuff up, I neglected this special plane ordering and simply
assumed it to be the same as Xv and dropped that special case for i915 in
src/i830_video.c. This patch completes the change to standard YUV plane
ordering by making the corresponding change in src/xvmc/i915_xvmc.c.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2010-03-08 16:38:46 -08:00
Daniel Vetter d5a20c81ab i915 XvMC: kill pinned surface buffer in the ddx code
Like with the per context stuff, also drop the now artificial limit
on surfaces. Again, with that gone, a lot of code can be deleted.

Reviewed-by: Carl Worth <cworth@cworth.org>
2010-03-04 09:38:38 -08:00
Daniel Vetter e6eb257ad3 i915 XvMC: kill pinned per-context buffers in the ddx code
There's now not a reason anymore to limit the number of active contexts.
So kill this accounting, too.

With that all gone, per-context state in the ddx is nil, so rip out
all associated code.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Carl Worth <cworth@cworth.org>
2010-03-04 09:38:38 -08:00
Daniel Vetter 47ae1181f6 i915 XvMC: don't stall the cpu anymore
Proper bo management ensures that the cpu doesn't step on buffers
used by the gpu. Drop the now unnecessary synchronization.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Carl Worth <cworth@cworth.org>
2010-03-04 09:38:38 -08:00
Daniel Vetter 9bba123c5f i915 XvMC: drop superflous MI_FLUSH
Cache coherency is now fully under the control of gem.

For lack of hw documentation, I had to find out the correct cache
placements by trial and error:

Backward and forward surfaces: I915_GEM_DOMAIN_RENDER
Correlation data:              I915_GEM_DOMAIN_SAMPLER

Changing any of them leads to visual corruptions, so I think these
are the correct ones.

Reviewed-by: Carl Worth <cworth@cworth.org>
2010-03-04 09:38:38 -08:00
Daniel Vetter b11623f20e i915 XvMC: switch surfaces to drm_intel_bo
Now the last user of the fixed buffers provided by the ddx is gone!

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Carl Worth <cworth@cworth.org>
2010-03-04 09:38:38 -08:00
Daniel Vetter b7f79bfd40 i915 XvMC: switch corrdata buffer to drm_intel_bo
It works!

v2: Correlation data needs to be in the render cache!

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Carl Worth <cworth@cworth.org>
2010-03-04 09:38:37 -08:00
Daniel Vetter 62846d88d4 i915 XvMC: switch msb to drm_intel_bo
Like for the static indirect state buffer.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Carl Worth <cworth@cworth.org>
2010-03-04 09:38:37 -08:00
Daniel Vetter d27955c697 i915 XvMC: switch sis to drm_intel_bo
I've decided to allocate a new buffer for every render command, to
prevent stalling for the gpu. libdrm bo reuse should take care of
not wasting memory in case the buffer is not busy.

Also always emit the full state, it's not worth it to complicate
the code over a few stores to wc memory.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Carl Worth <cworth@cworth.org>
2010-03-04 09:38:37 -08:00
Daniel Vetter 3203c66fbf i915 XvMC: switch load_indirect_render_emit to batchbuffer macros
Like with one_time_state_emit, this preps for relocatable bo's.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Carl Worth <cworth@cworth.org>
2010-03-04 09:38:37 -08:00
Daniel Vetter d30decae6a i915 XvMC: switch psc to drm_intel_bo
Like with the sampler state buffer.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Carl Worth <cworth@cworth.org>
2010-03-04 09:38:37 -08:00
Daniel Vetter b543c355f4 i915 XvMC: switch psp to drm_intel_bo
Like with the sampler state buffer.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Carl Worth <cworth@cworth.org>
2010-03-04 09:38:37 -08:00
Daniel Vetter 18c364084c i915 XvMC: switch ssb to drm_intel_bo
This also starts to kill the last remnants of the support for
physical addresses for the indirect state buffers. With gem this
would need kernel support (in the form of a new reloc type in
execbuf2).

This does not change the ABI between ddx and client libIntelXvMC.
I've decided to do this in one swoop when all the buffer rework is
done.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Carl Worth <cworth@cworth.org>
2010-03-04 09:38:37 -08:00
Daniel Vetter fc9e44f019 i915 XvMC: kill last_flip and last_render
Seems to be a remnant from i810 XvMC support. last_flip is always 0,
so serves no real purpose anymore. Kill it and the associated code.

With last_flip gone, last_render also lost its purpose. Kill it, too.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Carl Worth <cworth@cworth.org>
2010-03-04 09:38:37 -08:00
Daniel Vetter 04aa38a639 i915 XvMC: switch one_time_state_emit to batchbuffer macros
This is in preparation for real relocatable drm_bo's instead
of memory at a fixed address. By switching to the batchbuffer
macros (like i965 xvmc) we can use the nice OUT_RELOC macro.

Also align the code more with coding-style elsewhere, i.e. bitops
instead of bitfield structures. The bitfield structures are
quite a mess to work with the batchbuffer macros, so they were
getting in the way, anyway.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Carl Worth <cworth@cworth.org>
2010-03-04 09:38:37 -08:00
Daniel Vetter 24d787335a XvMC: kill dead code in i915_xvmc.c
WIP code that hasn't changed for over two years is unlikely to
suddenly start progressing. Drop it. After all, git can easily
resurect it in cases it's needed.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Carl Worth <cworth@cworth.org>
2010-03-04 09:38:37 -08:00
Daniel Vetter 5018fd3097 libIntelXvMC: kill ums leftovers
On i965 class hw, kernel_exec_fencing was 1 always, anyway. And on
i945, this patch kills a memory leak (dunno how, but it does).

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2010-03-04 09:38:17 -08:00
Eric Anholt c2c670ef18 Remove more DRI1 dead code. 2010-02-20 12:57:21 -05:00
Daniel Kahn Gillmor eda2bb2678 Makefile.am: Add missing .g4i to be included in the tar file.
Apparently Debian packages were having to manually add these files
back in. Distribute them in the first place like we meant to.
2009-11-20 01:53:13 +01:00
Gaetan Nadon bb994ce018 .gitignore: use common defaults with custom section # 24239
Using common defaults will reduce errors and maintenance.
Only the very small or inexistent custom section need periodic maintenance
when the structure of the component changes. Do not edit defaults.
2009-11-14 09:23:55 -05:00
Rémi Cardona 3c0a43b24c configure: use CWARNFLAGS from xorg-macros.m4
Signed-off-by: Rémi Cardona <remi@gentoo.org>
Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-11-05 16:58:35 +01:00
Thomas Arnhold 751e0a3e45 Fix 64-bit compiler warnings in intel_xvmc_dump_render().
Bug #24396.
2009-10-19 11:35:30 -07:00
Eric Anholt 3e8f2eae3a XVMC: Use XCB DRI2 instead of cargo-culting our own copy of Xlib stuff. (v2)
v2: Incorporate comments from Jamey on device name handling and extension
detection.
2009-10-19 10:36:30 -07:00
Eric Anholt 8ae0e44e42 Move to kernel coding style.
We've talked about doing this since the start of the project, putting it off
until "some convenient time".  Just after removing a third of the driver seems
like a convenient time, when backporting's probably not happening much anyway.
2009-10-06 17:10:31 -07:00
Zou Nan hai 7c48c21b22 set correct value for indirect access check bound 2009-08-27 09:47:12 +08:00
Zou Nan hai f4e4c1a854 It seems that indirect data upper bound check in STATE_BASE_ADDRESS
is not acting like what bspec told on 965gm.
  G45+ follow bspec, but we have to set it to a large value for 965gm.
2009-08-05 15:00:37 +08:00
Xiang, Haihao 9a45ace207 XvMC: enable XvMC/XvMC-VLD on IGDNG 2009-07-24 10:48:00 +08:00
Xiang, Haihao 043b4a866a add compiled shader programs for XvMC/XvMC-VLD on IGDNG 2009-07-24 10:47:39 +08:00
Zou Nan hai bfeeac6de0 i915 xvmc, fix fd.o bug #22103 2009-06-23 11:31:37 +08:00
Julien Cristau 6d062e9e9f Fix xvmc build
If we don't find xext.pc, disable xvmc instead of failing configure
Also add dependencies on xfixes and dri2proto (src/xvmc/dri2.h includes
<X11/extensions/Xfixes.h> and <X11/extensions/dri2tokens.h>).
2009-06-11 17:51:38 +02:00