Commit Graph

834 Commits

Author SHA1 Message Date
Keith Packard 2330b341c9 Prune default modes to EDID clock limit.
Pick out the EDID max clock value and use that to elide default modes which
are too fast.
2006-12-30 22:47:58 -08:00
Keith Packard c70e7bc701 Merge branch 'modesetting-origin' into modesetting 2006-12-30 21:58:36 -08:00
Keith Packard 8b6c456e16 Detect in ProbeModes. Let get_modes set edid. Prune interlace/dblscan.
Move output connection status detection from RandR code up to ProbeModes so
it is done before mode sets are built. Otherwise, the mode building code
will elide all modes the first time through as it ignores outputs that are
disconnected.

Most get_modes functions fetch EDID data; make sure that any
EDID changes are used in the ProbeModes filtering of default modes.
Otherwise, stale EDID data will be used.

Allow outputs to advertise support for interlaced and double scan modes;
prune such modes from the default mode list when outputs do not support them.
2006-12-30 21:57:42 -08:00
Eric Anholt 4ed79a2ba6 Relax tiling requirements on G965.
For the 965, we can tile with the pitch at any integer multiple of a tile size
(128 or 512B), up to 128KB.
2006-12-29 12:19:41 -08:00
Keith Packard b8692e6462 Lack of configured monitor implies no configured modes.
Missing check for missing monitor configuration would result in segfault.
2006-12-28 22:23:16 -08:00
Keith Packard 973da65421 Sync ranges from EDID/default should not limit configured modelines.
Limit the effect of sync ranges so that sync ranges found via EDID will not
eliminate modes explicitly added by the user. Limit default sync range to
eliminating only default modes, not configured or EDID modes.
2006-12-28 22:22:22 -08:00
Keith Packard f7b1d4c1f7 Belinea 10 15 55 monitor quirk - override preferred mode with largest @60Hz
Belinea 10 15 55 model monitor reports a preferred mode of 640x350, when in
fact it wants a 1024x768 mode @ 60Hz. Add an edid quirk that selects the
largest size mode, preferring those closer to 60hz among equal sized modes.
2006-12-28 22:18:57 -08:00
Eric Anholt bedab1654e Remove 8MB/32MB default VideoRam limits.
With modern monitors and increased XV and EXA memory requirements, these small
limits were resulting in DRI and other initialization failures because we
wouldn't allow them enough memory.  Instead, allow each piece of the system
(DRI, EXA, XAA, etc) to request as much memory as it wants, and choose the
actual videoRam to be used for laying out the memory afterwards.

With this change, in the absence of a VideoRam option, 32MB will be allocated
for textures.
2006-12-28 16:44:30 -08:00
Keith Packard 4cc5dcf6d7 Oops, dont use symlinks for stolen xf86 header files 2006-12-28 16:43:39 -08:00
Keith Packard 86da0d05e4 Add stolen xf86 header files to driver source 2006-12-28 16:40:54 -08:00
Keith Packard 2b0a997e5b Merge branch 'modesetting-origin' into modesetting 2006-12-28 16:34:38 -08:00
Keith Packard bb238a8fc2 Configuration support: per-output mode lines, preferred mode.
Add the modelines specified in the per-output monitor and all of the default
modes to the list to each output. Prune the resulting list to specified sync
limits and virtual sizes. Sort the resulting mode list on
preferred/size/refresh.
2006-12-28 16:27:22 -08:00
Eric Anholt 9cfbf1ceda In EXA mode, force backing pixmaps into memory when doing XV to them. 2006-12-28 12:59:37 -08:00
Eric Anholt e889bde13d Draw textured video to the backing pixmap in the composited case.
Currently, when the backing pixmap is not in framebuffer, we just BadAlloc
rather than drawing garbage to the front buffer.  This can be fixed with EXA.
2006-12-28 12:49:24 -08:00
Eric Anholt c7083a6f30 Add WIP CH7017 LVDS driver. This is disconnected because it's untested. 2006-12-28 12:16:48 -08:00
Eric Anholt 778db49616 Add WIP IVCH (i82807aa) driver.
It is not currently hooked up as it hasn't been tested.  The hardware that this
was written for decided to stop working.
2006-12-28 11:45:52 -08:00
Eric Anholt 5806f670eb Reformat the DVO drivers table to be a bit more normal style. 2006-12-28 11:42:02 -08:00
Eric Anholt b928cef9cd Move dvo driver detection into i830_dvo_init(), and use GPIOB for LVDS drivers.
The documentation states that GPIOB is (generally) used for devices on DVOA
on the motherboard, which appears to be the case on the laptop we have with
LVDS on the motherboard.

This patch is probably not entirely accurate, as there was apparently an LVDS
DVO card sold that could be put in desktop machines, which would likely be on
GPIOE like other ADD cards.  Given that we couldn't find one of these cards for
purchase, I'm not worrying about it.
2006-12-28 11:41:46 -08:00
Eric Anholt c87462ded2 Remove the nasty #define away of ErrorF in i830_video.c.
Every new person touching this file hits this trap, so it's now removed.
2006-12-27 19:14:14 -08:00
Eric Anholt 6dc3387219 Fix operator precedence issue that stuck 965 t-v state into the front buffer. 2006-12-27 18:59:13 -08:00
Eric Anholt 210f30bd75 debugging for location of various 965 textured-video state. 2006-12-27 18:57:50 -08:00
Eric Anholt 82738e6076 Fix discrepancy between XAA/EXA linear allocations that broke EXA XV.
The XAA allocator returned an offset from the beginning of the frontbuffer
allocation (where the linear allocations come from), while EXA returned one
from the start of framebuffer.  Now, both of them use the start of framebuffer
as the reference.
2006-12-27 18:35:35 -08:00
Eric Anholt 8165e04367 Bump the size of the extra space for 965 so it actually fits. 2006-12-27 18:17:37 -08:00
Eric Anholt f830c55e5f Make the assert() in i965_video.c actually work and expose an error. 2006-12-27 18:14:59 -08:00
Eric Anholt a75b416c91 Replace XAA mark/waitsyncs with the XAA/EXA wrappers. 2006-12-27 17:58:57 -08:00
Eric Anholt 150010d2f2 reformat i965_video.c to 4-space indents, 80 columns, no trailing whitespace. 2006-12-27 17:57:34 -08:00
Eric Anholt 05066632b0 Move 965 textured-video out to a separate file. 2006-12-27 17:41:45 -08:00
Eric Anholt 46df75ccd4 Bug #7524: Major improvements to EXA/XAA static memory allocation.
With this, we no longer allocate XV through the XF86 linear allocator in the
EXA case.  We also no longer allocate extra space for the XF86 2D allocator
that we don't use in EXA mode, or space for the EXA allocator in XAA mode.
The EXA offscreen allocator now gets enough space for several screenfuls of
pixmaps plus one 1920x1088 movie.

A large duplicated section of code for allocating each framebuffer in the old
dual-screen mode was also factored out.
2006-12-27 13:54:22 -08:00
Keith Packard 84915ac8af If DDC detailed modes are missing physical size, pull from features.
Monitors without detailed modes, or those which do not bother to set a
physical size in their detailed modes may still have physical size in the
global data.
2006-12-21 23:42:53 -08:00
Keith Packard 1e9105395a Merge branch 'modesetting-origin' into modesetting 2006-12-21 23:34:30 -08:00
Keith Packard df9ecf8ab9 Change belinea edid quirk to cover the 10 20 30W model as well.
This larger model reported different (but still incorrect)
sync polarities, so instead of flipping them, just set them to the right
value.
2006-12-21 23:32:35 -08:00
Keith Packard c237e93061 Use Vesa DDC timeouts for all I2C busses.
The default I2C timeouts are very short, and while most
modern monitors have no trouble responding at that rate,
some older ones cannot manage.
2006-12-21 23:30:37 -08:00
Keith Packard d8c5dba4d7 When cleaning duplicate modes, make sure ->Last is reset correctly.
When removing the very last mode for a monitor, move the ->Last pointer to
the previous list element.
2006-12-21 21:20:43 -08:00
Keith Packard fab9a6b621 Add EDID quirk support for broken EDID data.
For EDID with known errors, add a quirk mechanism to automatically
compensate. The first quirk is for a Belinea 1440x900 monitor which
incorrectly specifies sync polarities in the detailed mode.
2006-12-21 21:19:32 -08:00
Keith Packard d9b27667e6 PLL computations missed one possible 'm2' value.
m2 was ranging from min <= m2 < max instead of <= max resulting in
inaccurate PLL frequencies for some modes.
2006-12-21 21:17:03 -08:00
Keith Packard 4c0c1aa882 Computed corred color conversion values.
Extract correct color conversion values for all video formats from
documentation. Use those, with appropriate conversions, for the color
conversion register values.
2006-12-21 02:33:39 -08:00
Keith Packard 98fd44d681 TV subcarrier was computed from wrong clock value.
The constants provided in the documentation for the subcarrier DDA values
assumed the clock was programmed to precisely 108MHz, but the PLL can't hit
that value exactly (or our PLL computation can't, in any case). The
result was an incorrect subcarrier frequency which resulted in synthetic
subcarrier phase shift and a lovely rainbow effect on the screen.

Unfortunately, the documentation didn't exactly describe the function
performed by the subcarrier clock hardware, so a bit of detective work was
needed. New constants were computed using the code in tv.5c and those, along
with lots of other values from the documentation were inserted into the
necessary tables.

The result appears to generate stable NTSC video on the svideo connector.
2006-12-21 01:24:24 -08:00
Keith Packard 4ba72fc408 Reinitialize DGA mode list whenever we update the global list.
DGA has a copy of the current mode list (yes, this is broken).
Regenerate it whenever the ddx mode list changes.
2006-12-19 22:39:57 -08:00
Keith Packard c28075e1d7 TV output I830OutputPrivate had wrong type (crashed in SetMode).
TV output private type field was set to I830_OUTPUT_SDVO instead of
I830_OUTPUT_TVOUT. When DGA mode setting occurred, the sdvo output debug
code would be invoked and attempt to dereference sdvo-specific bits of the
private structure leading to a segfault.
2006-12-19 21:53:10 -08:00
Keith Packard 2ef4c5e8f6 Re-initialize physical screen size only if -dpi was passed.
Physical screen size from the config file or DDC will already
be set correctly in the screen structure, unless it was computed from the
virtual size using the -dpi command line option. Recompute physical size as
we reset the screen size if the -dpi option was used.
2006-12-19 16:45:39 -08:00
Keith Packard b00951a5c8 Merge branch 'modesetting-origin' into modesetting 2006-12-19 16:22:04 -08:00
Keith Packard 05cd921140 Align textured video dither matrix to window 2006-12-19 16:21:46 -08:00
Eric Anholt c0a0ddc0ce Bug #9382: Save the CRTC's desired mode in the old RandR 1.0 mode set path. 2006-12-19 16:07:14 -08:00
Keith Packard 3c86fdda1d Turn on dithering for 915 textured video 2006-12-19 15:53:07 -08:00
Eric Anholt 293ad158ec Remove 8k framebuffer stride restriction on 965.
Also, clean up the message if the limitation is hit.
2006-12-19 14:35:51 -08:00
Eric Anholt ff1223142a Only erase curMode in i830DisableUnusedFunctions when the CRTC is disabled.
This bug resulted in broken xinerama, among other issues.
2006-12-19 12:49:55 -08:00
Daniel Stone 3b5703c7fa Respect the srcdir. 2006-12-19 09:49:49 -08:00
Eric Anholt d89e211b12 Disable configure-disabled outputs before mode setting.
We're not supposed to turn off pipes/planes/dplls with outputs attached, which
we could have done before this.
2006-12-19 09:46:35 -08:00
Eric Anholt 3fc9feec7b Simplify i830DisableUnusedFunctions() by using the CRTC dpms routines. 2006-12-19 09:42:17 -08:00
Keith Packard 7b8056e3e3 Writing 1 to I2C line means to tristate the bus so others can manipulate it.
We were forcing bus lines to 1 which was breaking DDC for some monitors.
Instead, make the PutBits function just tristate when writing 1 bits.
2006-12-19 01:32:54 -08:00