Commit Graph

1318 Commits

Author SHA1 Message Date
Dave Airlie 6b2ae93506 sdvo: add support for RGB outputs on SDVO
This lights up my monitor VGA-1 - it doesn't look the best though
2007-06-15 23:30:04 +10:00
Eric Anholt 671ba03bef Fix and enable the 915-class planar textured video path. 2007-06-13 16:30:26 -07:00
Eric Anholt 6c29e0bae5 Improve the drm_i915_flip_t check. 2007-06-13 13:40:39 -07:00
Eric Anholt 420e41e792 Revert "Replace failure-prone configure test for fresh libdrm with a simple ifndef."
This reverts commit c2b130354a.

Sadly, a non-working DRM_IOCTL_I915_FLIP already existed.
2007-06-13 13:34:26 -07:00
Eric Anholt 51612e5ac3 On hang, dump up to the head pointer, not just up to the tail. 2007-06-12 16:09:54 -07:00
Eric Anholt ceb6dd7244 Fix context switching between DRI and X.
Now, all 3D pipeline consumers in the driver just call
IntelEmitInvariantState(), which handles basic state setup, the caching of that
state setup, and notifying DRI clients.  This also removes a mistaken idle
wait in the Render code which was papering over the brokenness in the context
switching.
2007-06-12 10:04:39 -07:00
Eric Anholt c2b130354a Replace failure-prone configure test for fresh libdrm with a simple ifndef. 2007-06-12 08:50:14 -07:00
Eric Anholt 0e1deb607f Fix a typo in _3DSTATE_DEPTH_SUBRECT_DISABLE definition.
This is already fixed in the definition in the 3d driver.
2007-06-12 08:43:39 -07:00
Eric Anholt 8d7a0ccd4f Clean up some nits in i915_video.c setup.
- The screen dimensions were used for the clipping despite drawing being done
  to any pixmap, not necessarily the screen.
- One piece of state setup was not documented anywhere, and isn't used in other
  3d hardware paths that also work.
- A 3DSTATE_MODES_1 command (830-class only) was issued even though it no
  longer exists.
2007-06-12 08:43:39 -07:00
Keith Packard 15caa64a49 Add description for how to use the frame and pixel counter registers.
The 24-bit frame and pixel counters were not described in detail and
will be useful for DRM.
2007-06-08 18:44:28 -07:00
Wang Zhenyu 404fd47573 Enable overlay on G33 class chipsets
Which have to use gfx vm offset fot setup overlay regs.
2007-06-06 11:01:48 +08:00
Wang Zhenyu f4c05973d3 Add support for the G33, Q33, and Q35 chipsets.
These chipsets require that the hardware status page be referenced by an offset
in the GTT rather than a physical memory address, so the X Server allocates it
rather than the DRM.
2007-06-05 11:34:22 -07:00
Eric Anholt 36fcaeb2ef Fix misplaced merge of 1280x768 panel fixup. 2007-06-05 11:22:58 -07:00
Keith Packard 8a19e7d57b Always ensure the pipe A is lit when activating overlay on pipe B.
Ok, so moving video from pipe A to pipe B still requires that pipe A be
active during the transition. Instead of trying to be fancy, just ensure
that pipe A is running on each transition to pipe B.
2007-06-05 00:09:57 -07:00
Keith Packard e986f6cb62 Automatically switch overlay when crtcs are reconfigured.
As crtcs are disabled and enabled, make sure the automatic crtc selection
mechanism drives overlay configuration at each request to display an image.
2007-06-04 23:52:23 -07:00
Wang Zhenyu 0984c1fc09 Add pci ids for 945GME 2007-05-31 10:19:31 +08:00
Wang Zhenyu 88ee25ebad Add pci ids for 965GME/GLE chip 2007-05-31 10:19:31 +08:00
Keith Packard 92e4deb50e Extend XV_PIPE range to include new -1 value 2007-05-30 11:49:07 -06:00
Wang Zhenyu 888a4a5f46 Fix i965 render's draw clip rectangle
Use scrn's virtual size is not correct in rotation rendering.
This fixes initial rotation problem on i965.
2007-05-30 14:42:35 +08:00
Eric Anholt 516fb73ffe Remove README statement that 830M panels are unsupported. 2007-05-29 11:07:51 -07:00
Eric Anholt 72462568da Expand manpage description of outputs supported. 2007-05-29 11:07:51 -07:00
Eric Anholt 906b974bfe Add a fixup to LVDS panel mode detection for 1280x768 panel from text mode.
Apparently some BIOSes will program a small mode with large blanking instead of
using the pannel fitter.
2007-05-29 11:07:50 -07:00
Keith Packard 4b27812918 Mark IVCH as connected when detected 2007-05-27 23:17:24 -07:00
Keith Packard 2a365eab01 On i830, Pipe B cannot be lit the first time unless Pipe A is running.
I don't understand it, but just like the video overlay, if Pipe A is not
running, Pipe B will not turn the first time it is activated. This
patch restructures the code used for the video overlay to share it
with the crtc commit function.
2007-05-27 12:35:55 -07:00
Keith Packard ff8c8cb869 Compute and clip to crtc before call to xf86XVClipVideoHelper.
By clipping to the crtc ahead of time, xf86XVClipVideoHelper will
correctly clip to the bounds of the crtc, eliminating the need for any
custom crtc clipping.

Also, replace the broken xf86XVFillKeyHelper with a private version that
doesn't end up stuck with the wrong clip list when the root window changes
size.
2007-05-25 20:29:59 -07:00
Keith Packard 33f635d79f Ensure Pipe A is active when enabling overlay the first time.
The overlay on the i830 appears to be clocked by Pipe A when being enabled.
If pipe A is not running, it will freeze the overlay and blank the screen.
Setting a random mode on the Pipe and turning it on fixes this problem
nicely.
2007-05-25 17:32:06 -07:00
Keith Packard ff0ac8ea63 Xv does not require directRendering 2007-05-25 17:26:15 -07:00
Keith Packard 109e5d597b Clean up CRTC selection. Remove more overlay blocking.
Create separate CRTC selection function, use ints instead of floats for
coverage measurement. Remove pipe stalls waiting for overlay update.
2007-05-24 11:40:50 -07:00
Keith Packard dfb1ec9a07 Eliminate blocking for video overlay.
No need to block for the overlay; just use the idle buffer.  This will
always work because the buffer switch occurs at vblank time, so there is
always plenty of time to get the next buffer contents in place before it
starts getting scanned to the screen.
2007-05-24 11:23:44 -07:00
Keith Packard d172344599 Reformat i830_video.c to four-space indents.
Yes, I can't stand it anymore. it's a huge patch, but
git-diff -w shows no changes.
2007-05-23 20:47:53 -07:00
Keith Packard 02935ced3f Clean up overlay management.
Create separate on/continue/off functions for overlay.
Manage overlayOn boolean within those functions.
Eliminate redundant management code in other routines.
2007-05-23 20:47:52 -07:00
Keith Packard 08753f9b79 Use FLIP_CONTINUE with ~OVERLAY_ENABLE to turn overlay off.
This makes the overlay work on i830 with the modesetting driver. I don't
know why the pre-modesetting driver worked without this, but it did.
A more 'correct' fix would be welcome, but this does seem to do the trick.
2007-05-23 20:47:52 -07:00
Keith Packard aa187186dc Automatically select crtc based on coverage.
By default, select crtc based on which one covers more of the video output.
pipe property can be used to override selection when both have partial
coverage.
2007-05-23 20:47:52 -07:00
Keith Packard f5017a06a2 Use CRTCs instead of pipe indices for video pipe selection.
Replace pipe indices with crtc indices and store references to the xf86Crtc
objects in the video private structure.
2007-05-23 20:47:52 -07:00
Keith Packard 2df87256df Dump pending ring on crash.
When the hardware locks up, dump the pending commands in the ring for
analysis.
2007-05-23 20:47:52 -07:00
Michel Dänzer 9971fac876 i830: Provide new DRI texOffsetStart hook when available with EXA. 2007-05-22 10:46:39 +02:00
Michel Dänzer 5390a2e261 Update vblank pipes when a pipe gets disabled. 2007-05-18 17:51:36 +02:00
Wang Zhenyu 4120a20626 EXA: add render enter helper function
That notify mesa rendering is smashing the state, and check last 3d
operation to do sync after we're swapped in or others.
2007-05-18 10:10:34 +08:00
Wang Zhenyu 8db28aeaa6 Fix ring debug code
Use proper unsigned type for timer variables, and try to dump 965G state.
2007-05-18 09:54:34 +08:00
Wang Zhenyu 16e50a91dd EXA: remove a flush cmd in i915 render code 2007-05-18 09:53:36 +08:00
Keith Packard 12a9fcfe1b Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/driver/xf86-video-intel 2007-05-17 15:11:29 -07:00
Keith Packard e89d5f2754 Make each output control clones/crtcs. Split DVO into LVDS, TMDS, TV.
Move clone/crtc config into each output where it's easier to understand (no
need for a switch statement in I830PrepareOutputs. Also, split DVO into
three sub-types (TMDS, LVDS, TVOUT) as those have different cloning
abilities.
2007-05-17 15:00:12 -07:00
Keith Packard a441954630 Enable panel fitter on ivch DVO.
Using BIOS source code as a guide, set up the panel fitter on the ivch. This
involves setting the pipe to the panel fixed mode, the DVO to the source
size and assigning vertical and horizontal scaling factors in the ivch
itself.
2007-05-17 14:11:49 -07:00
Keith Packard c0daa0a982 Change DVO module interface to pass more state across. Fix IVCH display.
The DVO module interface reflected most of the xf86Output API to the
underlying functions; finish that work given the changes that have since
occurred in the xf86Output API.

Move the LVDS-specific code into the IVCH module and make that work on the
Thinkpad X30 (an i830-based laptop). Panel scaling does not work yet.
2007-05-16 14:02:00 -07:00
Keith Packard b28817a87a Add i830_bios_get_aim_data_block to read AIM data from BIOS
Add-in modules have per-module data in the BIOS which contains configuration
information which cannot be entirely discovered.
2007-05-16 13:59:36 -07:00
Keith Packard b31bef1a8e Deal with i830 CRT load detection which cannot use FORCE_BORDER.
Chips newer than the i830 can force the border color for the active period
of the screen, allowing the load detection to easily see the right data. In
addition, newer chips appear to have more sensible load detection hardware
which either ignores inactive periods on the screen or performs some
longer-term averaging. The i830 appears to provide unfiltered samples of the
detected load.

For the i830, then, emit a border at the bottom of the screen and, for load
detection, simply turn it purple and wait for the current line to be within
the border. Sample an entire scanline, counting the number of times the load
detection sees a monitor. In my testing, the presence of a monitor will
cause the detection to succeed every time, while the absense will cause it
to fail about 75% of the time. The code here, checks for presence at least
75% of the time, which should be adequate.

Also, as the new mode configuration code has already taken care to enable
the CRT output, eliminate much of the load detection code which is simply
duplicating functionality from the general mode setting code. This should
result in faster load detection as this code will now run in no more than
one frame time. It does burn the CPU the whole time though, polling the
displayed scanline register.
2007-05-12 20:04:31 -07:00
Eric Anholt b930bb9d6d Disable vblank interrupts when no DRI clients are running.
(cherry picked from commit 6621dd71ada839f4c1742e9e5b272e924cee21d9)
2007-05-03 13:55:37 -07:00
Eric Anholt 3b769af53e Disable vblank interrupts when no DRI clients are running. 2007-05-03 13:54:19 -07:00
Dave Airlie 775fc125aa i810: be a bit more verbose about disabling DRI 2007-05-03 20:59:39 +10:00
Eric Anholt 34f362d099 Fix typo s/i/index/ in LoadPalette for depth 16.
Reported by:	Haihao Xiang <haihao.xiang@intel.com>
2007-05-02 15:43:17 -07:00