Commit Graph

2135 Commits

Author SHA1 Message Date
Kristian Høgsberg 282f51c3f0 Merge commit 'origin/master' into HEAD 2008-10-14 23:13:40 -04:00
Eric Anholt 4dd00681dd Fix broken stolen memory counting on G4X.
On the GM45 we were assuming too little stolen memory (mostly harmless,
except when it wasn't, until the AGP fix), and on the G45 we were assuming too
much stolen memory, which was quite harmful when we touched the page that
didn't get mapped.

Future stolen memory accounting should use src/reg_dumper/intel_gtt before and
after enabling AGP on the chipset to confirm that only the GTT entries not
mapped to stolen are replaced, and that all of the unmapped GTT entries are
replaced with the constant scratch page.
2008-10-14 11:33:33 -07:00
Eric Anholt e7e49bed7e Add a GTT dumper for G4x debugging. 2008-10-14 10:39:22 -07:00
Julien Cristau 1c6ea4ab47 Typo fix
Reported by Tomas Carnecky on IRC
2008-10-12 15:17:35 +02:00
Zhenyu Wang 6cb4150160 Bug #17892: Fix possible crash in CRT probe
Introduced in patch for DVI-I CRT probe, if no EDID
CRT monitor is connected, origin code destroys default
DDC bus which causes crash in later get_modes call.
Change it to setup and destroy DDC bus as needed in
get_modes, so we always reprobe and get current state.
2008-10-12 08:07:44 +08:00
Keith Packard 140451abb4 For non-DRM, add NOOPs after BATCH_BUFFER_START to verify completion
In non-DRM mode, the driver waits for the hardware by checking the ring
pointers; when the ring is empty, it assumes the hardware is idle. However,
the hardware updates the ring pointers before executing a command, so if the
MI_BATCH_BUFFER_START is the last command in the ring, the driver will think
the hardware is idle while it may still be processing the contents of the
batch buffer. Placing NOOPs after the BATCH_BUFFER_START allows the driver
to know that the hardware has completed the batch buffer.

Signed-off-by: Keith Packard <keithp@keithp.com>
2008-10-09 18:23:26 -07:00
Keith Packard d09d938bf2 i830 nondrm batch buffer insertion was missing ADVANCE_LP_RING() call
The ring commands to insert a batch buffer to the ring in i830 form were not
terminated by a call to ADVANCE_LP_RING(). This surely would have caused
chaos.

Signed-off-by: Keith Packard <keithp@keithp.com>
2008-10-09 18:23:26 -07:00
Carl Worth d24010b7b3 Disable frame buffer compression by default for GM965.
We haven't found a way to make FBC work reliably with GM965 yet,
(it often fails to notice CPU writes). This appears to be a
specific problem with this device, (as we haven't gotten similar
bug reports for subsequent devices such as GM45). So FBC is
now disabled by default for GM965 but can still be enabled with
the FrameBufferCompression option for experimenting/debugging.

This resolves bug #16257:

	[GM965 EXA] Frame-buffer compression broken for CPU writes (XPutImage)
	https://bugs.freedesktop.org/show_bug.cgi?id=16257
2008-10-09 14:32:14 -07:00
Zhenyu Wang 4128b01ec8 Remove Lenovo T61 TV quirk
BIOS already says no integrated TV, and this quirk blocks TV
on R61i which has the same subdevice id as T61.
2008-10-09 09:19:41 +08:00
Zhenyu Wang 7457136353 Put forware VBIOS data parsing
i830_bios_init() is called too late after output init, which
makes bios data mostly useless, and caused all TV init fail as
tv_present flag is not set.
2008-10-08 15:36:10 +08:00
Lukas Hejtmanek 111dd151de Fix driver build against server master.
Broken by 3a4151b69d
2008-10-07 10:27:03 -07:00
Eric Anholt 3a4151b69d Fix driver build against server 1.4.2.
This disables UXA and DRM modesetting pre-1.5, due to privates handling
issues.
2008-10-06 17:26:43 -07:00
Eric Anholt 3621183cf4 Fix bios_reader build against old servers.
The server's pci_device structure ends up conflicting with libpciaccess's.
Just don't include the server structure for this non-server tool.
2008-10-06 17:00:29 -07:00
Eric Anholt 080d36648f Add support for RepeatPad and RepeatReflect to 915 and 830-class Render accel. 2008-10-06 17:00:28 -07:00
Jesse Barnes 5e04b5ad1b Merge branch 'master' of ssh://git.freedesktop.org/git/xorg/driver/xf86-video-intel 2008-10-06 16:08:12 -07:00
Jesse Barnes 979bb109c6 Document more VBIOS functionality
Document a few more VBT structures and comment on VBIOS communication a
bit.  There should be enough there now for a sufficiently motivated
developer to start implementing support for hotkeys and other features
on pre-IGD OpRegion machines.
2008-10-06 16:05:46 -07:00
Carl Worth 260cbcfe61 Document and use 'legacy' border color mode
It's very convenient that the hardware supports this non-default
mode since it's exactly what is specified by the Render extension.
This provides a more efficient means of fixing bug #16820:

        [EXA] Composition result in black for areas outside of source-surface bo
        https://bugs.freedesktop.org/show_bug.cgi?id=16820

without the software fallback we had in the earlier fix,
(commit 76c9ece36e ).
2008-10-06 13:22:08 -07:00
Carl Worth 98ca9e2af1 Rename default_color to border_color
This is consistent with the documentation, (and just plain makes
more sense).
2008-10-06 13:22:08 -07:00
Carl Worth 175b30e382 Revert "Fallback to software for RepeatNone with transformed RGB-only pictures."
This reverts commit 76c9ece36e.

We've learned a new technique that should let us avoid this fallback
to software. See following commit.
2008-10-06 13:22:07 -07:00
Shuang He 21cce1998a Fix a typo in G965 texture video code 2008-10-06 09:48:21 +08:00
Carl Worth 76c9ece36e Fallback to software for RepeatNone with transformed RGB-only pictures.
We wish it wouldn't, but the hardware ignores the alpha in the
BorderColor we set when the source picture format has no alpha
in it, (and it uses alpha of 1.0 where we want 0.0). For now,
fallback for these cases. This gives a correct result, but
obviously is not as fast as we would like.

This fixes bug #16820:

	[EXA] Composition result in black for areas outside of source-surface bounds
	https://bugs.freedesktop.org/show_bug.cgi?id=16820
2008-10-02 20:40:14 -07:00
Eric Anholt f1dbc266cc Work around libpciaccess reporting a 0 rom size by guessing.
I required the following patch on top of this to work around libpciaccess
brokenness.  libpciaccess reports 0 rom size if there's no rom resource,
even if the rom file exists in sysfs.
2008-10-02 14:45:12 -07:00
Keith Packard 8304b405e0 Eliminate INT10 call to get BIOS contents
libpciaccess (and the old X server PCI code as well) provides a function to
get the ROM contents. Code to use that was already present in the driver and
used if the INT10 function failed. Skip the INT10 and just use libpciaccess
as that eliminates several module loads and scary use of vm86.

Signed-off-by: Keith Packard <keithp@keithp.com>
2008-10-01 16:39:01 -07:00
Carl Worth ab2b70f831 Prefer repeatType field over using both repeat and repeatType.
Eric informed me that the repeat field exists only for backwards
compatibility with old drivers that weren't prepared for values
other than 0 or 1 here. Since we are, we can just ignore that
field and examine only repeatType. So the code's a (tiny) bit
simpler this way.
2008-10-01 16:05:16 -07:00
Carl Worth 128223ee9b Add support for RepeatPad and RepeatReflect.
It's quite simple to support these modes---we simply need to
turn on the support for them in the hardware.

These changes have been verified with the extend-pad and
extend-reflect tests in cairo's test suite. However, this
currently required using a custom-modified version of cairo.
The issue is that released versions of cairo, (and even
cairo master so far), don't pass RepeatPad and RepeatReflect
to Render, (due to various bugs and workarounds in cairo
and pixman). I do plan to fix those issues in cairo, so that
in a future release of cairo, (1.8.2 perhaps?), the cairo
test suite will usefully test these new repeat modes in our
driver.
2008-10-01 15:33:04 -07:00
Carl Worth b7279f1be1 Examine picture repeatType as well as repeat field.
The existing switch statement was switching on the Boolean
repeat field rather than the correct repeatType field. This
had not caused any problem before as only two possible repeat
values were supported (RepeatNone = 0 and RepeatNormal = 1)
so they were always the same as the repeat field.

Soon, however, we'll be supporting more repeat types, so we'll
need to switch on the correct value.
2008-10-01 15:33:04 -07:00
Jesse Barnes ffcbbb071f Merge branch 'master' into xf86-video-intel-2.5-branch 2008-09-30 16:59:35 -07:00
Jesse Barnes bf8a3ffeaa Revert "Use -Werror by default"
This reverts commit f315e9d1ad.  The world
isn't ready for a warning free build.
2008-09-30 16:59:02 -07:00
Jesse Barnes 1eb46d055b Merge branch 'master' into xf86-video-intel-2.5-branch 2008-09-30 12:54:27 -07:00
Olivier Fourdan 497b7420c4 Fix ordering of VGA vs. plane disable
From the Intel 965 Programmer’s Reference Manual, volume 3,
chapter 2.2.2 "Mode Switch Programming Sequence".

The disable sequence should be:

 - Disable planes (VGA or hires)
 - Disable pipe
 - Disable VGA display in 0x71400 bit 31

This patch implements that order plus waits for a vblank at the end.

Fixes bug #17756.
2008-09-30 12:53:11 -07:00
Jesse Barnes a4568740ee Be more verbose about panel data in VBIOS dumper
Dump more panel data, including number of expected entries.  Had to
refactor things a bit, but now each function should get size information
so further checking can be added more easily.
2008-09-30 12:48:32 -07:00
Jesse Barnes fa2586a40f Use VBT LFP info pointers by default
On some machines it appears that the LFP info pointers give us more
accurate panel info than if we index into the LFP data table using the
panel type index.  Early reports indicate that using the pointers
doesn't cause regressions, so switch to them by default to help 8xx
machines.

Fixes bug 17310 (and hopefully 17658 too).
2008-09-30 12:46:20 -07:00
Jesse Barnes f315e9d1ad Use -Werror by default 2008-09-30 12:07:52 -07:00
Jesse Barnes f082e877d5 Work around gcc uninitialized variable warnings
GCC isn't smart enough to analyze the control flow and figure out that
these are false positives, but initializing them shouldn't hurt, so work
around it.
2008-09-30 12:06:46 -07:00
Keith Packard 836d24f2cc Use uintptr_t instead of uint64_t to hold pointer value 2008-09-29 19:02:51 -07:00
Zhenyu Wang 11d304e99c Bug #16631: add option for SDVO force detect
Some ADD2 card doesn't get SDVO detect status setup right,
which disabled outputs on those cards. This adds a new
option "ForceSDVODetect" to probe all SDVO ports anyway.
2008-09-28 10:08:26 +08:00
Zhenyu Wang 1cc15ba454 Render register clock gating disable fix on 4 series chipset 2008-09-26 10:01:52 +08:00
Zhenyu Wang d6b2696f9a Do force CRT detect sequence twice on 4 series chipset 2008-09-26 09:53:03 +08:00
Zhenyu Wang d8a007b056 Bug #16515: Fix VT switch with DVI on G45
On DVI, centered VGA mode is used instead of native mode VGA, and
PLL on pipe is used instead of VGA PLL setting. So make sure PLL
settled down in restore time.
2008-09-26 09:44:59 +08:00
Jesse Barnes a428892b76 Update supported hardware list 2008-09-23 12:36:11 -07:00
Jesse Barnes 8408995ffb Merge branch 'master' into xf86-video-intel-2.5-branch 2008-09-22 18:38:54 -07:00
Bryce Harrington afa630b448 Add TV out quirk for HP Compaq nx6110
Adds a TV out quirk for HP Compaq nx6110.  Fixes bz #17683.
2008-09-22 18:38:35 -07:00
Jesse Barnes 204a6281aa Revert "Add no TV out quirk for HP Compaq nx6110"
This reverts commit 6a46022df5.  It should have
been attributed to Bryce.
2008-09-22 18:38:03 -07:00
Jesse Barnes d18b86aa7f Merge branch 'master' into xf86-video-intel-2.5-branch 2008-09-22 18:03:39 -07:00
Jesse Barnes 6a46022df5 Add no TV out quirk for HP Compaq nx6110
Hopefully we can fix the VBT parsing code so we don't need this, but for the
time being it seems necessary.  Fixes bz #17683.
2008-09-22 13:26:58 -07:00
Jesse Barnes 10909d9b66 Add Cappuccino SlimPRO SP625F to no LVDS quirks list
Looks like this platform might contain VBTs that indicate an LFP is present
even though it isn't.  Intended to fix bz #11368.
2008-09-22 13:11:55 -07:00
Jesse Barnes 9a7da65e62 Merge branch 'master' into xf86-video-intel-2.5-branch 2008-09-22 09:59:52 -07:00
Zhenyu Wang 2f93cfbc7e Fix output detection for DVI-I
For CRT this trys to probe all possible port for EDID and
detects got confirmed by EDID's d/a type bit.
For HDMI/DVI, also using EDID d/a type bit to ensure it should
handle the connect or not.
2008-09-19 15:20:55 +08:00
David Schleef 1fbe4d6028 Bug #17277: fix upscaling limit
Oh duh (i830_video.c):

        /* Clamp dst width & height to 7x of src (overlay limit) */
        if(drw_w > (src_w * 7))
            drw_w = src_w * 7;

	if(drw_h > (src_h * 7))
            drw_h = src_h * 7;

The condition I see in the documentation appears to be src_h/drw_h < 8, that
is, src_h < 8*drw_h.  It appears this was "fixed" incorrectly in e784e152.
It seems difficult to believe that this limitation would exist at all for the
texture unit.
2008-09-18 15:37:00 +08:00
Zhenyu Wang bc36608e32 Check display stride limit when allocate front buffer 2008-09-18 10:42:33 +08:00