summaryrefslogtreecommitdiff
path: root/src/i830.h
AgeCommit message (Collapse)Author
2009-12-02Rename I830Sync() to intel_sync()Chris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-11-30uxa: Limit maximum size of tiled objectsChris Wilson
On older chipsets (i.e. pre-i965) tiling is very restrictive and imposes severe size and alignment constraints. Combine that with relatively small apertures and it is very easy to create a batch buffer that cannot be mapped into the aperture (but would otherwise fit based purely on total object size). To prevent this we need to not use tiling for large buffers (the very same buffers where tiling would be of most benefit!). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-11-30Use new drmGetDeviceNameFromFd() for mapping to drm device nameKristian Høgsberg
Should have been in libdrm to begin with.
2009-11-30uxa-glyphs: Enable TILING_X on glyph caches.Chris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-11-29batch: Track pixmap domains.Chris Wilson
In order to detect when we require cache flushes we need to track which domains the pixmap currently belongs to. So to do so we create a device private structure to hold the extra information and hook it up. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-11-13i915: Derive the correct target color from the pixmap by checking its formatChris Wilson
Particularly noting to route alpha to the green channel when blending with a8 destinations. Fixes: rendercheck/repeat/triangles regressed http://bugs.freedesktop.org/show_bug.cgi?id=25047 introduced with commit 14109a. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-11-10i915: Use the color channels to pass along solid sources and masks.Chris Wilson
Instead of allocating and utilising the texture samplers for 1x1R solid sources and masks we can simply use the default diffuse and specular colour channels and adjust the fragment shader appropriately. The big advantage is the reduction in size of batches which should give a good boost to glyph performance, irrespective of the additional boost from using simpler shaders. However, the motivating factor behind the switch is that our use of 1x1 textures turns out to be buggy... Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-11-05Revert "configure: make --disable-dri work even if the server supports DRI"Eric Anholt
This reverts commit a851139c2141f6da370186148f2836e18b2acf83. It broke the build, and I don't see why we should be supporting this anyway. Conflicts: configure.ac src/Makefile.am
2009-11-05Remove flow-control macros for fallbacks in the 2D driver.Eric Anholt
It's poor style, and has confused new developers.
2009-11-05configure: make --disable-dri work even if the server supports DRIRémi Cardona
XF86DRI is defined by the SDK so not defining it here just breaks the build. Define HAVE_DRI instead to avoid collisions. Note: DRI2 is still enabled/disabled entirely by SDK defines. Signed-off-by: Rémi Cardona <remi@gentoo.org> Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-10-14conf: Add debugging flush optionsChris Wilson
Make the following options available via xorg.conf: Section "Driver" Option "DebugFlushBatches" "1" # Flush the batch buffer after every # single operation; Option "DebugFlushCaches" "1" # Include a MI_FLUSH at the end of every # batch buffer to force data to be # flushed out of cache and into memory # before the completion of the batch. Option "DebugWait" "1" # Wait for the completion of every batch buffer # before continuing, i.e. perform synchronous # rendering. EndSection Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-10-13Drop frontbuffer from crtc in I830CloseScreenAlbert Damen
By dropping the frontbuffer from the crtc, the new frontbuffer can be properly added to the crtc when the xserver is reset. Signed-off-by: Albert Damen <albrt@gmx.net>
2009-10-08Clean up more i830_memory.c madness.Eric Anholt
It was cooking up insane alignment values for buffers that new libdrm was justifiably complaining about, but it turns out we don't need the alignment values anywhere because the only case they're needed, they're computed entirely by the kernel. Also, the XVMC code was passing a completely unused flag in.
2009-10-08Call pPixmaps plain old pixmaps.Eric Anholt
2009-10-08de-pCamelHungarian the Render pictures and pixmaps.Eric Anholt
2009-10-08Share several render fields between render implementations.Eric Anholt
Also, start settling on the cairo naming for things: source, mask, and dest.
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-06Remove more dead UMS code.Eric Anholt
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-09-21Split i915/i830 composite_emit_primitive into two functions.Keith Packard
The i915 and i830 take similar but different data when emitting the primitives, instead of trying to share code here, just split this apart and avoid potentially breaking things later on. Signed-off-by: Keith Packard <keithp@keithp.com>
2009-09-21Remove vestigial internal rotation which broke KMS DGA/VidMode modesetting.Keith Packard
Pre-2.0, the driver supported rotation internally, rather than relying on the X server rotation support. The last piece of this dealt with rotating the mouse coordinates and also tried to preserve rotation across DGA/VidModeExtension modesetting requests. That latter bit of code broke under KMS as the rotation value was never initialized, and when set to zero would create an invalid configuration. This would confuse xrandr which would bail before making any changes, leaving the user without a way to recover. Signed-off-by: Keith Packard <keithp@keithp.com>
2009-09-09i915: Restore nearest samplingChris Wilson
My recent commit [94fc93] to use the pixel centre for sampling with the i830 broke the i915. This restores the previous sampling coordinates for the i915 whilst preserving the correct coordinates for i830. Fixes: gnome characters disappear http://bugs.freedesktop.org/show_bug.cgi?id=23803 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-09-05i830/i915: Set the sample position to the pixel center.Chris Wilson
And in particular we apply the nearest sample bias separately for src/mask. Fixes cairo/test: device-offset-scale finer-grained-fallbacks mask-transformed-{similar,image} meta-surface-pattern pixman-rotate surface-pattern-big-scale-down text-transform Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-08-25KMS: allocate one bo per crtc for cursorKeith Packard
The KMS API doesn't provide for sharing a single bo for multiple cursor images, so allocate one bo for each crtc to hold the cursor image. KMS also only supports ARGB cursors, so don't bother to allocate buffers for two color cursors. Signed-off-by: Keith Packard <keithp@keithp.com>
2009-08-07Align tiled pixmap height so we don't address beyond the end of our buffers.Eric Anholt
2009-07-24XvMC: pin XvMC buffers under KMS.Xiang, Haihao
Under KMS, the buffer allocated by i830_allocate_memory isn't pinned anymore. However currently 915 XvMC needs static offsets. Fixes bug #22872
2009-07-16Really fix i915 render. Fail at commit --amend.Eric Anholt
2009-07-16Fix 915-class Render after the 8xx-class Render fix.Eric Anholt
The two shared i830_composite.c, so giving i830 atomic batch support triggered anger about starting i830's atomic area while in i915's atomic area. Instead, split the emit-a-primitive stuff from the state emission.
2009-07-15Use batch_start_atomic to fix batchbuffer wrapping problems with 8xx render.Eric Anholt
Bug #22483.
2009-07-10Remove NoAccel supportKeith Packard
This removes yet another 'debugging' option that hasn't seen real use in a long time, and wasn't supported under KMS in any case. Signed-off-by: Keith Packard <keithp@keithp.com>
2009-07-06Disable FBC on IGDNGZhenyu Wang
Don't make FBC count for memory allocation. Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
2009-06-24Treat disabled CRTCs as "not covering" for scanline wait purposesJesse Barnes
Now that swapbuffers does a scanline wait to avoid tearing, it's important to take into account the CRTC status to avoid hangs. If we do a scanline wait when the CRTC is off (due to DPMS for example) we'll hang the GPU. So add some code to check the CRTC DPMS status to the i830_covering_crtc function, returning NULL if none of the covering CRTCs are actually active. KMS vs UMS logic is hidden in new i830* functions, cleaning up both DRI2 & video paths a bit. Fixes fdo bug #22383. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2009-06-23Add option to control swapbuffers behaviorJesse Barnes
Until we get triple buffering, we'll want this so users can avoid taking a performance hit on apps that render slower than the refresh rate. Fixes fdo bug #22234. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2009-06-15parse general definition block to get the SDVO device infoZhao Yakui
The general definition block contains the child device tables, which include the child device info. For example: device slave address, device dvo port, device type. We will get the info of SDVO device by parsing the general definition blocks. Only when a valid slave address is found, it is regarded as the SDVO device. And the info of DVO port and slave address is recorded. http://bugs.freedesktop.org/show_bug.cgi?id=20429 Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
2009-06-10Remove fixed MMIO sizeZhenyu Wang
Use pci resource size instead, which will get the correct MMIO range. New chipset uses obviously larger MMIO range. Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
2009-06-03Replace some pixmap-related idioms with inline functions to do so.Eric Anholt
2009-06-03Fetch mode line from VBT, then keep it.Ma Ling
Parse SDVO LVDS option section, then according to panel type fetch fixed mode line from SDVO LVDS DTDS section . Signed-off-by: Ma Ling <ling.ma@intel.com>
2009-06-02Sync DRI2 CopyRegion to vertical retraceJesse Barnes
Akin to the Xv code, wait for the scanline to be outside the range to be copied by the DRI2 CopyRegion hook. Fixes fdo bug #20664. Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2009-05-28Remove useless loader symbol lists.Adam Jackson
2009-05-19Don't do GTT maps on objects bigger than half the available aperture size.Eric Anholt
The basic problem is that software fallbacks will do single instructions that copy from one GTT-mapped BO into another GTT-mapped BO. If we can't get both of them bound simultanously, we fault one in, retry the instruction, fault the other in (kicking out #1), retry the instruction, fault #1 back in (kicking out #2), etc. Note that we'll still get into a nasty spot if you do a composite operation with a mask where all 3 are big-but-less-than-half-available-aperture, where you'll thrash. It at least means you'll make progress, though, since each instruction will only be operating on two BOs at at time, and the situation seems unlikely. Bug #20152 (3/3)
2009-05-15Use drm_intel_bo_disable_reuse API to flag scanout and cursor buffersKeith Packard
Buffers referenced by the kernel for scanout or cursor display should not be reused by the driver. Use the new drm API to disable reuse of these buffers. Signed-off-by: Keith Packard <keithp@keithp.com>
2009-05-14Use libdrm to lookup pipe for tear-free sync of XVCarl Worth
Previously, the code was trying to examine a driver_private field, but those fields are only set by the userland-modesetting code so would fail in the case of KMS. This fixes bug #21076: [945GME] [KMS] XV_SYNC_TO_VBLANK does not prevent tearing of xv video https://bugs.freedesktop.org/show_bug.cgi?id=21076
2009-05-13Add new have_gem flagJesse Barnes
Prior to this patch, code that wanted to check whether GEM was present would look at pI830->memory_manager. This turned out to be occasionally problematic in the KMS case, since memory_manager didn't always get set correctly. So add a new pI830->have_gem flag to make things clear in the various code paths, and set it after GEM initializes or when KMS is detected. Reviewed-by: Eric Anholt <eric@anholt.net> Tested-by: Magnus Kessler <Magnus.Kessler@gmx.net> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2009-05-12Remove the offset parameter from i830_allocator_init()Wu Fengguang
offset is redundant. i830_allocator_init() is only called in one place with offset=0. Acked-by: Magnus Kessler <Magnus.Kessler@gmx.net> Signed-off-by: Wu Fengguang <fengguang.wu@intel.com> Signed-off-by: Eric Anholt <eric@anholt.net>
2009-04-28Remove a handful of pointless commentsKristian Høgsberg
CVS keywords, comments about how the source was once reformatted, and the ad-hoc changelog comment in in i830_driver.c
2009-04-27unifdef LIBPCIACCESS and XSERVER_LIBPCIACCESS.Eric Anholt
Depending on new server means these are always present.