summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2010-03-22Clear drmmode_output->mode_output in drmmode_output_destroy().Matthias Hopf
2010-03-22Initialize flip_count before using itLi Peng
Otherwise it would be a random value and drmmode_page_flip_handler() won't have a chance to call I830DRI2FlipEventHandler() and indicate a full page flip is complete. Signed-off-by: Li Peng <peng.li@intel.com>
2010-03-18intel: free bus id in error path after printing it out.Dave Airlie
the error message prints out a freed string, spotted during code reappropriation to radeon driver. Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-03-17i915: Correct preamble for emit_compositeChris Wilson
Fixes: http://bugs.freedesktop.org/show_bug.cgi?id=27123 Fatal server error: i915_emit_composite_setup: ADVANCE_BATCH: under-used allocation 100/104 Introduced with commit d6b7f96fde1add92fd11f5a75869ae6fc688bf77. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-03-16Fill alpha on xrgb images.Chris Wilson
Do not try to fixup the alpha in the ff/shaders as this has the side-effect of overriding the alpha value of the border color, causing images to be padded with black rather than transparent. This can generate large and obnoxious visual artefacts. Fixes: Bug 17933 - x8r8g8b8 doesn't sample alpha=0 outside surface bounds http://bugs.freedesktop.org/show_bug.cgi?id=17933 and many related cairo test suite failures. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-03-16i830: Remove coord-adjust for nearest centre-sampling.Chris Wilson
Fixes a number of cairo test suite failures. Also affects: Bug 16917 - Blur on y-axis also when only x-axis is scaled bilinear http://bugs.freedesktop.org/show_bug.cgi?id=16917 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-03-08i915 XvMC: fixup colorsDaniel Vetter
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-08DRI2: make WaitMSC error handling more consistent with ScheduleSwapJesse Barnes
Just make it mirror ScheduleSwap: complete the wait on any error condition so as not to crash the client if the kernel is misbehaving. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-03-08DRI2: truncate OML values to 32 bitsJesse Barnes
We can only handle 32 bit values unless we totally virtualize the count, since the kernel only handles 32 bits itself. Rather than adding all that overhead, just tolerate the occasional missed event everytime the counter runs over. Reported-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-03-08DRI2: more WaitMSC fixesJesse Barnes
A couple more niggles: make sure we return a target_msc that at least matches the current count; this is a little more friendly to clients that missed an event. Also check for >= when calculating the remainder so we'll catch the *next* vblank event when the calculation is satisfied, rather than the current one as might happen at times. Reported-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-03-08DRI2: fixup stray curly braceJesse Barnes
Got left in the wrong column after the last cleanup. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-03-08Put back the pitch alignment for new framebuffers.Eric Anholt
I confused a dead assignment with dead code, because one of the args to the function was an outvalue. Fixes corruption under compiz. Bug #26814.
2010-03-08DRI2: fixup ScheduleWaitMSC similarly to ScheduleSwapJesse Barnes
My merge of Mario's patch for this was botched. Fix it up so that OML waits work correctly, and remove a bogus warning from ScheduleSwap. Reported-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-03-06Fix build against xserver 1.6 branch.Robert Hooker
Signed-off-by: Robert Hooker <sarvatt@ubuntu.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-03-05DRI2: handle target_msc, divisor and remainder properly in DRI2ScheduleSwapMario Kleiner
The current code in I830DRI2ScheduleSwap() only schedules the correct vblank events for the case divisor == 0, i.e., the simple glXSwapBuffers() case. In a glXSwapBuffersMscOML() request, divisor can be > 0, which would go wrong. This modified code should handle target_msc, divisor, remainder and the different cases defined in the OML_sync_control extension correctly for the divisor > 0 case. It also tries to make sure that the effective framecount of swap satisfies all constraints, taking the 1 frame delay in pageflipping mode and possible delays in blitting/exchange mode due to DRM_VBLANK_NEXTONMISS into account. The swap_interval logic in the X-Servers DRI2SwapBuffers() call expects the returned swap_target from the DDX to be reasonably accurate, otherwise implementation of swap_interval for the glXSwapBuffers() as defined in the SGI_swap_interval extension may become unreliable. For non-pageflipped mode, the returned swap_target is always correct due to the adjustments done by drmWaitVBlank(), as DRM_VBLANK_NEXTONMISS is set. In pageflipped mode, DRM_VBLANK_NEXTONMISS can't be used without severe impact on performance, so the code in I830DRI2ScheduleSwap() must make manual adjustments to the returned vbl.reply.sequence number. This patch adds the needed adjustments. Signed-off-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de>
2010-03-05DRI2: make MSC waits handle specific target_mscs and divisor/remaindersMario Kleiner
Previous code only handled divisor == 0 case correctly. This should honor a given target_msc for the divisor > 0 case and handle the (msc % divisor) == remainder constraint correctly. Signed-off-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de>
2010-03-05DRI2: handle offscreen drawables better at swap timeJesse Barnes
If a drawable isn't visible due to DPMS or redirection, we'll just blit it rather than schedule a swap event. However, we didn't reset the target_msc, so the swap target we receive from the server could get out of sync with the vblank count of the drawable's display. So at DPMS on time, the swap target would be the last good vblank count plus some large number (since the swaps won't have been throttled). Solve this by zeroing out the swap target like we should when we fall back to a blit. Also make the kernel error cases more friendly by making them fall back to blits too. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-03-05Rate limit batch buffer error.Chris Wilson
Once we hit this error it's unlikely that we're coming back - so don't flood the logs with redundant information. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-03-04i915 XvMC: kill dead codeDaniel Vetter
This kills one wip remnant from my i830_memory cleanup and the last remainings of the subpicture support. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2010-03-04Remove remaining fbOffset setting.Eric Anholt
In the long long ago, fbOffset was used for DGA. The server now has only one reference to fbOffset, a leftover setting of it in fbdevhw. We can safely ignore it now, which is good since we weren't updating it in other places where the front buffer offset could change.
2010-03-04Remove a piece of fbOffset cruft from non-DRM support.Eric Anholt
2010-03-04Remove i830_allocate_2d_memory() now that it only called one function.Eric Anholt
2010-03-04Init CRTC cursors with CRTC setup instead of i830_memory.Eric Anholt
2010-03-04Remove intel_sync() at teardown time.Eric Anholt
The kernel's still running after we're gone. This didn't matter.
2010-03-04Remove 3D state clobber on EnterVT, and always clobber at batch start.Eric Anholt
We know that it's clobbered at each batchbuffer, anyway. And even if this server isn't running DRI2, it can still be clobbered at batch start in the KMS world.
2010-03-04Remove pre-2.6.29 error message handling since we require KMS.Eric Anholt
2010-03-04Move batch and 965 render state setup/teardown to screen init/close.Eric Anholt
Whether we're VT switched or not shouldn't impact rendering.
2010-03-04i915_hwmc: Remove dead code.Carl Worth
Daniel recently identified this code as unneeded (with an #if 0). Here we take the next step and remove it entirely.
2010-03-04i830_video: Remove unused variable.Carl Worth
Certainly just a little leftover from the recent rewrites.
2010-03-04Xv: fixup relocation in i965_video.cDaniel Vetter
The previous code made no sense, (multiplying an offset by 4 is meaningless). It could have onlt worked with the offset being fortuitously 0. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Carl Worth <cworth@cworth.org>
2010-03-04i830_memory: rip out the remainings of the old allocatorDaniel Vetter
Yeah! Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Carl Worth <cworth@cworth.org>
2010-03-04XvMC: kill the pinned batchbuffer in the ddx codeDaniel Vetter
It's been unused for quite a while. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Carl Worth <cworth@cworth.org>
2010-03-04i915 XvMC: kill pinned surface buffer in the ddx codeDaniel Vetter
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-04i915 XvMC: kill pinned per-context buffers in the ddx codeDaniel Vetter
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-04i915 XvMC: don't stall the cpu anymoreDaniel Vetter
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-04i915 XvMC: drop superflous MI_FLUSHDaniel Vetter
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-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-04i915 XvMC: switch corrdata buffer to drm_intel_boDaniel Vetter
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-04i915 XvMC: switch msb to drm_intel_boDaniel Vetter
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-04i915 XvMC: switch sis to drm_intel_boDaniel Vetter
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-04i915 XvMC: switch load_indirect_render_emit to batchbuffer macrosDaniel Vetter
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-04i915 XvMC: switch psc to drm_intel_boDaniel Vetter
Like with the sampler state buffer. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Carl Worth <cworth@cworth.org>
2010-03-04i915 XvMC: switch psp to drm_intel_boDaniel Vetter
Like with the sampler state buffer. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Carl Worth <cworth@cworth.org>
2010-03-04i915 XvMC: switch ssb to drm_intel_boDaniel Vetter
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-04i915 XvMC: kill last_flip and last_renderDaniel Vetter
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-04i915 XvMC: switch one_time_state_emit to batchbuffer macrosDaniel Vetter
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-04XvMC: kill dead code in i915_xvmc.cDaniel Vetter
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-04XvMC: kill i830_memory in 965 class xvmcDaniel Vetter
Yes, this breaks binary compat of the struct passed around between X ddx and the client libXvMC. But we always ship both, so they should not get out of sync. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Carl Worth <cworth@cworth.org>
2010-03-04i830_memory: hide as much of the old memory allocator as possibleDaniel Vetter
The only user left of this stuff is the xvmc support. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Eric Anholt <eric@anholt.net>
2010-03-04i830_memory: switch frontbuffer to drm_intel_boDaniel Vetter
Yet another user of i830_memory gone for good. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Eric Anholt <eric@anholt.net>