Commit Graph

1470 Commits

Author SHA1 Message Date
Eric Anholt 8fc4e30782 Refuse to allocate LIFETIME_FIXED objects in buffer objects.
We can't guarantee the offset will stay the same using the current DRM
interface, but the correct solution is fixing our code to allow these objects
to move.  Breaks TTM mode of the DRI driver for now.
2007-10-11 12:17:14 -07:00
Eric Anholt 0de747f7d2 In i830_allocate_memory_bo, bind if we control the VT, not on lifetime-fixed. 2007-10-11 12:17:14 -07:00
Eric Anholt 0040bb9544 Fix potential use-after-free in XV overlay code on video stop. 2007-10-11 12:17:14 -07:00
Zhenyu Wang 56ae767180 Revert "Fix G33 GTT stolen mem range"
This reverts commit 2a8592f2eb.

This causes compat issue between ddx and kernel apggart version.
Revert it as it shouldn't hurt normal people's default GTT size,
but if you change it to 1MB in bios, it's supposed to be broken now.
2007-10-11 10:09:29 +08:00
Zhenyu Wang 5faee02e97 EXA: fix tiled dest rendering on i8XX chips 2007-10-10 13:55:30 +08:00
Keith Packard 5bbe9f09fd Include xf86mm.h if using XF86DRI_MM
This header file doesn't appear to be getting automatically included for
some reason.
2007-10-08 13:09:15 -07:00
Keith Packard 41dacf97ec Quirk for Samsung Q35 which has no TV output. 2007-10-08 13:09:15 -07:00
Eric Anholt 9e770bf69e Replace setting of LIFETIME_FIXED on cursors with just updating the offsets. 2007-10-05 13:02:19 -07:00
Eric Anholt c9d6e90c25 Don't set overlay registers LIFETIME_FIXED. It always uses the current offset. 2007-10-05 13:02:16 -07:00
Eric Anholt 1cc6bec462 Revert setting of exa_965_state as LIFETIME_FIXED.
The current offset is used every time in render setup.
2007-10-05 13:02:12 -07:00
Eric Anholt dfa22df8ce Don't leak buffer object allocations in i830_reset_allocations(). 2007-10-05 12:53:07 -07:00
Eric Anholt 7db9d706a1 Warning cleanup. 2007-10-05 12:40:48 -07:00
Eric Anholt bf33c4e2d9 Fix formatting of error message. 2007-10-05 12:40:37 -07:00
Eric Anholt 04e936935f Bring the CH7017 driver closer to spec.
This is also closer to what my hardware is programmed with, except for some
very confusing off-by-one bugs in an unexpected direction.
2007-10-01 17:29:35 -07:00
Eric Anholt 263d48ad93 Fix probing of the sample CH7017 device I found by allowing GPIO overrides.
It may be that the LVDS chips need to be DVOA and GPIOB only on mobility
devices with them, and DVOC/GPIOE on non-mobility like this 845.  But until
more examples are found, just make this one device probe.
2007-10-01 16:23:30 -07:00
Eric Anholt 219354af21 Restore building of pciaccess-based tools even if the server doesn't use it. 2007-10-01 16:09:13 -07:00
Eric Anholt 1b83e5e589 Remove more DVO probing noise. 2007-10-01 14:32:28 -07:00
Eric Anholt 29d3188ee9 Suppress I2C failure error messages during DVO device detection.
Otherwise, errors would be printed for every chip probed which wasn't present
on the system.
2007-10-01 13:48:48 -07:00
Eric Anholt 6dd8228a38 Enable CH7017/7018 DVO driver by default.
On hardware containing one of these chips (generally single pipe with an LVDS
connected), it's probably better to try to enable it and fail in some cases
than to not probe the output at all.
2007-10-01 13:48:48 -07:00
Eric Anholt 994ee6721d Disable TV/VGA output on the CH7017/7018 devices.
We don't support those outputs on this chip yet, so turn them off if the BIOS
had set them on.
2007-10-01 13:48:48 -07:00
Regis Prevot 0e5574e842 Ignore detection of TV output on Panasonic CF-Y7 2007-09-29 10:28:44 -04:00
Jesse Barnes 1845e7c6e9 Go back to using old drm_i915_flip_t field name
This field shouldn't have been renamed in the first place.  Go back to using
the old name so that the tree is backward and forward compatible again.
2007-09-28 10:12:11 -07:00
Kyle McMartin f3d92ab474 Dell XPS 1330 has no TV out 2007-09-28 10:17:55 -04:00
Zhenyu Wang bbf69c7446 Pin cursor, overlay(no physical) and exa state buffers
And cursor mem counting for dri mem manager is not relate
to overlay.
2007-09-27 17:37:19 +08:00
Eric Anholt ca67fa767d Remove logic for supporting i915tex_dri.so vs. i915_dri.so.
There can be only one.
2007-09-24 11:12:22 -07:00
Eric Anholt 130f79613b Merge branch 'buffer-objects'
This branch changes i830_memory.c's allocator to use TTM when available to
allocate memory, which also allows TTM to control almost the entire aperture.
As a result, our front/back/depth buffers are created as real buffer objects,
which may be used by the DRI driver instead of the fake buffer type in TTM.
The updated DRM with bo_set_pin ioctl is required, to allow us to pin and
unpin our buffers as needed.
2007-09-21 17:20:15 -07:00
Eric Anholt 126031655c Merge remote branch 'origin/master' into buffer-objects
Conflicts:

	src/i830.h
	src/i830_driver.c
2007-09-20 08:57:58 -07:00
Hong Liu b73235f404 Fix pixmap offset
Use consistent interface for counting pixmap offset.
2007-09-20 11:28:52 +08:00
Dmitry Babrovich bda3c69a7a Bug #12457: Let the ch7xxx driver probe the 7301
Looking at the 7304, this chipset likely requires slightly different
programming.  However, this change allows for at least some functionality.
2007-09-18 09:35:20 -07:00
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