summaryrefslogtreecommitdiff
path: root/src/intel_video.c
AgeCommit message (Collapse)Author
2012-11-30Convert generation counter to octalChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-05uxa: Flush batch immediately after queuing a WAIT_FOR_EVENTChris Wilson
We still encounter hangs with kernel-3.5 with the culprit being a wait on a disabled pipe. As we thoroughly check before that the pipe is still disabled and flush before a modeset, the only possibility that remains is that DPMS is disabling the pipe before we submit. Close that race by always submitting the batch immediately after a WAIT_FOR_EVENT. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-12intel: fix video xvPipe range checkDave Airlie
Pointed out by Russell King on irc. Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-07-15uxa: Remove Shadow hackChris Wilson
This was an incomplete hack so deprecate in favour of Shadow-on-Steriods, SNA. References: https://bugs.freedesktop.org/show_bug.cgi?id=47324 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-06-19Initialise adaptors to 0 in case xf86XVListGenericAdaptors does notChris Wilson
Reported-by: Zdenek Kabelac <zkabelac@redhat.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-06-13Lots of trivial semantic fixesChris Wilson
Reported-by: Zdenek Kabelac <zkabelac@redhat.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-06-02uxa: Fix reallocation of XVAdaptors arrayChris Wilson
Prevent the leak and remove some unsightly code in the process. Reported-by: Zdenek Kabelac <zkabelac@redhat.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-23intel: convert to new screen conversion APIsDave Airlie
The compat header takes care of the old server vs new server. this commit was autogenerated from util/modular/x-driver-screen-scrn-conv.sh Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-04-17Don't issue a scanline wait while VT switchedChris Wilson
Be paranoid and check that we own the VT before emitting a scanline wait. If we attempt to wait on a fb/pipe that we do not own, we may issue an illegal command and cause a lockup. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-08Removed deprecated xf86PciInfo.h includesChris Wilson
The driver should and does provide its own PCI-IDs. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-17uxa: Explicitly check for libdrm_intel in configureChris Wilson
And remove the excess dependencies from the common files. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-14Remove a couple of trivial compile warnings for unused variablesChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-13video: Stop advertising unsupported Xv attributesChris Wilson
We have yet to implement a yuv-shader that applies contrast/brightness/saturation and so should not advertise such features, potentially allowing the client to fallback and perform the adjustments itself. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-29video: check that the pixmap exists before useChris Wilson
Now, the pixmap being used is meant to the Screen pixmap and by rights that has to exists in a GPU buffer! Evidence contrary to the above exists and so we had better check that we have a bo before using... Reported-by: Toralf Förster <toralf.foerster@gmx.de> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=40439 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-05-10video: Flush the batch on the next blockhandler after queuingChris Wilson
In order to avoid video lag and jerky playback we need to ensure that any queued video is flushed before we go to sleep. Fixes regression from 6f104189bb. Reported-and-tested-by: Edward Sheldrake <ejsheldrake@gmail.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=37068 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-04-07Revert "i965: Convert to relative relocations for state"Chris Wilson
This reverts commit d2106384be6f9df498392127c3ff64d0a2b17457. Breaks compiz (but not mutter/gnome-shell) on gen6. Not sure if this is not seem deep interaction issue with multiple clients sharing the GPU or just with compiz, but for now we have to revert and suffer the inane performance hit. It looks suspiciously like another deferred damage issue... Bugzilla: 51a27e88b073cff229fff4362cb6ac22835c4044 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-04-04i965: Convert to relative relocations for stateChris Wilson
References: https://bugs.freedesktop.org/show_bug.cgi?id=35733 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-04-04MI_LOAD_SCAN_LINES_INCL are inclusive and range [0, display height-1]Chris Wilson
We have seen GPU hangs with: batchbuffer at 0x0f9b4000: 0x0f9b4000: 0x09000000: MI_LOAD_SCAN_LINES_INCL 0x0f9b4004: 0x00000300: dword 1 0x0f9b4008: 0x09000000: MI_LOAD_SCAN_LINES_INCL 0x0f9b400c: 0x00000300: dword 1 0x0f9b4010: 0x01820000: MI_WAIT_FOR_EVENT 0x0f9b4014: HEAD 0x02000006: MI_FLUSH on a 1366x768 display. That according to the specs an invalid command for the pipe. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=35576 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-01-21Fix an error in 4c4ad555564a80311df1a4b762eb1e119c6d95fb.Xiang, Haihao
See the original patch at https://bugs.freedesktop.org/show_bug.cgi?id=24767 Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
2011-01-19Correct offset of planes within clipped windowXiang, Haihao
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=24767 Reported-and-tested-by: Sitsofe Wheeler <sitsofe@yahoo.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-01-03xv: Fix interlace computationAdam Jackson
scrn->currentMode is a hack for xf86vidmode and in general is wrong for RANDRful drivers. Use the mode on the associated CRTC instead. Signed-off-by: Adam Jackson <ajax@redhat.com> [ickle: crtc->mode is a ModeRec] Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-11-01Xv: don't call intel_wait_for_scanline on SandybridgeXiang, Haihao
MI_LOAD_SCAN_LINE_INCL command is not available on sandybridge. Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
2010-11-01Xv: enable TextureAdaptor for SandybridgeXiang, Haihao
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
2010-10-07Include a chipset generation number to clarify device specific paths.Chris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-10-01video: Disable TextureAdaptor for SandybridgeChris Wilson
The acceleration code does not yet exist, so we try to use gen4 shaders which hangs the chip and makes everybody upset. Disable it until such a time as support is written for Sandybridge XVideo. Reported-by: Matthias Hopf <mhopf@suse.de> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=30500 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-09-21Allow interlaced modes.Krzysztof Halasa
This may not the best method, but it should be a good base on which to build... Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-09-08Enable a shadow buffer and disable GPU acceleration.Chris Wilson
An attempt to workaround the incoherency in gen2 chipsets, we avoid using dynamic reallocation as much as possible. The first step is to disable allocation of pixmaps using GEM and simply create them in system memory without a backing buffer object. This forces all rendering to use S/W fallbacks. The second step is to allocate a shadow front buffer and assign that to the Screen pixmap. This ensure that the front buffer remains in the GTT and pinned for scanout. The shadow buffer will be rendered to in the normal fashion via the Screen pixmap, and be marked dirty. In the block handler, the dirty shadow buffer is then blitted (using the GPU) over the front buffer. This should completely avoid having to move pages around in the GTT and avoid incurring the wrath of those early chipsets. Secondly, performance should be reasonable as we avoid the ping-pong caused by the small aperture and weak GPU forcing software fallbacks. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-08-22Use ALIGN macro instead of open coding it.Matt Turner
Signed-off-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-08-01Remove the final references to the drmmode prefixChris Wilson
In particular fix the compile regression for intel_do_pageflip(). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-08-01Rename drmmode_display to intel_displayChris Wilson
And fixup all the drmmode_* functions to have an intel prefix and categorise those into intel_mode, intel_crtc, intel_output and intel_property so that the functions are a little more self-descriptive and, more importantly, are consistent. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-07-26video: kill do { ... } while (ret != -EINTR) loopsDaniel Vetter
Chris Wilson likes to sprinkle these all over, but in this case it's just misleading. libdrm already does this for us. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2010-07-26video: kernel overlay needs triple bufferingDaniel Vetter
The kernel overlay code does asynchronous overlay flips. So keep onto two old buffers, for otherwise the rendering of the next frame might overwrite the contents of the currently still displaying one. With ~25fps videos and ~50 Hz screens that's rather unlikely, still, fix it. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2010-07-16video: Free the buffers immediately after turning off.Chris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-07-16video: Reuse the old buffers.Chris Wilson
After passing the new buffer to the kernel, the old buffer is unpinned and becomes available for re-use. So keep hold of the old buffer and swap after a PutImage. This greatly reduces the amount of CPU time consumed by the kernel on behalf of the video overlay -- by only allocating two buffers for an entire sequence, we avoid clflushing and page allocation on every frame. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-07-12video: Apply overlay stride errata for i830 and i845Chris Wilson
Due to an erratum on these chipsets, the overlay stride must be a multiple of 256 bytes. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-07-12video: Copy DummyEncoding into each adapter.Chris Wilson
As we use the static DummyEncoding and may attempt to modify it for each adaptor (on each device), we should use copies instead. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-07-09video: forgotten amendment to previous commit.Chris Wilson
An extra sanity check to skip the wait if all clipped... Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-07-09video: apply the crtc box checks from dri.Chris Wilson
The dri code is much more careful in ensuring that the scan lines that is waits for are valid. Copy this code to video, with a bit of work this can be refactored, and perhaps even teach dri how to handle rotated front buffers. References: Bug 28964 - [i965gm] GPU infinite MI_WAIT_FOR_EVENT while watching video in Totem https://bugs.freedesktop.org/show_bug.cgi?id=28964 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
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>