Commit Graph

2343 Commits

Author SHA1 Message Date
Zhenyu Wang ddedf19f88 SDVO: Switch control bus only before DDC access
Instead of set control bus switch before every i2c start,
just set once before doing DDC. This should eliminate some
encoders returning error during that.
2009-02-13 10:09:42 +08:00
Zhenyu Wang f1ca56e17d SDVO: Fix TV support
As SDVO TV uses SDVO_TVClkIn from SDVO encoder for clock reference,
it needs to generate proper PLL for current input clock. This uses
fixed PLL table from vbios for this. And possible sdvo mulitiplier
has to be setup correctly. This makes TV output stable on my 945GCLF2
board with NTSC-M format.
2009-02-13 10:02:02 +08:00
Zhenyu Wang acde0ef683 SDVO: fix CREATE_PREFERRED_INPUT_TIMING command 2009-02-13 09:53:57 +08:00
Zhenyu Wang 824b2f0c55 SDVO: fix usage for SET_TV_FORMAT and GET_SDTV_RESOLUTION_SUPPORT command
They both needs parameters.
2009-02-13 09:50:45 +08:00
Zhenyu Wang 62c0c2f554 SDVO: fix error in modeline and DTD convert 2009-02-13 09:48:34 +08:00
Zhenyu Wang 37c67088a8 SDVO: check EDID info for DVI-I
For SDVO DVI-I, check EDID info for digital output,
otherwise mark it to be disconnected as analog output
is driven by VGA then.
2009-02-13 09:21:45 +08:00
Zhenyu Wang 38079bc0f1 SDVO: Fix for HDMI encode and audio setup (try 5)
SDVO HDMI encode and audio is not setup in detect,
which fails in hotplug case for HDMI audio. Fix to
check current encode type and set flag for HDMI audio
enabling.

Check and set HDMI encode state in get_modes.
2009-02-13 09:21:45 +08:00
Eric Anholt 3012d85cc5 uxa: Fix breakage from UXA_FALLBACK conversion from "do {} while (0)" construct.
Thanks to keithp for post-commit review.
2009-02-10 18:47:28 -08:00
Eric Anholt 5009127de7 uxa: Fix driver against fbDoCopy -> miDoCopy change in the server. 2009-02-10 18:23:35 -08:00
Eric Anholt b53977f4c5 uxa: Fix failure to --amend in further changes in previous commit. 2009-02-10 18:23:16 -08:00
Eric Anholt 5212ec6515 uxa: hook up the fallback debug to the driver's fallback debug option. 2009-02-10 15:35:20 -08:00
Ma Ling 3aa8591abf Don't disable vga centering bit.
commit id b9f5915ce812144ffd9d2aa42e8ba856129c35e,
which resolved bug #17235, but generate new regression-bug #19715.
This patch intends to resolve bug #17235, and avoid regression as well.
We have successfully re-tested it for bug #17235 and #19715 respectively.
2009-02-06 09:14:15 +08:00
Zhenyu Wang 9fe5fca3fe TV quirk for HP Compaq nx6310 2009-02-04 06:00:39 +08:00
Kristian Høgsberg 5c37009162 Fix front buffer memset() for non-KMS case.
Missed the pI830->FbBase condition when removing the KMS hook.
2009-02-02 12:02:00 -05:00
Kristian Høgsberg 2013799b20 Un-revert the I915_SETPARAM_NUM_USED_FENCES commit reverted by accident.
Oops, my bad.  Reverted 8d4bc36fae
since my kernel doesn't yet have the new param, committed
the revert by accident.
2009-02-02 11:51:50 -05:00
Kristian Høgsberg 127330bfd5 Fix last-minute "cleanup" that broke the patch. 2009-02-02 11:27:51 -05:00
Kristian Høgsberg 0cb87ccfe9 Implement front buffer resize for KMS.
This adds back the resize hook so we can resize the front buffer under
kernel mode setting as well.

The patch also pulls the drmmode_* structs from drmmode_display.h into
drmmode_display.c and eliminates the header file.
2009-02-01 22:28:14 -05:00
Eric Anholt 66bc44e8f9 dri2: Use modesetting's master fd instead of opening our own non-master.
This fixes failure to auth DRI2 clients under KMS.
2009-01-27 15:43:58 -08:00
Jesse Barnes 8d4bc36fae Support tiled back/depth on 915-class hardware with DRI2.
Set alignments, tile settings and flags correctly in the 2D driver to support
tiled rendering.  UXA's create pixmap function currently assumes the worst
about the alignment constraints; that should probably be fixed.  Some of the
1M alignment fixes could probably be done more cleanly as well.
2009-01-27 14:33:43 -08:00
Eric Anholt 6c0ca1676b Don't forget the new state bos in check_aperture.
They're tiny so it shouldn't have been a problem, but play it safe.  This is
another <5% loss on top of the previously reported value, bringing the whole
series to about 8%.
2009-01-27 14:33:43 -08:00
Jesse Barnes 57a02b50c6 Fixup bogus VBT modes when detected
Several VBT modes out in the wild have H or VSyncEnd values greater than
the H or VTotal value.  This clearly ends up creating a bad mode,
causing some panels to either ignore the timing or display some sort of
corrupt image.

Check for these cases and fix them up by default, making things work for
several Dell and Sony machines.

Fixes FDO bug #17292.
2009-01-26 14:58:28 -08:00
Bill Nottingham e20e1cf76f Quirk MSI IM-945GSE-A LVDS, TV outputs.
The IM-945GSE-A claims to have a TV output, and always claims a connected
LVDS output. It has neither.
2009-01-24 08:36:20 +08:00
Vincent Mussard 05ff561234 quirk for AOpen MP45 2009-01-24 08:33:16 +08:00
Eric Anholt fbf003ef27 Move i965 render sampler state to BOs.
This eliminates the pinned memory allocation for 965 render state.
2009-01-21 14:50:58 -08:00
Eric Anholt befd4ad8be Move i965 render kernels to BOs. 2009-01-21 14:50:58 -08:00
Eric Anholt 5d705de5d1 Move 965 render unit state to BOs.
This is a first step in a series of changes to avoid requiring a pinned object,
which gets in the way of doing non-root KMS.  This change appears to result in
about a 2-6% loss in x11perf -aa10text, which better algorithms in libdrm could
make up for (it hasn't really had to deal with code this bad before).
2009-01-21 14:50:58 -08:00
Eric Anholt 64b08ed5ad Remove 965 render wm scratch space, which was just unused. 2009-01-21 14:50:58 -08:00
Eric Anholt f126aabdf8 Fix build with server 1.4.
Debian "unstable" is still stuck with this ancient version.
2009-01-21 12:52:46 -08:00
Jesse Barnes 253b8db298 Don't run in KD_TEXT mode even with KMS
Leaving the VT in KD_TEXT mode keeps the kernel's blanking code active,
so when a DPMS event happens, the fb console is restored rather than X's
configuration.  On the downside it means the kernel won't print messages
in the background, which would be visible if a panic or emergency switch
occurred.  The proper fix here is a new kernel mode, which we can move
to when ready.
2009-01-21 09:02:13 -08:00
Jesse Barnes 131b414feb Tear down batchbuffers unconditionally on LeaveVT
Even if KMS is enabled we should do this, to avoid running batches that
depend on other state we tear down in LeaveVT.
2009-01-21 09:01:05 -08:00
Eric Anholt b6f3ce32e2 Use drm_intel_bo_subdata to put render vb data in.
This improves performance by avoiding repeated map/unmap cycles, which are
a bit expensive on my machine with lock debugging on in the kernel.  It could
do much better if we did more than 18 or so floats at a time.
2009-01-20 10:50:20 -08:00
Eric Anholt 9a8bbb1951 Move i965 render vb setup to use time, and decouple state emit from it.
The require_space had failed since it only checked for the space required
by the batch emits in the function itself, but not in the
i965_emit_composite_state() that it called (the state we were concerned about
having set up for that 12 * 4 dwords to follow!).  This is replaced by
intel_batch_start_atomic(), which will catch such mistakes in the future.
2009-01-20 10:50:20 -08:00
Eric Anholt 3d739597c4 Move i965 render transform setup from emit_composite_state to prepare_composite. 2009-01-20 10:50:20 -08:00
Eric Anholt e20f7278f3 i965: Pull check_aperture out to a separate function and make it dtrt.
Previously it wouldn't count the pixmaps that were about to be used, which
is pretty much the only purpose of having the pain around.  This also
eliminates the check_twice confusion with emit_batch_header_for_composite().
2009-01-20 10:50:20 -08:00
Eric Anholt 013e2adfbf Move filter computation from emit_batch_header to prepare_composite. 2009-01-20 10:50:20 -08:00
Eric Anholt a340fe5e42 Use intel_emit_reloc from video to prettify 965 render bind_bo setup. 2009-01-20 10:50:20 -08:00
Eric Anholt aefe198ca4 Move i965 render state bo setup back to prepare_composite.
We want the objects to be created once per prepare/done both for efficiency and
so we can handle aperture checking better.
2009-01-20 10:50:20 -08:00
Eric Anholt 946c7ef817 Do check_aperture_space and batch_start_atomic for i965 video.
This increases the overhead for video in the presence of cliprects, but we
were already doing nasty things in that case and don't seem to care.  This
could fix potential bad rendering or hangs with video, particularly with
DRI2.
2009-01-20 10:50:19 -08:00
Eric Anholt 7be668179a Move 965 video setup to a separate function so we can move it around. 2009-01-20 10:50:19 -08:00
Owain G. Ainsworth c7db320110 Remove the pageflipping infrastructure.
It was broken on current kernels, and deprecated anyway.
2009-01-20 12:11:01 -05:00
Owain G. Ainsworth c82adfd016 Remove triple-buffering support
It never worked with any upstream linux kernel, and is quite heavily
deprecated. A new solution based around DRI2 will probably be
forthcoming. Pageflipping itself is next.
2009-01-20 12:11:01 -05:00
Kshitij Kulshreshtha ada44c1c0e Support sysfs backlight control for Sony laptops in xf86-video-intel
The sony_laptop kernel module (since v2.6.23) supports backlight control
via the sysfs interface:
/sys/class/backlight/sony

This patch will enable xf86-video-intel to use this backlight control method
for Sony VAIO Laptops with Intel integrated video.
2009-01-20 11:35:36 +08:00
Eric Anholt d89de6d60a Protect i915 textured video against batchbuffer wrapping. 2009-01-17 16:28:12 -08:00
Eric Anholt 15780c53f5 Fix i915 batch_start_atomic counting. 2009-01-17 16:27:50 -08:00
Eric Anholt fc46cb6403 Fix libdrm version number requirement regression that got spammed in. 2009-01-17 12:47:53 -08:00
Dave Airlie 1459f794e2 intel: fix DRI2 should be DRI_DRI2 2009-01-17 22:14:26 +10:00
Eric Anholt db43b7870a Re-emit i915 composite setup when the batchbuffer wraps.
This also introduces tests to make sure that we asked for enough reserved space
and that we don't allow wrapping at the wrong time.

This fixes a hang during text rendering with DRI2 and a GL client running,
but could potentially affect text rendering with GEM in general with an
exceptional batchbuffer setup.
2009-01-16 17:56:03 -08:00
Eric Anholt cab5b7a7b0 Fix invarient state emits for DRI2 (do it per batch, since there's no lock). 2009-01-15 09:31:55 -08:00
Owain G. Ainsworth 9f306193c4 Fix ioctl type.
I915_EMIT_IRQ is a read/write ioctl, not a write only. Found by OpenBSd's
kernel code which checks these things a long more strongly than Linux.
2009-01-14 17:12:33 -08:00
Owain G. Ainsworth 1e8588ad50 use ifdef __linux__ where needed.
since modesetting is compiled by default now, ifdef __linux__ the linux
only includes and ioctls.
2009-01-14 17:12:33 -08:00