Commit Graph

736 Commits

Author SHA1 Message Date
Eric Anholt 85de8a0580 Include render.h to get SubPixelUnknown define. 2006-12-06 20:26:53 -08:00
Keith Packard 182d2f503a Merge branch 'modesetting-origin' into modesetting 2006-12-06 17:18:58 -08:00
Eric Anholt 6777d8044d Harmless warning fix. 2006-12-06 17:10:06 -08:00
Eric Anholt c6ce8a3c33 Reduce dumpregs to X startup, after a mode set, and LeaveVT.
While here, remove some other register dumping that is better done by
i830DumpRegs().
2006-12-06 17:08:30 -08:00
Eric Anholt b23dec37b2 Save/restore registers around calls in PreInit with register side-effects. 2006-12-06 17:08:30 -08:00
Eric Anholt d3c21c09e3 Remove stale i830_tv_pre_set_mode. Replaced by generic dpms hook call.
Also replaced by not spamming unrelated ADPA register.  At least, it had sure
better not be related.
2006-12-06 17:08:30 -08:00
Eric Anholt 9c3e733aaa Save/restore more TV registers. 2006-12-06 17:08:30 -08:00
Keith Packard d5ec9d2160 Cannot modify DPLL register in output mode_set function.
DPLL register contains clock setup, so it cannot be written
from the output mode_set function or 'bad things' happen.
2006-12-06 14:44:40 -08:00
Keith Packard 5d345c13a9 Clean up SDVO multiplier debug output 2006-12-06 13:19:58 -08:00
Keith Packard 6ee63364f5 Merge branch 'modesetting' into nonrandr-setup
Also, fix buffer overflow in i830_debug.c
2006-12-06 12:53:22 -08:00
Eric Anholt b75ecdb483 Merge branch 'generic-mode-set' into modesetting 2006-12-06 11:59:33 -08:00
Eric Anholt b3bb10e33e Fix LVDS: Don't change bits in LVDS other than port enable/pipe select.
This behavior matches what we did before when LVDS worked.
2006-12-06 11:53:40 -08:00
Eric Anholt 47d07b1073 More LVDS fixed mode fixing: use the EDID DTD's blank length. 2006-12-06 10:56:38 -08:00
Eric Anholt 727bf1cbf7 Add missing newlines to new debug output. 2006-12-06 10:12:49 -08:00
Eric Anholt 236c53be5d Fix LVDS fixed mode code after generic-mode-set. 2006-12-06 10:10:27 -08:00
Wang Zhenyu 1cb6311c11 fix typo in checking xf86CrtcScreenInit return 2006-12-06 16:31:00 +08:00
Keith Packard 56f7119415 Use xf86 structures for default config instead of RandR.
To avoid requiring RandR 1.2 in the X server, use the
xf86 Crtc and Output structures as the basis for the default configuration
computation (and, eventually, the config-file based configuration as well).
2006-12-06 00:13:57 -08:00
Keith Packard ffd8aacbe7 new server APIs are not in server-1.2 (version 7.1.99.2) 2006-12-05 19:48:39 -08:00
Keith Packard a736496114 Capture VGA registers sooner so checks are more informative 2006-12-05 19:47:04 -08:00
Keith Packard 62fba80d3e fix up misleading comment in i830_crt.c about border register 2006-12-05 19:43:41 -08:00
Eric Anholt 1d94ec7de3 Fix ordering of PIPE[AB]SRC debug output to be (x, y). 2006-12-05 18:22:59 -08:00
Eric Anholt eee23fdd0d Fix copy'n'paste-o of the ordering of h/v fields in DSP[AB]SIZE. 2006-12-05 18:19:49 -08:00
Eric Anholt 58c247c6de Merge branch 'modesetting-origin' into modesetting
Conflicts:

	src/i830_display.c
2006-12-05 15:28:21 -08:00
Eric Anholt 0b4c3e7bff Add a bunch of per-register debug code to i830DumpRegs(). 2006-12-05 15:03:48 -08:00
Eric Anholt 7844e576e7 Move reg dump from i830PipeSetMode to after we set up the modes with RandR. 2006-12-05 14:39:24 -08:00
Eric Anholt e777d38ce9 WIP code to move mode set sequencing to XFree86 handlers.
It compiles.  It definitely doesn't run.
2006-12-05 12:15:34 -08:00
Keith Packard 2e8c927f93 Re-create RandR Crtc/output structures on server regen.
RandR structures must be re-created when the server reinitializes,
but the driver PreInit function is not re-invoked. Recreate them
manually in this case during ScreenInit.
2006-12-04 14:02:30 -08:00
Keith Packard 677c454469 Merge branch 'modesetting-origin' into modesetting 2006-12-02 23:28:38 -08:00
Keith Packard 8fcf9a8117 DOUBLE_WIDE mode for high pixel clock 8xx. Rewrite PLL search.
High pixel clock modes on pipe A of an 8xx chip require
DOUBLE_WIDE mode. It's supposed to be modes > 180MHz or so,
but the board I have requires DOUBLE_WIDE mode for clocks > 108MHz
or so. The limit is related to the core clock speed of the chip, which
can be found indirectly through PCI config space. None of the possible
values explain why this board needs this mode for these relatively low
clock rates though.

Also, create tables of data for the PLL computation and use them
instead of code. I think it's cleaner looking. It is also untested on
9xx. It'll work. Really.
2006-12-02 22:58:31 -08:00
Eric Anholt 81dde11d41 Fix copy'n'paste-o from restructure-outputs that resulted in crashes.
Our driver private is stored in the bus that we set up, not the DDC device
that xf86 code does.
2006-12-01 13:29:08 -08:00
Eric Anholt a504e31f0f Don't try to write the read-only PP_STATUS register.
Also, don't bother reading the PP_CONTROL register to try to get LVDS status --
that's what PP_STATUS is for.
2006-12-01 12:50:09 -08:00
Eric Anholt f21230d3e1 Add the [ax]4r4g4b4 source picture formats. 2006-12-01 12:50:09 -08:00
Keith Packard 16f9a56070 TV output exists on all 9xx chips except for 915G 2006-12-01 10:50:27 -08:00
Keith Packard e603cd0c73 Leave detected TV status alone when no free CRTC is available.
Yes, this means not detecting TV hotplug when two outputs are
already running. An alternative would be to turn off one of the other
outputs temporarily, but that would cause flashing. Something to consider.
2006-12-01 10:08:36 -08:00
Keith Packard ec30356d95 Do output detection before any crtc allocation.
Some output detection requires a crtc for load detection, perform all of the
output detection before allocating any crtcs so that there will be a free
crtc for any load detection. Avoids losing TV detection when two monitors
are connected.
2006-12-01 10:06:29 -08:00
Keith Packard 7642da8278 When CRTC is disable through RandR, the mode is NULL. Don't dereference it.
Correctly interpret mode == NULL as CRTC disable, make sure the CRTC is
disabled in this case.
2006-11-30 23:21:39 -08:00
Eric Anholt de50ca9ed9 Tristate the clock/data pins during GPIO when released while getting values.
While the register is laid out suggesting that you can read a low value while
driving the output high, and the I2C spec seems to indicate that you should be
able to as well, and on some hardware this works successfully, on the i865 and
perhaps some other chips it doesn't.  So, if we're not holding the clock or
data pin low during GetBits, tristate the pin so that we can successfully read.

This fixes i865 analog (VGA) DDC so it successfully sees slave acks.

Also, improve the I2C bit-banging debugging.
2006-11-30 17:57:28 -08:00
Eric Anholt 8c44556408 Preserve some GPIO bits that the docs tell us to. 2006-11-30 15:57:02 -08:00
Eric Anholt 28401b25cc Add debug code for the bit-banging I2C implementation. 2006-11-30 15:45:13 -08:00
Keith Packard ff64bc7397 Merge branch 'restructure-outputs' into modesetting.
Outputs and Crtcs now have a driver-independent representation which should
permit generic code to control RandR 1.2 and startup configuration.
2006-11-30 14:09:31 -08:00
Keith Packard 16e01b117b Oops. Don't try to use xf86RandR names, use xf86RandR12 instead.
Attempts to override functions in core server fail, so use
new names instead.
2006-11-30 11:55:29 -08:00
Keith Packard bcf206ff17 Merge branch 'restructure-outputs-origin' into restructure-outputs 2006-11-30 11:39:56 -08:00
Keith Packard 27ca1c17aa Rename I830 randr functions to xf86 as they are becoming generic.
Change function names, create separate i830_randr.h header file
to contain definitions.
2006-11-30 11:39:37 -08:00
Eric Anholt b94b7c4bcf Merge branch 'exa' of ../xf86-video-intel into modesetting
Conflicts:

	man/i810.man
	src/Makefile.am
	src/i830.h
	src/i830_driver.c
	src/i830_rotate.c
	src/i830_video.c
2006-11-30 09:15:30 -08:00
Eric Anholt b6fc8df9a5 Properly detect the GTT size on the G965.
In the past, the GTT has always been sized just large enough to map the whole
graphics aperture.  However, apparently on the G965 that isn't the case, and
it is actually 512KB on hardware with a 256MB aperture.  This resulted in X
not bothering to allocate memory for 256KB that it thought was already mapped
into stolen memory, and thus garbage rendering (particularly visible in large
video modes that displayed this unallocated memory).  The kernel happens to
get the right answer by hardwiring a 512KB GTT size already, but that may not
be true on future hardware.

Instead, we use a convenient field in PGETBL_CTL that's specifically for the
GTT size rather than the aperture size, which gets us the answer we want.
2006-11-29 15:06:32 -08:00
Eric Anholt 359dc81c07 Revert "Don't allocate stuff in the first 256K of video memory (GATT?)"
This reverts commit 997e8c9bb4.

The GTT is definitely located at the end of stolen memory.  This commit
apparently worked around mis-estimation of the GTT size.
2006-11-29 15:02:45 -08:00
Eric Anholt 9e4e7d4fa2 Conditionally compile old-server compatibility code in.
This also replaces calls to compat code with the real names of the functions,
and slips #defines to an i830-namespaced version in when doing compat.
The current server version (7.1.99.2) is still left as requiring compat code,
since the version hasn't been bumped yet.

This also fixes some failures to call the compat code, and some failures to
actually compile the compat code.  Oops.
2006-11-28 16:37:46 -08:00
Eric Anholt 8d9ba2405d sparse cleanups (use NULL instead of 0 for pointers) 2006-11-28 15:44:06 -08:00
Eric Anholt dbb8135e10 Remove printing of the XFree86 screen mode list, and some other detritus. 2006-11-28 13:21:31 -08:00
Eric Anholt e8fb40ab10 Replace custom DDC mode list code with a copy of the X Server's.
The X Server now has most of the mode helper functions we want, and we can
start removing compilation of our copies when the server is new enough.
2006-11-28 11:17:21 -08:00