Commit Graph

68 Commits

Author SHA1 Message Date
matthieu
78d8060203 One more fix for new vgaHW ABI. 2012-05-06 10:38:50 +00:00
matthieu
f252027f1e Fix for new vgaHW ABI. 2012-05-06 09:24:42 +00:00
oga
563a654b98 Mostly fix rotation in the intel driver.
Since recent(ish) changes we can allocate roatated framebuffers with tiling.
This was not taken into account. Fix this for the most part:
1) i830_display_tiled needs to check tiling on rotated buffers too.
2) PipeSetBase needs to not only set offset to 0 for roated shadow buffers, it
also needs to 0 DSPTILEOFF x/y too.

There seems to be a remaining issue with damage or similar causing some latency
on rotated screens, I have not managed to find this yet.

Tested by sereral on tech@ ok matthieu a couple of weeks ago (his mail slipped
though the cracks, hence late commit).
2012-03-13 22:44:44 +00:00
matthieu
16bbf25500 Explicitely disable DRI on SandyBridge and above chipsets. It doesn't
work anyways, so prevent X from crashing. ok oga@
2012-01-31 07:47:28 +00:00
kettenis
13f8f43bf4 Add support for Sandy Bridge. Not perfect yet. Most notably 3D acceleration
is completely absent, and playing video doesn't work yet.  But support for
"normal" 2D stuff is pretty solid and it is really nice to be able to use
my laptop at the panel's native resolution and be able to suspend and resume
the machine.

tested by some
2011-12-21 21:25:02 +00:00
matthieu
70f1880f97 regen 2011-12-14 17:00:08 +00:00
oga
b932741cf2 Some files (used for generating other stuff) that I missed in the last commit.
Oops.
2011-11-29 12:41:53 +00:00
oga
1431ee95fe Update the intel driver to a more recent version based on more recent
upsteam code.

Backporting keeping UMS changes by me, some bugfixes from kettenis@.

Has been in snapshots for a while, committed on request so we can be
sure what people are running. This is a prerequesite for sandybridge
support but has those chipsets disabled for now until the correct code
has been added.
2011-11-29 12:39:02 +00:00
matthieu
bc1d244792 Let the intel driver build with xserver >= 1.10.
Reminded by shadchin@ ok oga@
2011-09-13 19:31:42 +00:00
matthieu
be5ccdb873 Avoid dereferencing a NULL pointer during VT switches when composite
is active.

Fix confirmed to fix observed crash by dcoppa@ canacar@. ok marco@.
2011-02-11 21:01:55 +00:00
martynas
7ed4db88f1 remove annoying is lvds / is crt errorf calls
ok fgs@ matthieu@ oga@
2010-08-25 20:29:35 +00:00
oga
1cf6df0168 Update the intel driver to (mostly) a backport of 2.12.
It is missing a few commits that I have yet to verify (ones that try and
continue if we lock the gpu rendering engine and can't reset it, for
example) taht will be verified and sent out for extra testing soon.

Should contain a bunch of speedups and some correctness improvements
(though rendercheck still gives some errors that I am looking into).

This has been in snaps since the first day of c2k10, any known issues
with just this driver have (to my knowledge) been fixed since. A problem
with macbooks pointed out by otto happens with both this and the in-tree
driver and thus doesn't stop this moving forward.

As well as the 2.12 improvements, this driver also has a backport
(partially aided by the backports in RHEL 5 kindly provided by Dave
Airlie) from the kms code of modesetting support for ironlake (arrandale
and clarkdale: the IGDs build into intel nehalem cpu dies) which has
been tested on a number of chipsets. Note that Display port and eDP
displays have not yet been worked on (and probably won't until I can
find a displayport monitor), but VGA and lvds at least are known to
work, sure beats vesa.

"no objection on my side" matthieu@, prodding (as always) from princess
marco.
2010-07-18 14:47:47 +00:00
oga
c7812d078a Pull in the changes in rendering that I skipped when i backported
changes from later intel versions (after the UMS removal). 95% of this
is the xvmc reworks that makes that code even halfway sane. xvmc is now
enabled by default on 965+.

Tested by many on tech@, thanks!

ok matthieu@
2010-05-23 21:28:34 +00:00
oga
7587a41589 Disable Framebuffer Compression on 915GM and 945GM.
While this feature at best can save 05w idle power, it is very flakey. Disabling
it fixes (or at the least masks) the problem that some 915 and 945 users were
seeing where they ended up with a blank screen (it turns out that no problems
fired because everything was still working, just FBC screwed up and never
actually scanned out the framebuffer).

As some examples for reliability linux with kms has disabled fbc on these
chipsets due to some unreliability issues (especially over suspend). and the
window driver apparently also does not used it.

Tested by kettenis@, Tom Murphy, edd@ and myself.

ok matthieu@
2010-05-22 23:53:55 +00:00
oga
acc721c423 *sigh* there is always one (in this case two).
These files were missing from the last commit. (due to shuffling the cvs
diff between old driver and new one was 155246 lines, so two files isn't
that bad...)
2010-05-10 22:35:08 +00:00
oga
ec5c2469da Update the intel driver to 2.9.1 plus backports.
2.9.1 is the last version of the intel DDX that supports UMS (User
modesetting), with 2.10 onwards being purely KMS only. As such, this
driver contains backports of almost every correctness or performance
related fix to the rendering layer in later intel drivers. This driver
*REQUIRES* a GEM enabled kernel. it claims to support non-gem mode but
this is essentially unmaintained and due to the way the abstraciton
works is slow, if it works at all (it often does not). You have been
warned.

tested by many many people on tech over the last few weeks.
2010-05-10 22:32:28 +00:00
matthieu
9ac8837d36 Make it possible to build drivers with the newer proto headers. ok oga@. 2010-04-13 19:56:37 +00:00
oga
691e04d2ba Here's a really good idea: when preparing for a vt switch the intel
driver idles the ringbuffer, stops it, unbinds all memory, then hands
back off.

Now here's the clever bit: just before we call to idle the ringbuffer
(which sleeps waiting for an interrupt) let's TURN OFF THE FUCKING
INTERRUPT. That's a great idea, really, isn't it?

Move the interrupt disable to *after* stop_ring. Theo's T61 VT switches
again.  everyone elses' intel stuff worked by magic (or shared
interrupts) before now.

Fixed after discussion with deraadt@, thanks to miod for suggestions.
2010-04-07 18:22:00 +00:00
oga
928f6b4517 Fix a segfault in X for a clipped movie window.
ok matthieu@

Original commit message from barry scott to upstream:

 Author: Barry Scott <barry.scott@onelan.co.uk>
 Date:   Tue Jun 23 14:14:50 2009 +0100

     Fix segv for clipped movie window

     When playing a movie that is clipped on its left and right edges the
     Xorg server will SEGV sometimes. This is because the intel driver
     ignores the clipping info when it copies the planes out of the XV
     data.  The check for the optimised copy was wrong to ignore the
     width required.  Which leads to too much data being copied by the
     memcpy. It the source buffe happens to end exactly on a page
     boundary the server will SEGV.

     As we reviewed the code we checked the calculation of src1, src2 and
     src3.  The patch includes additional comments to make it clear what
     the elements of the calculation are.

     This bug exists in git head and we also see it in 2.4.1.
2009-12-14 14:21:54 +00:00
oga
f0cd9e3a73 backport a bugfix from upstream:
Fix 945GM VT switch in UMS

	Bug #19578. We should set private intel_crtc state according to
	current, as fail to do so pipe A needs active won't be taken
	care of. Also make sure pipe swap operation always set during VT
	switch.

This also fixes the *other* x40 lid problem (which happens when you suspend,
then you shut the lid in dont'-suspend-on-lid mode.

the reasoning for the PipeA quirk I finally found:

	On some platforms, the firmware may read & write GPU registers
	on lid close, suspend/resume time or during various SMM events.
	If one of the graphics pipes is disabled at that time, the GPU
	may hang due to the programming dependencies of the various
	registers.

So essentially, without this patch, if you have this quirk and you shut
the lid, you're hosed, but y'know drivers in userland are great. So are
BIOS writers.

requested by deraadt@, who keeps getting this issue when he's on a plane.
2009-09-10 02:30:26 +00:00
matthieu
7370432720 Remove compat directories that are not needed here. ok oga@. 2009-08-25 19:08:29 +00:00
oga
5f44320c03 Pull in some code from 2.8 and current so that dri2 works correctly with
xserver 1.6.2. When dri2 is not in use, this commit does nothing.

ok matthieu@
2009-08-06 16:02:07 +00:00
oga
9a5da84da5 Since we don't accelerate trapesoid rendering under uxa yet anyway
software rasterise them THEN put them into buffer objects.
read-modify-write of graphics memory is expensive.

2.5x speed increase under heavy trap rendering measured.

Another upstream backport. ok matthieu@
2009-07-18 15:02:51 +00:00
oga
2b56f07bde Don't put glyphs pixmaps into buffer objects under uxa.
in the fastpath they're going straight to the glyph cache anyway and
doing so for small glyphs wastes memory since bos must be padded to page
size.

Backport from upstream (to aid gem development). ok matthieu@
2009-07-18 15:00:09 +00:00
oga
c349058b6d Fallback if we're vt switched and we're using GEM. We're not allowed to
access the hardware in this situation.

Backport from upstream CURRENT.

ok matthieu@.
2009-07-18 14:58:00 +00:00
oga
37a2f39d00 Accessing a pixmap in fallback if the prepare_access() callback failed
is verboten

So don't do it. Treat it the same as every other prepare access call in
uxa.  This patch sent upstream.

ok matthieu@
2009-07-18 14:56:03 +00:00
matthieu
42b052b942 update to xf86-video-intel 2.7.1. Tested by many. 2009-06-25 20:16:43 +00:00
matthieu
af2481e434 Add support to run intel_reg_dumper on OpenBSD. 2009-01-29 17:17:24 +00:00
oga
3b1cf06138 never define XF86DRI_MM after configure. 2.4.x still had the ttm bits
which haven't made it into a released libdrm. This prevents collisions
with the libdrm version just commited (which wouldn't build otherwise).
2009-01-26 23:27:59 +00:00
oga
9ae8285f50 Don't map the mmio region via the drm. This was only passed onto the
mesa dri driver, which hasn't needed this for a while.

ok matthieu@.
2009-01-10 15:06:18 +00:00
matthieu
e7c2896cd2 regen 2008-12-01 20:52:08 +00:00
matthieu
2bf61528e7 xf86-video-intel 2.4.3. Tested by many. 2008-12-01 20:51:41 +00:00
matthieu
bdaa42fb66 Set default acceleration method to EXA, like upstreams. 2008-11-06 22:30:11 +00:00
matthieu
23a2202b5b Disable framebuffer compression for now. Problems noticed by oga@ 2008-10-12 15:25:43 +00:00
matthieu
2a8442d3d6 xf86-video-intel 2.4.2. Has been in snapshots for weeks. Ok oga@. 2008-10-12 15:20:49 +00:00
oga
888e10a743 Use the modeset_ctl ioctl to let the drm know that we're setting the
mode from userland. This means we can switch of the vblank ioctl when no
3d client is using it. Backported from newer ddxen to make use of the
new libdrm.

ok matthieu@
2008-08-26 19:00:32 +00:00
oga
fedaaef822 Don't try and build the memory manager parts for libdrm 2.3.1, this version has
been bumped to 2.4.0 upstream.

ok matthieu@
2008-08-26 14:24:16 +00:00
matthieu
8afab56174 update to xf86-video-intel 2.3.2. Tested among others by okan@. 2008-06-29 20:13:42 +00:00
matthieu
80fa2403ff More files that got added by mistake. 2008-05-22 06:59:23 +00:00
matthieu
3d060c0d86 oops should not have committed this. Noticed by deraadt@. 2008-05-21 20:27:45 +00:00
matthieu
4203da792a Update to xf86-video-intel 2.3.1. Tested by many. 2008-05-21 20:19:51 +00:00
matthieu
67a3a88d68 Update to Intel driver 2.2.1. But change default accelmethod to XAA.
Tested by landry@, oga@, steven@, jakemsr@.
2008-03-30 13:51:30 +00:00
matthieu
bbc31bf586 Introduce bsd.xconf.mk to set default config variables used
at several places in the Xenocara build in a central place instead
of duplicating the checks all over the place. ok oga@.
2008-03-25 23:41:50 +00:00
matthieu
7830df18ed Regen with autoconf 2.59-p2, with AM_SANITY check zapped. 2008-03-15 18:08:24 +00:00
matthieu
420aa0bdcb Fix from X.Org repository pointed out by brad@
Add pipe A force enable quirk for ThinkPad X40
    ThinkPad X40s need this quirk or they'll crash frequently.
2008-02-22 08:26:32 +00:00
matthieu
43e542a007 Merge intel driver version 2.2.0.90. 2008-02-11 20:16:03 +00:00
matthieu
bc47e6dc51 Import intel driver v 2.2.0.90. tested by many, including krw@ kettenis@,
jakemsr@, landry@, beck@ and oga@. Thanks.
2008-02-11 20:09:36 +00:00
matthieu
d33aacaadc Make it possible to build dri support with XENOCARA_BUILD_DRI=yes in
/etc/mk.conf. ok oga@
2008-02-02 17:19:57 +00:00
matthieu
e57147883e regen 2008-01-16 23:25:31 +00:00
matthieu
dc769e8a75 Based on a suggestion and an initial patch by kettenis@, build
both the old i810 and the new intel drivers on i386, and let X
autoconfiguration code choose the one that is used based on the chipset.
Tested by landry@ and a few others.
2008-01-16 23:20:50 +00:00