Commit Graph

2581 Commits

Author SHA1 Message Date
Keith Packard cdbf84f202 intel_batch_init: test have_gem, not directRenderingType
Under KMS, directRenderingType will get set to DRI_NONE during driver
initialization. When the first batch buffer is allocated, as
directRenderingType is DRI_NONE, the GEM bufmgr would get trashed as
intel_batch_init called a fake-bufmgr specific function.

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-06-11 13:57:09 -07:00
Julien Cristau 6d062e9e9f Fix xvmc build
If we don't find xext.pc, disable xvmc instead of failing configure
Also add dependencies on xfixes and dri2proto (src/xvmc/dri2.h includes
<X11/extensions/Xfixes.h> and <X11/extensions/dri2tokens.h>).
2009-06-11 17:51:38 +02:00
Carl Worth 9d3c3b056c Increment version to 2.7.99.901
This is the first release candidate for 2.8.0
2009-06-10 15:30:45 -07:00
Carl Worth e262204515 NEWS: Summarize new developments for 2.7.99.901 2009-06-10 15:30:09 -07:00
Lukasz Kurylo e5bfa2702a DRI2 copyregion: don't wait for scanlines that won't happen
In some configurations, it's possible to wait for a scanline outside of
a given CRTC range.  Make sure that can't happen to fix multihead cases
with dead space.

Fixes fdo bug #22203.

Signed-off-by: Lukasz Kurylo <Lukasz.Kurylo@gmail.com>
2009-06-10 07:55:31 -07:00
Zou Nan hai cda5561716 add missing files for previous commit 2009-06-10 16:43:30 +08:00
Zou Nan hai 6d500be3cd enable MC on g45 for player without vld patch 2009-06-10 15:53:24 +08:00
Zhenyu Wang 88da9b4873 Add new chipset register dumps
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
2009-06-10 10:46:24 +08:00
Zhenyu Wang 0d56ef94be Disable composite on new chipset for now
This depends on updated intel-gen4asm be ready for new chip.

Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
2009-06-10 10:37:33 +08:00
Zhenyu Wang 440ccc44f5 Add new register definitions
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
2009-06-10 10:37:01 +08:00
Zhenyu Wang 0d8a9e2c6f Update intel_gtt utility for new chipset GTT check
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
2009-06-10 10:36:46 +08:00
Zhenyu Wang fb524caa3e Remove fixed MMIO size
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-10 10:26:03 +08:00
Zhenyu Wang 4f40b33ef4 Add new chipsets PCI ids
Desktop and mobile version of new chipsets are added.
Also do memory config like Intel 4 series chipset.

Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
2009-06-10 10:24:51 +08:00
Carl Worth accdbd2367 UXA: Rasterize trapezoids to system memory, not a pixmap
Since we're only doing software rasterization right now, anyway, it
makes more sense to just rasterize to system memory and then upload
to a pixmap once complete. This avoids expensive read-modify-write
cycles.

This results in a 2.4x speedup for a real-world test case that's
heavy on trapezoids, which is swfdec running on the following file:

http://michalevy.com/wp-content/uploads/Giant%20Steps%202007.swf

Many thanks to Chris Wilson for his cairo-traces repository and
cairo-perf-trace tool which makes it so easy to measure things
like this.
2009-06-09 19:06:12 -07:00
Carl Worth b5e32c9cf8 Rename i830_exa.c to i830_uxa.c
It was just confusing otherwise, (since the EXA code has all been
removed now).
2009-06-09 17:24:48 -07:00
Kristian Høgsberg ee539e58c3 Fall back to fb pixmaps for backing glyph pictures
GEM pads pixmaps to 512 byte stride and backs them with a kernel side
buffer objects.  We typically don't render out of glyph pictures, so
we're incurring a lot of overhead per glyph by allocating a GEM pixmap
per glyph.  By looking at the usage hint, we can fall back to
fbCreatePixmap for pixmaps backing glyph pictures, which gives us
a nice tight malloced pixmap.  The fast path for text rendering is
compositing from the glyph cache pixmap to the destination, which
shouldn't be significantly affected.

Quick bit of testing:
(firefox-20090601)
    xlib-rgba-before    384512.49:  1.01x
    xlib-rgba-after     389633.94:  1.00x
The difference being within the margin of error for the benchmark.

Signed-off-by: Eric Anholt <eric@anholt.net>
Tested-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-06-09 10:28:27 -07:00
Xiang, Haihao 4698b3bd79 xvmc: don't include xf86dri.h 2009-06-09 10:28:27 -07:00
root 4d9f3a21ab Merge branch 'xvmc-vld' 2009-06-04 10:27:41 +08:00
Eric Anholt b8e360bf2b Fix segfault in DRI2 vblank syncing if the region isn't onscreen.
Also, fix some weirdness in the checking for whether the target was the
screen.
2009-06-03 10:19:25 +00:00
Eric Anholt 5901a67fc8 Fix some drawable abuse in i830_dri.c
We were casting pixmaps to drawables even if they weren't pixmaps.  They did
happen to work out since we only used the drawable record out of them.
2009-06-03 10:19:25 +00:00
Eric Anholt 5e48146777 Replace some pixmap-related idioms with inline functions to do so. 2009-06-03 10:19:25 +00:00
Ma Ling ea0b00e675 Provide mode line from VBT to xorg.
If sdvo get modes function can't find modes from EDID,
transmit sdvo lvds modes from VBT to xorg.

Signed-off-by: Ma Ling <ling.ma@intel.com>
2009-06-03 09:49:29 +08:00
Ma Ling 9e7ee50bea Fetch mode line from VBT, then keep it.
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-03 09:49:29 +08:00
Ma Ling 88f766be00 Wait doubled regis to be stable for load pipe detection
We have two approaches for VGA detections: hot plug detection for 945G onwards
and load pipe detection for Pre-945G. load pipe detection will get one free
pipe ,and set border color as red and blue, then check CRT status by
swf register. Because pipe registers in hires mode are double buffered,
once set force border bit in pipeconf register, we have to wait for
a vblank until it is effective, otherwise result is unstable.

It fixed freedesktop bug #20463

Signed-off-by: Ma Ling <ling.ma@intel.com>
2009-06-03 09:49:29 +08:00
Ma Ling 6a635be5ea Set activation periods as 64 cdclk sync up with KMS
We use force CRT detect trigger bit(1 << 3) to detect VGA in hot plug mode,
which triggers a CRT hotplug/unplug detection cycle independent of the
interrupt enable bit(1 << 9), so keep bit 9.
And although spec says CRT_HOTPLUG_ACTIVATION_PERIOD_64(1 << 8) is only useful
for mobile platform, it is also required to detect vga on G4x platform correctly.
Tested the patch on G45/G43/Q45 platforms with no regressions

It fixed freedesktop.org bug #21120 and part of bug #21210.

Signed-off-by: Ma Ling <ling.ma@intel.com>
2009-06-03 09:49:29 +08:00
Jesse Barnes ec2fde7c82 Sync DRI2 CopyRegion to vertical retrace
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-06-02 16:45:12 +01:00
Adam Jackson 704771f1c5 Remove useless loader symbol lists. 2009-05-28 15:03:45 -04:00
Carl Worth 8e942b70cb Revert "Rely on BO pixmaps being present in acceleration paths."
This reverts commit 4653a7db62.

Eric was getting a little too ambitious about our brave, new world.
We do still want the driver to work with old, non-GEM kernels
after all.
2009-05-26 16:12:17 -07:00
Eric Anholt 1a039f4371 Fold GEM detection into DRM master open.
We don't have anything to do with the DRM unless it's GEM-enabled, unless
we were to support GEM-but-not-DRI2, which doesn't seem useful.

Compilation fixes by Carl Worth <cworth@cworth.org>
2009-05-26 16:12:16 -07:00
Eric Anholt a04a51c9bb Open the DRM and keep the handle throughout server startup to finish.
This will let us configure the server from start to finish with the
most pertinent information available (KMS vs UMS, DRI2 vs non-DRI).  Also,
we now close the DRI2 fd at terminate, which we didn't before.

This duplicates some code from DRI1 for getting a master FD like I'd done in
DRI2, but given that we weren't loading DRI1 ourselves, this is also a
bogosity cleanup, and avoids allocating the extra DRI1 private.
2009-05-26 16:12:16 -07:00
Eric Anholt c3bf8b9801 Fix backwards logic on whether to sync to vblank or not.
Thanks to Michel Dänzer for catching it.
2009-05-26 11:04:54 -07:00
Kristian Høgsberg ad2128825b Only return FALSE when dri_bo_map() fails
Small typo in the previous commit.
2009-05-20 12:32:10 -04:00
Eric Anholt 09beee378c Don't do GTT maps on objects bigger than half the available aperture size.
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-19 10:09:41 -07:00
Li Shao Hua 52054b6a4c switch XvMC to gem 2009-05-19 16:27:32 +08:00
Eric Anholt 34660fd2df Only sync XV to vblank when drawing to the frontbuffer.
This fixes emitting syncs to random pipes with boxes bigger than that
pipe's vertical, leading to GPU hangs.

Bug #21738
2009-05-18 10:44:34 -07:00
Xiang Hai hao b622860429 DRI2 for XvMC 2009-05-18 17:12:30 +08:00
Zou Nan hai 50c10ededb Merge branch 'master' into xvmc-vld 2009-05-18 17:11:28 +08:00
Keith Packard 87332a7cc1 Use drm_intel_bo_disable_reuse API to flag scanout and cursor buffers
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-15 17:29:13 -07:00
Jesse Barnes ebe05200df Add --enable-debug flag to configure
Defaults to enabled.
2009-05-15 08:50:17 -07:00
Keith Packard 04772b6c09 If DRM can't figure out which pipe to sync on, then don't sync at all.
Syncing to the wrong pipe can wedge the hardware if the exclusion area is
larger than the vtotal

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-05-14 17:01:54 -07:00
Carl Worth 128c1c3b7d Use libdrm to lookup pipe for tear-free sync of XV
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-14 17:01:53 -07:00
Wu Fengguang 2572fcc619 README: kill an evil dot
To make copy and paste a more pleasure.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
2009-05-14 14:04:52 -07:00
Eric Anholt b9462516d1 Remove dead "avail" variable from XAA stuff. 2009-05-14 14:04:38 -07:00
Jesse Barnes 1c68bc376a Add new have_gem flag
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-13 13:19:53 -07:00
Keith Packard 5236784708 Load i915 and fbcon when checking for KMS
Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
2009-05-12 14:38:30 -07:00
Keith Packard ff7494b4c4 Add DP link and GMCH M and N registers
Signed-off-by: Eric Anholt <eric@anholt.net>
2009-05-12 14:38:29 -07:00
Keith Packard e54a23bff0 Fallback when VT inactive
While the VT is inactive, pI830->batch_bo will be NULL, so use that as a
simple check for when to not use the accelerator. The alternative is to
ignore VT switch and just keep drawing, which would also be fine.

Bug #21468.

Signed-off-by: Keith Packard <keithp@keithp.com>
[anholt: Removed extra return FALSE -- I830FALLBACK does that.]
Signed-off-by: Eric Anholt <eric@anholt.net>
2009-05-12 14:27:57 -07:00
Wu Fengguang 660bd745c2 Remove the offset parameter from i830_allocator_init()
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-05-12 14:25:10 -07:00
Carl Worth b1f5cc3349 RELEASING: Better instructions for where to send announcements
The xorg-announce list doesn't need to hear about development
snapshots and release candidates. The intel-gfx list is good for
that.
2009-05-12 11:46:17 -07:00
Alan Coopersmith f16ee21884 Fix "Unkown" typo in two FatalError messages
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2009-05-10 16:25:24 -07:00