Commit Graph

1433 Commits

Author SHA1 Message Date
Jesse Barnes 445a59d262 Remove unused plane->pipe mappings from SAREA private
Turns out we can get away without this, so remove it, fix a crash, and only
swap planes/pipes if the DRM can support it.
2007-09-12 09:32:41 -07:00
Jesse Barnes d02336290b Fix plane/pipe mapping compat code
Move plane->pipe mapping adjustment to ScreenInit so we can check
against the DRM driver version accurately.
2007-09-11 04:28:14 -07:00
Jesse Barnes d9f2b3c0d2 Fix crash in ScreenInit
Use pScreen directly when getting at the SAREA private, since
pScrn->pScreen may not be initialized yet.
2007-09-10 23:49:34 -07:00
Jesse Barnes 4c7542ef43 Only swap planes and pipes if DRM supports it
We want to associate plane A with pipe B on pre-965 mobile chips, since that's
the only way to get framebuffer compression on the builtin LVDS on those
platforms.  However, if we do this swapping and DRM isn't aware of it, we may
end up requesting vblank events for the wrong pipe, or setting up SAREA buffer
swap state incorrectly.

This mod checks whether DRM supports the new plane->pipe swapping behavior, and
only enables the swapping if so.  This should fix the bugs Lukas found and
debugged.  Reviewed by Michel Danzer.
2007-09-10 23:30:50 -07:00
Keith Packard 286f5df0b6 Switch to pci_device_map_range/pci_device_unmap_range APIs.
With the libpciaccess change that added these new APIs, use them
for all mapping.
2007-09-06 14:38:37 -07:00
Zhenyu Wang 2a8592f2eb Fix G33 GTT stolen mem range
G33 GTT table lives in seperate stolen mem with
graphics data stolen mem.
2007-09-05 14:52:56 +08:00
Keith Packard 7fd9a98178 Don't set supported TV formats until after RandR initialized.
The TV format property cannot be configured until RandR has been
initialized.
2007-08-28 16:00:01 -07:00
Keith Packard c6e637cd68 Limit TV formats to those supported by current connection 2007-08-28 12:43:36 -07:00
Keith Packard ddd6053987 Add register defines for hw binning 2007-08-28 12:30:46 -07:00
Michel Dänzer 3fbbd0afde Fix build against pre-pci-rework xserver. 2007-08-28 17:48:20 +02:00
Zhenyu Wang 0fdbf64b34 Fix i915 a8 color buffer blending
From spec, i915 engine uses green channel when reading from 8bit
color buffer for blending, and also writes back green channel.
Fix blend factor in dest alpha case by using dest color instead.
Now rendercheck can pass a8 tests.
2007-08-28 21:57:06 +08:00
Keith Packard 3411eb0dba i830_driver.c changes for libpciaccess.
Change to use libpciaccess APIs, including computing and using BAR indices
for various mapping activities.
2007-08-26 23:09:01 -07:00
Keith Packard 387fed6daa i810_driver.c changes for libpciaccess.
This includes new probe code (intel_pci_probe) and changes for i810 to
use BAR indices to refer to suitable portions of the device mappings.
2007-08-26 23:06:57 -07:00
Keith Packard 2c79419205 Mechanical API conversions for libpciaccess.
Uncomplicated API transistions for libpciaccess usage:

	Legacy xf86 API		libpciaccess API
	---------------		----------------
	xf86ReadPciBIOS 	pci_device_read_rom
	pciReadWord 		pci_device_cfg_read_u16
	pciWriteByte 		pci_device_cfg_write_u8

And, more use of the API-independent DEVICE_ID/SUBVENDOR_ID/SUBSYS_ID macros
to pull PCI identification data from the underlying structure.
2007-08-26 22:46:19 -07:00
Keith Packard 70e8e59572 Change DRI interface to fill in PCI data from new libpciaccess structure.
The DRI interface requires bus identification for each DRI object; pull that
data from the libpciaccess structures as necessary.
2007-08-26 22:40:25 -07:00
Keith Packard 5516cc781b Add libpciaccess declarations to I810Rec and I830Rec.
Using libpciaccess requires a different type for PciInfo (struct pci_device
instead of pciVideoPtr) and it requires knowing which BAR each memory region
needs to be mapped from. Add these definitions to the driver private record
along with the includes necessary to use libpciaccess.
2007-08-26 22:37:38 -07:00
Keith Packard daada59b5f Change IS_Ixxx tests to work with or without libpciaccess.
libpciaccess has a new structure that holds the PCI identifier data; borrow
macros from the mga driver to work with either the old xf86-specific
structure or the new libpciaccess structure.
2007-08-26 22:32:39 -07:00
Keith Packard 3d3bf493a3 Intel driver configuration (only) changes for X server libpciaccess usage.
Detect whether the target X server uses libpciaccess, using it in the driver
compilation as necessary. This change means that utilities that used to use
libpciaccess will not do so unless the driver itself uses libpciaccess. Yes,
that could be fixed, but it doesn't seem that important.

This patch does not include any code changes necessary to actually have the
driver build against an X server using libpciaccess.
2007-08-26 22:27:34 -07:00
Keith Packard 5faf9cc6af Sort quirk table, add Dell Latitude X1 2007-08-26 09:34:06 -07:00
Keith Packard a9e1d42a47 Lenovo 201a is x60s, not x61s 2007-08-25 12:54:11 -07:00
Keith Packard ffc2907f7f Thinkpad X61s has no TV out 2007-08-25 12:31:21 -07:00
Keith Packard 0c20fbabd1 Make sure XV_PIPE is used whenever possible.
The code was not consistently using XV_PIPE when the desired crtc contained
any portion of the video output.
2007-08-17 22:28:06 -07:00
Eric Anholt e443f83dd6 Tune acceleration architecture allocator sizes down. 2007-08-17 18:13:49 -07:00
Eric Anholt bd874b11bb Replace AA allocator usage with i830_memory.c for RandR rotation.
This requires EXA 2.2 (server 1.3) for rotated performance with EXA, because
the i830_memory.c allocation may not fall within what EXA considers the
offscreen area, so the PixmapIsOffscreen hook is needed.
2007-08-17 17:49:21 -07:00
Eric Anholt 9ad33dd65a Use i830_memory.c instead of the AA's allocator for XV buffers.
This should fix issues with XV being allocated into XAA's tiled pixmap
cache and resulting bad rendering.  Its also brings us closer to being able
to shrink the size of the pixmap cache on XAA, which is of limited utility.
2007-08-17 16:46:48 -07:00
Jesse Barnes 3655a1ecb6 Merge branch 'master' of ssh://git.freedesktop.org/git/xorg/driver/xf86-video-intel 2007-08-16 12:04:20 -07:00
Jesse Barnes e5c336eaa3 Disambiguate plane and pipe mapping, use plane A on pipe B on pre-965 LVDS
Add a new 'plane' field to the intel_crtc private structure for tracking
planes separate from pipes.  This allows pre-965 chips to use plane A
on pipe B, enabling framebuffer compression for builtin LVDS displays.
2007-08-16 12:04:02 -07:00
Dave Airlie 2231cdcd8f i915: add support for render to a8 2007-08-16 17:15:54 +10:00
Dave Airlie a69db6f7fe intel: don't setup texOffsetStart unless using EXA 2007-08-15 18:28:50 +10:00
Zhenyu Wang 5126a71f82 Fix seg fault introduced in tiling patch when TV detect
When TV does load detect, fb hasn't been setup, so we should check
that in i830_display_tiled(). Caught by Nanhai.
2007-08-14 13:54:55 +08:00
Keith Packard d9f89a1af7 Save/restore tile-mode offset registers DSPATILEOFF and DSPBTILEOFF
Now that the driver sets these registers, they must be saved and restored.
2007-08-10 17:59:33 -07:00
Keith Packard 5bc194d3d3 Set DSPATILEOFF/DSPBTILEOFF to handle 965 tiled frame buffers.
DSPATILEOFF and DSPBTILEOFF replace DSPASURF and DSPBSURF when the frame
buffer is in tiled mode.
2007-08-10 17:54:32 -07:00
Eric Anholt 64b943c79c Add #if 0-ed fence debugging code. It's noisy, and of little use to most. 2007-08-10 17:42:22 -07:00
Eric Anholt ba9a503ba2 Don't force tiling on if it is disabled in configuration but fbc is possible. 2007-08-10 17:42:21 -07:00
Eric Anholt b7751c7d1d Fix stack-smashing in the last commit. 2007-08-10 17:42:09 -07:00
Eric Anholt cb36635a05 Attempt to fix several front buffer tiling failure cases.
Front buffer tiling is now disabled with G965 and XAA.  Some of the acceleration
that i830_xaa.c does can't be supported on tiled buffers.

Adds a tiling field to struct i830_memory, and uses it instead of separate
variables for each potential tiled buffer.
2007-08-10 16:33:04 -07:00
Keith Packard ed1b106fab Clean up tv mode name allocation and copy.
TV mode names used to contain the signalling standard along with the pixel
size. The signalling has been moved to the TV_FORMAT property, but the
allocation and initialization of the mode name was left a bit messy as a
result.
2007-08-10 14:31:16 -07:00
Jesse Barnes f71b9358b4 Cleanup tiling and FBC driver output.
Remove an extra "FBC enabled" message from i830_memory.c (only report errors
if they occur), and don't print the "forcing FBC on" message if tiling was
already enabled, as it's redundant and confusing.
2007-08-10 15:53:04 -04:00
Jesse Barnes e6746d0f28 Enable tiling by default on 965. 2007-08-10 15:48:15 -04:00
Jesse Barnes e0fcf645a2 Tiling fixes for 965
This should be close to the last set of tiling fixes for 965 chipsets.
Prior to this commit, the 965 composite hook didn't take tiling into
account, nor did 965 textured video, which caused display corruption.
However, there seems to be at least one last bug to squash--on occasion,
a configuration with tiling enabled won't properly display text.  This
is likely another tiling related problem with the composite hook.
2007-08-10 15:43:06 -04:00
Dave Airlie 7b143e5c83 i965: increase composite vertex buffer size and alignment to be safe 2007-08-09 12:14:44 +10:00
Dave Airlie 14691b24da i965: fix memcpy of the sf_kernel when a mask is needed 2007-08-09 09:41:32 +10:00
Carl Worth 5e18c6af90 Allow 965 composite acceleration to A8 destinations.
Note that this is a slowdown in text rendering due to the high overhead of our
compositing setup, but appears to be correct according to rendercheck.
2007-08-08 11:14:29 -07:00
Eric Anholt b0ec670cdb Bug #11593: Remove dead struct vch_bdb_20 which was angering the sun compiler. 2007-08-08 11:03:51 -07:00
Eric Anholt 92af2f4bbc Merge branch 'origin'
Conflicts:

	src/i830_exa.c
2007-08-07 15:18:17 -07:00
Eric Anholt da82a47a55 Fix EXA rendering with tiled front buffer on pre-965.
The 915 and earlier appear to respect the fence registers, while only the 965
requires the per-operation tiling setting and pitch shifting.  This will also
fix issues with rendering on the 965 involving multiple cliprects, where the
pitch would get divided repeatedly.

This removes the offset < 4096 fallback, which essentially resulted in no
acceleration to tiled buffers, hiding the issues.
2007-08-07 15:13:10 -07:00
Jesse Barnes e0be352f50 Fixup pitch in Prepare* functions, since actual hooks may
be called many times for the same pixmap, and we don't want
to keep dividing the pitch by 4.
2007-08-07 12:42:42 -07:00
Brice Goglin 7431abee5f Define INTEL_VERSION_MAJOR/MINOR/PATCH using PACKAGE_VERSION_* 2007-08-07 09:13:00 +02:00
Jesse Barnes 9e1914270a Remove 4k offset checks from Copy & Solid hooks.
Reading the docs too literally can cause you to hide bugs with false fixes...
2007-08-06 17:55:00 -07:00
Eric Anholt 3510d5728f Fix accumulated whitespace nits in i830_exa.c 2007-08-06 16:44:39 -07:00