summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2011-05-29intel: Beware the unsigned promotion when checking for batch overflowsChris Wilson
Reported-by: Modestas Vainius <geromanas@mailas.com> References: https://bugs.freedesktop.org/show_bug.cgi?id=36319 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit a51cd83d25f2f9f2107219d5671194f931601244) Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
2011-05-29gen6: Invalidate texture cacheChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit 25521900df11bc71020ee80db2223f979bec5ec6) Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
2011-05-29i965: Avoid transform overheads for vertex emit where possibleChris Wilson
Minor improvement as the bottlenecks lie elsewhere. But it was annoying me. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit ad22003033eb502474ae538a97e3b42cf8f83880) Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
2011-05-29i965: Refactor to use constant sampler_state offsetsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit 007c2f86cbb386861a1f711786523657f92e12cb) Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
2011-05-29i965: Reset vertex_id after every batchChris Wilson
So that we always remember to re-emit the initial vertex elements state. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit 8dc99b305a514dcd42c4260698e685a66dc95518) Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
2011-05-29i965: Always update last_floats_per_vertexChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit 5982ed4da12a964351029c6f786348a11e33dc81) Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
2011-05-29Take advantage of the kernel flush for dirty bo in the busy ioctlChris Wilson
Rather than just creating and submitting a batch that simply contains a flush in order to periodically ensure that rendering reaches the scanout, we can simply ask the kernel whether the scanout is busy. The kernel will then submit a flush on our behalf if it is dirty, which takes advantage of the kernel's dirty state tracking. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit 6f104189bb9439ab0e05f04d4be020813eb04bf9) Conflicts: src/intel_display.c src/intel_driver.c
2011-05-29Remove unused function 'intel_bo_alloc_for_data'Chris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit 314439860e595c473d168c0cafb2b5b49b7fef30) Conflicts: src/intel.h
2011-05-29Remove the unnecessary MI_FLUSH from the flush handlerChris Wilson
The kernel will emit any required flushes between the dri client and the ddx, and we do not rely on the MI_FLUSH here for scanout. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit ced747cefb5e697e6caa65296dff728904f52b93) Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
2011-05-29i965: segregate each vertex element into its own bufferChris Wilson
Reduce the number of relocations emitted by only emitting one relocation per vertex element per vertex buffer. References: https://bugs.freedesktop.org/show_bug.cgi?id=35733 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit 79444291a39c42039192a5baa3a71d52300cf4ee) Conflicts: src/i965_render.c
2011-05-29i965: 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> (cherry picked from commit d2106384be6f9df498392127c3ff64d0a2b17457) Conflicts: src/i965_render.c src/intel_video.c
2011-05-29MI_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> (cherry picked from commit 972569f6fd1e14519f46e9f50d2509faf1d0aa55) Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
2011-05-29946GZ is a 965G!Chris Wilson
Sales & Marketing score another victory in confusing me. Bugzila: https://bugs.freedesktop.org/show_bug.cgi?id=35854 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit 537a836dd6db384d53b52eb457a7d257c440217f) Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
2011-05-29Add a DRI2SwapEventPtr typedef for retro xserversChris Wilson
Because people are still trying to build upon our solid historical foundations. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit 630d77bf10ba6234bb9c04538636f7d8aa319aea) Conflicts: src/intel.h
2011-05-29Cleanup gen2 tiling confusionDaniel Vetter
A tile on gen2 has a size of 2kb, stride of 128 bytes and 16 rows. Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> (cherry picked from commit f660df2cb44b310740ed850037ff37891b671f28) Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
2011-05-29Use the per-generation batch context switch for atomic sequencesChris Wilson
A modest boost to throughput and reduction in CPU overhead from not flushing the batch on every transition from BLT to RENDER. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit ec133abc4bd8caba15ed54e18621b816afb06981) Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
2011-05-29dri: Disable page-flip between a tiled buffer and a linear scanoutChris Wilson
Keith Packard pointed out a loophole that could cause the DDX to end up with a tiled scanout even if the user required a linear framebuffer; that is by using page-flipping we could replace the scanout pixmap with another of our choosing, and not necessarily tiled. Close that loophole by only allowing an exchange of buffers between identical tiling modes. For the common case, this is fine since they will indeed be allocated with the same tiling. For the linear framebuffer case with mesa using a tiled pixmap, we force it to blit onto the scanout instead. Reported-by: Keith Packard <keith.packard@intel.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit 014fc7abb7b2cc2110e3ab9a0bd6f7cff2c64c05) Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
2011-05-29Give each user of tiling separate xorg.conf optionsChris Wilson
So that you can indeed allocate a linear framebuffer if you so desire without breaking mesa. Adds: Section "Driver" Option "LinearFramebuffer" "False|True" # default false EndSection to xorg.conf Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit 049ce4397ddf7fd088ce364cbb53cacf5133176f) Conflicts: man/intel.man src/intel_driver.c src/intel_driver.h
2011-05-29Fix relaxed tiling on gen2Daniel Vetter
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> (cherry picked from commit d21d781466785c317131a8a57606925867265dc8) Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
2011-05-29i965: Fix off-by-one in assertChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit 22d7b61791c382088a6c0df5dce3a15405d6c495) Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
2011-05-29If the crtc is not enabled, then it can't be onChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit 6d50f5a140dbefdf86eb25d18d08473aa7e42acc) Conflicts: src/intel_driver.c
2011-05-29dri: Don't wait upon a NULL current modeChris Wilson
There is a race condition between the dri swapbuffers code and hotplugging whereby we might attempt to execute a wait upon a non-existent output. This causes a NULL dereference and a loud crash. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=32770 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit d729ef02f2955f7476df4c65403bc1f8e705b780) Conflicts: src/intel_dri.c
2011-05-29i830: amalgamate consecutive composites into a single primitiveChris Wilson
Improve aa10text on i845 from 218kglyphs/s to 234kglyphs/s Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit 875d4828352c501ec5d0169735fb078807e76f2e) Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
2011-05-29Remove the deprecated function 'XNFprintf'Chris Wilson
As we know the maximum length of the string, we can replace our single usage of XNFprintf with snprintf. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit 58d9912e447cf6e29b20747b5ed6ee595687ce8d) Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
2011-05-29Undo: Disable BLT for i830 and 845GChris Wilson
Reported-by: György Balló <ballogy@freestart.hu> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=32482 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit 1ac2e04023f84dbf1f3db2ecad1cadd159aa614d) Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
2011-05-29i965: Mark sure we mark reused render targets as dirtyChris Wilson
... or else we may forget to flush them again. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit 27e33928f87ecb806d1f8c459d4a4ada76b0e30e) Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
2011-05-29snb: Only emit CC and DepthStencil bos once per batchChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit 00c204a7b2df7a6b501db9b57603534a45ecafa9) Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
2011-05-29snb: Restore drawrect, we need the implicit flushChris Wilson
Something is wrong, we should be tracking when to invalidate the caches as appropriate, yet I can not finding the missing flush to replace the implicit one of DRAW_RECTANGLE. Fixes cacomposite. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit 084ae43110240c582ae7cd6452966dd9f22350fa) Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
2011-05-29snb: Cache pixmap binding locationsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit f3a47d7f235d18e4529e3898a48673c7c3cbd489) Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
2011-05-29snb: Cache state between composite opsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit 4d48fed9aa0c3c7b84e74b4f72f298f580a8973c) Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
2011-05-29snb: Emit more invariants only onceChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit a58e5a1bdf10be3b96ecaa3d5e3ee288eab1063f) Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
2011-05-29Don't use hardware acceleration on Sandybridge rev 07 hardware or earlier.Matthias Hopf
This is known to lock up the GPU even with the workaround in place. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=31773 Signed-off-by: Matthias Hopf <mhopf@suse.de> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit c2fac6ca108734dd9566570b15f01cc476fa53dc) Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
2011-05-29Wait on the current buffer to complete when running synchronously.Chris Wilson
And remove the vestigal wait upon changing crtc as this is more properly done in the kernel. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit 55c5f1876e2329a938955967f5d45c814e50beb5) Conflicts: src/intel_batchbuffer.c src/intel_display.c (OGA: had to modify intel-sync to keep this working right)
2011-04-04don't do batch_submits in uxa block handler if vtswitchedOwain G. Ainsworth
avoids calling batch functions while we are vtswitched. the main benefit of this is that we dont' spam the log with batch submit failed messages
2011-04-04Move batch and render state initialisation to init/close screen instead ofOwain G. Ainsworth
enter/leavevt We not don't crash when vtswitched anymore. The cahnget o put a batch_submit in the uxa blockhandler meant that we started calling the batchbuffer stuff when switched getting a null deref.
2011-03-16i965: Amalgamate surface binding tablesChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit 3cc74044ce3546cc7dc2e918cbabbb41a77f4026) Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
2011-03-16Disable BLT for i830 and 845GOwain G. Ainsworth
This pair of chipsets seem broken beyond repair, specifically the erratum that causes the wrong PTE entry to be invalidated, so disable our incorrect attempts to use the BLT on those devices. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit 0bb135c40e5ac1bf7593ec1d68d2815cbf47aa25) Conflicts: src/intel_driver.c
2011-03-16uxa: Relax fencing some more for gen3Chris Wilson
Allow fenced allocations even for small pixmaps if the kernel supports relaxing fencing (where only the used pages are allocated). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit cc930a37612341a1f2457adb339523c215879d82) Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
2011-03-16Fallback to shadow for Sandybridge if we don't have access to the BLTOwain G. Ainsworth
If we attempt to emit BLT batches without kernel support, we just end up with EINVAL and no rendering. Prevent this, and avoid uncached rendering, by restoring the shadow fallback paths if there is no BLT support. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit 18839aaec505f8bbdb0690fe694162bf09a87d5c) Conflicts: src/intel_driver.c
2011-03-16Flush BLT batches before starting an atomic RENDER batchChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit b5ae596a0746e5a37e86f5b0980f9265e0061142) Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
2011-03-16Fix build. oops.Owain G. Ainsworth
2011-03-16Support BLT acceleration on gen6Owain G. Ainsworth
Signed-off-by: Zou Nan hai <nanhai.zou@intel.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit 42363134bd38fb406d90cdb9e5b227836a793912) Conflicts: src/intel_driver.c src/intel_uxa.c
2011-03-16add BLT ring supportZou Nan hai
gen6+ platform has a BLT engine with seperate command streamer to support BLT commands. Signed-off-by: Zou Nan hai <nanhai.zou@intel.com> [ickle: merge trivial conflict] Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit 5bed685f765671d63642b24e17abd70579c40ddf) Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
2011-03-16intel: don't pass a dangling pointer to GET_PARAMChris Wilson
I fail at cut'n'paste. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit 5afc7472b155e8e940f12a38baf80c298dc3b364) Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
2011-03-16uxa: Enable reduced fence sizes for i915Chris Wilson
Depends on libdrm 362457715faacd3101929e5f0d8ae250d0ad09df (for HAS_RELAXED_FENCING define). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit 6b3ce2e8701e7c3fcd30ca07fc13a2cdcf62560d) Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
2011-03-16Always use tiling on SandybridgeOwain G. Ainsworth
Sandybridge requires kind of buffer must be tiling, like depth. And we would or have all tiling cases handled fine. So not allow user to turn off tiling on Sandybridge+ may be fine. Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com> (cherry picked from commit 345c963e443ec325f1ff530512a356ddb318ff70) Conflicts: src/intel_driver.c
2011-03-16i915/video: Clip indirect Xv outputChris Wilson
In the case of a singular clip box and rendering onto the front buffer larger than 2048, the clip extents were being ignored. Here we can simply reduce the size of the indirect pixmap to the clip extents. Reported-by: Michael Chang <mchang@novell.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=35346 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit ee740778f5d5355c04f6fc4564f598993b106d62) Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
2011-03-16Update priv->stride after bo reallocationChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit 0bb1a5f19e09dc553761ddd90bf6319eab94a597) Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
2011-03-16dri: Protect against destroying a foreign DRI drawableChris Wilson
I have no clue as to how such an alien drawable reached us, but we have the evidence of a segfault to say it can happen. Reported-by: Bernie Innocenti <bernie@codewiz.org> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=34787 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit e889d3a709b55a0731ab098b17a3364b9bf39387) Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
2011-03-16Quell excessively verbose vblank counter failed error messagesBryce Harrington
Certain error situations can result in the following printed to Xorg.0.log at a high enough rate to make log file size a problem. (WW) intel(0): I830DRI2GetMSC:1062 get vblank counter failed: Invalid argument (WW) intel(0): I830DRI2ScheduleWaitMSC:1118 get vblank counter failed: Invalid argument Following in the tradition of commit 0ad6d6e1, limit the warnings to be output 5 times, then quell the remainder. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=34322 Ref.: https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/710594 Signed-off-by: Bryce Harrington <bryce@canonical.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit 9599fde65a0d8b7e7c85199346f7b620bdd8388d) Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>