summaryrefslogtreecommitdiff
path: root/src/i830_video.c
AgeCommit message (Collapse)Author
2010-06-25Rename common infrastructure to the intel namespace.Chris Wilson
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-25i810: Move into a legacy directory.Chris Wilson
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-07i915: Fix typo from previous commit.Chris Wilson
A trivial change, I thought, having tested it before rebasing, unworthy even of a perfunctory compile test. How wrong I was. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-06-07i915: Remove screen size limit from video setup.Chris Wilson
The i915 textured video routine know how to handle drawing on an output larger than the 3D pipe, so allow them to do so. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-06-06Use libc instead of deprecated libc wrappers for malloc/calloc/free.Eric Anholt
2010-04-08Xv: fixup overlay stride confusionDaniel Vetter
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-08i965 Xv: fix chroma pitchDaniel Vetter
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-08XvMC: kill intel_xvmc_commandDaniel Vetter
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-08XvMC: init driver in one function callDaniel Vetter
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-08XvMC: move i915 specific stuff to common contextDaniel Vetter
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-08XvMC: unify PutImage handlingDaniel Vetter
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-03-04i830_video: Remove unused variable.Carl Worth
Certainly just a little leftover from the recent rewrites.
2010-03-04i915 XvMC: switch surfaces to drm_intel_boDaniel Vetter
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-04Xv: fixup XvMC on i915Daniel Vetter
I've accidentally broken i915 xvmc due to alignment constrains that break my assumption that Y-pitch == UV-pitch*2. Fix this up by consistenly using dstPitch2 for the Y-pitch. This also unifies the dst pitch computation slightly, now that the i915 xvmc special case is gone. Bugzilla: http://bugs.freedesktop.org/show_bug.cgi?id=25949 Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> (Minor edit to support compilation without INTEL_XVMC defined by Carl Worth <cworth@cworth.org>)
2010-03-04Xv: fixup YUV plane offset for xvmc caseDaniel Vetter
In my previous cleanup I've inadvertedly dropped the offset adjustment code for the xvmc passthrough case. Fix this up. Also reimplement that ugly hack I've accidently killed to keep i915 class xvmc a tad bit longer on life support. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Tested-by: xunx.fang@intel.com
2010-01-17intel: Use the compositing-aware colorkey filler instead of homebrew fail.Eric Anholt
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-07Xv: don't enable XVMC port on unsupported configsDaniel Vetter
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-07Xv: consolidate xmvc passthrough handlingDaniel Vetter
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-07Xv: hide ugly semantics in i830_clip_video_helperDaniel Vetter
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-07Xv: move users of x1, x2, y1, y2 to PutImageDaniel Vetter
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-07Xv: kill unnecessary parameters for hw PutImage functionsDaniel Vetter
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-07Xv: kill an unnecessary ifDaniel Vetter
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-07Xv: split up I830PutImage into textured and !textured caseDaniel Vetter
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>
2009-12-10Fix compiler warning in i830_copy_video_data() if XvMC is disabledTobias Doerffel
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-10Xv: enable drmmode overlayDaniel Vetter
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-11-30overlay: Fix build after 646b4a9483Chris Wilson
The compile cleanup was not without fault... Apparently I don't have XVMC enabled anymore and so missed that this variable is actually used. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-11-29Cleanup a few compiler warnings.Chris Wilson
Simple warnings for unused variables and C99-style declarations. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-10-15i965 XvMC cleanupZhenyu Wang
Remove bo pin for surface buffer access, and remove access attempt for possible unmapped framebuffer. Using xv buffer pointer to pass current xvmc surface bo handler, which is assigned to src image bo and handle that the same way as in Xv. Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com> [anholt: Fixed up for conflict against the XV rework. Not tested, because both mplayer and xine segfault with XVMC currently.] Signed-off-by: Eric Anholt <eric@anholt.net>
2009-10-15Xv overlay: fix planar YUV copy for right rotated crtcsDaniel Vetter
While copying and rotating the buffer, array access was out of bounds when rotated to the right (RR_Rotate_270). My buffer handling changes probably made this bug much more likely to actually result in a SIGSEGV. I've checked the logs and the bug exists since rotation has been supported, i.e. this looks like a candidate for cherry-picking for all supported releases. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Eric Anholt <eric@anholt.net>
2009-10-15Xv overlay: further cleanupsDaniel Vetter
Kill some unnecessary stuff. Small code changes, but no functional ones. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Eric Anholt <eric@anholt.net>
2009-10-15Xv: fixup the disabled drmmode overlay codeDaniel Vetter
This code didn't survive the global renaming of vars to saner names. Fix it up. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Eric Anholt <eric@anholt.net>
2009-10-15Xv overlay: remove some more dead stuff from ums overlay supportDaniel Vetter
Mostly unused definitions and variables, but also some strange ums debug code. Also kill some now obsolete comments. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Eric Anholt <eric@anholt.net>
2009-10-08Rename pScreen to screen.Eric Anholt
2009-10-08Rename pDraw to plain old drawable.Eric Anholt
2009-10-08Rename the xv pPriv to adaptor_priv to reflect whose private it is.Eric Anholt
2009-10-08Call pPixmaps plain old pixmaps.Eric Anholt
2009-10-08Rename the xf86 screen private from pScrn to scrn.Eric Anholt
2009-10-08Rename the screen private from I830Ptr pI830 to intel_screen_private *intel.Eric Anholt
This is the beginning of the campaign to remove some of the absurd use of Hungarian in the driver. Not that I don't like Hungarian, but I don't need to know that pI830 is a pPointer.
2009-10-06Move to kernel coding style.Eric Anholt
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-06Remove UMS support.Eric Anholt
At this point, the only remaining feature regressions should be the lack of overlay support (about to land), and the need to update the XVMC code to work in the presence of KMS. Acked-by: Keith Packard <keithp@keithp.com> (in principle) Acked-by: Carl Worth <cworth@cworth.org> (in principle)
2009-10-05Remove UMS overlay support.Eric Anholt
The replacement code is now landed, and the rest of UMS is about to disappear.
2009-10-05Implement drmmode overlayDaniel Vetter
This does not restore the overlay on EnterVT/disable it on LeaveVT. Does not look like this is necessary. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> [anholt: Hacked in avoiding the actual kernel calls with Signed-off-by: Eric Anholt <eric@anholt.net>
2009-10-05Xv: introduce an overlay halDaniel Vetter
This is the last preparatory step for overlay support with drmmode. Safe two (specially marked) function calls in the setup code, all hw accessing code goes now through these three new functions with the ums_overlay prefix. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Eric Anholt <eric@anholt.net>
2009-10-05Xv: rework overlay buffer managementDaniel Vetter
The basic idea is to only pin the buffer into the gtt when the overlay hw is actually using it. This results in a few changes: - Unify data copied/buffer handling with textured video. Now offsets are always buffer relative and we just use drm_bo_map to access a buffer. - Implement double buffering using two bo's. This is necessary because we can't pin the same buffer to the gtt and map it as normal memory. - Kill XV_DOUBLE_BUFFER. With the above changes, overlay video is always doubel buffered. There is still the XvMC passthrough case, which makes the code slightly ugly. Unfortunately we can't get at the bo behind this buffer. Changes since the last review-round: - Don't overallocate by a factor of 2. - Prevent possible use-after-free issue. Signed-off-by: Eric Anholt <eric@anholt.net>
2009-10-05Xv: create xvmc_passthrough helperDaniel Vetter
This way all thes strange special cases make much more sense. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Eric Anholt <eric@anholt.net>
2009-10-05Xv: scrap overlay offscreen pixmap supportDaniel Vetter
The code looks like it's been bitrotting since being copied over from the i810 driver. Furthermore painting rgb pixmaps with the overlay engine is in these days of modern compositing X an absolute no-go. And textured video doesn't support it neither, so its likely never ever used by applications. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Eric Anholt <eric@anholt.net>
2009-10-05Xv: small cleanups in I830PutImageDaniel Vetter
- scrap unused variable overlay - scrap an superflous if and attach the code to the preceeding else - tiny layout fix. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Eric Anholt <eric@anholt.net>
2009-10-05Xv I830PutImage splitup: extract i830_wait_for scanlineDaniel Vetter
Also scrap the unecessary variable sync in I830PutImage and the accompanying obfuscated logic. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Eric Anholt <eric@anholt.net>
2009-10-05Xv I830PutImage splitup: extract i830_copy_video_dataDaniel Vetter
Just moves the code and passes back allocation failures. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Eric Anholt <eric@anholt.net>
2009-10-05Xv I830PutImage splitup: extract i830_setup_video_bufferDaniel Vetter
Just move the code and pass back allocation failures. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Eric Anholt <eric@anholt.net>