Commit Graph

2728 Commits

Author SHA1 Message Date
Keith Packard e5e0fb846b Call down to lower CloseScreen before shutting down DRM allocator
Lower level functions will destroy objects that are managed by the DRM
allocator, so make sure those are done before the allocator shuts down.

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-05-01 12:26:04 -07:00
Keith Packard cfb98f3da9 Revert "Leave allocator running until lower-level CloseScreens are done"
Uh, oops -- the FD used to talk to the kernel is closed before the
allocator_fini function is called now.

This reverts commit 1872869e6f.
2009-05-01 12:23:32 -07:00
Keith Packard 11a853bd8e Hold reference to video binding table until all rects are painted.
The optimization of unreferencing the binding table when the relocation is
posted causes the object to be dereferenced for each box in the clip list,
causing general chaos in the buffer manager. It's easier to just hold a
reference to the object until all of the boxes are painted and then drop it.

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-05-01 11:55:13 -07:00
Keith Packard ed492131c1 3D_STATE_VERTEX_BUFFERS takes four 32-bit values, not three.
The spec says this command takes an extra (mbz) 32-bit value, so let's
provide it with one.

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-05-01 11:54:48 -07:00
Keith Packard 66d1536a2e Don't bother to enable VF statistics during 965 video playback
This was used while bringing up the driver to debug vertext fetches.

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-05-01 11:54:42 -07:00
Keith Packard 1872869e6f Leave allocator running until lower-level CloseScreens are done
The lower level close screen functions will free allocated objects, causing
a crash if the allocator isn't still available.

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-05-01 11:54:32 -07:00
Keith Packard 1142353b48 intel_batch_start_atomic: fix size passed to intel_batch_require_space (*4)
intel_batch_start_atomic takes an argument in 32-bit units, and so it must
multiply that by 4 before passing it to intel_batch_require_space, which
takes an argument in bytes.

We should figure out what units we want to use and use the same everywhere...

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-05-01 11:54:26 -07:00
Keith Packard 8232177a00 Allow cursors to roam past 2048x2048 limit.
There's no reason to clip cursor positions to an artificial limit; the
hardware cursor limits always mirror the hardware display limits.

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-04-30 15:30:05 -07:00
Carl Worth 417f3784b7 Add doltlibtool to DISTCLEANFILES
Otherwise make distcheck fails.
2009-04-28 20:42:22 -07:00
Carl Worth bc9a688476 NEWS: Add notes for 2.7.99.1 snapshot 2009-04-28 20:37:13 -07:00
Kristian Høgsberg a90cab4320 Remove a handful of pointless comments
CVS keywords, comments about how the source was once reformatted,
and the ad-hoc changelog comment in in i830_driver.c
2009-04-28 13:27:53 -04:00
Eric Anholt c231b41f3f Remove checks for xf86RotateFreeShadow, introduced in server 1.4. 2009-04-27 17:06:00 -07:00
Eric Anholt e5133a94dc unifdef LIBPCIACCESS and XSERVER_LIBPCIACCESS.
Depending on new server means these are always present.
2009-04-27 17:05:59 -07:00
Eric Anholt 4653a7db62 Rely on BO pixmaps being present in acceleration paths. 2009-04-27 17:05:59 -07:00
Eric Anholt 1784efc1f0 Remove XF86DRM_MODE.
We now depend on server 1.6 and current libdrm, so no need to ifdef it.
2009-04-27 17:05:59 -07:00
Eric Anholt d82ea4372f Replace I830Sync's irq emit/wait code with bufmgr use.
This pre-GEM code was all sorts of broken -- see intel_bufmgr_fake.c for
the hoops that must be jumped to use that kernel interface successfully.
Yet we continued to use it even with KMS/DRI2/UXA, which may account for
some hangs.
2009-04-27 17:05:59 -07:00
Eric Anholt 612c1f1f18 Remove I830_XV ifdef.
The developers of the driver don't ever run or test without XV.  Don't do it.
2009-04-27 17:05:59 -07:00
Eric Anholt af6892f2b8 Replace i830WaitSync with just I830Sync(), as nearly all callers had it wrong.
People were trying to BEGIN_BATCH()/ADVANCE_BATCH() then i830WaitSync on the
results, which wouldn't necessarily wait and lead to various painful bugs,
since only EXA called MarkSync and only for certain rendering operations.
2009-04-27 17:05:59 -07:00
Eric Anholt 393abc15b7 Now that video destination pixmaps are always in BOs, no more MarkSync. 2009-04-27 17:05:59 -07:00
Eric Anholt dc71573292 Remove can_resize, which is now always true (except when a bug interfered) 2009-04-27 17:05:59 -07:00
Eric Anholt 96df22740b unifdef I830_USE_UXA.
We only have on acceleration architecture now, and you can always build it
if you're building the driver.
2009-04-27 17:05:59 -07:00
Eric Anholt fa81ae1637 Remove EXA support.
UXA has completely replaced EXA at this point.  UXA is the same rendering
core as EXA, but relying on kernel memory management or a fake bufmgr instead
of trying to manage memory in the X Server.
2009-04-27 17:05:59 -07:00
Eric Anholt 1b10745a25 Remove XAA support.
While EXA/UXA aren't completely good replacements (see bugzilla for
performance and stability problems), we are pretty sure at this point that
it's the right way to go and that having multiple acceleration architectures
is getting in the way of producing a stable codebase.
2009-04-27 17:05:59 -07:00
Eric Anholt 30c226eeb3 Remove DRI1 support.
This was blocked on wide distribution of X Server 1.6 (now in the current or
next version of major distributions) and solutions for a couple of significant
architectural problems (vblank sync and frontbuffer rendering, which we now
have code or good plans for).

This includes disabling XVMC which is DRI1-only currently.
2009-04-27 17:05:55 -07:00
Eric Anholt 47591334a1 Remove pre-server-1.5 support. 2009-04-27 16:50:34 -07:00
Eric Anholt 3187c7698b Fix assert at startup with DRI initialiation failure.
In this path, we'd make it to allocator_init -> init_bufmgr without
GEM and without FbBase being initialized, leading to assertion failure
to catch this mistake.

Comedy ensued when trying to move just the MapMem up, leading to the rest
of the commit.  Some day (like tomorrow after I rebase intel-cleanup) I'll
clean this path up.

Tested with 2 X Servers on 2.6.28 (one gets DRI2, one fails successfully),
2 UMS X Servers on 2.6.30rc2 (each gets DRI2), and 2 KMS X Servers on
2.6.30rc2 (success all around).
2009-04-27 16:32:25 -07:00
Eric Anholt fbaf13c935 Don't clear the framebuffer if it isn't currently bound.
This segfault can be triggered in non-KMS memory init before the EnterVT,
and will happen anyway at EnterVT time.
2009-04-27 16:32:25 -07:00
Eric Anholt ab878118b9 Don't initialize DRI2 if the fd we get is not master-capable. 2009-04-27 16:32:25 -07:00
Eric Anholt 385ac2197b Fix drmSetMaster/DropMaster error messages. 2009-04-27 16:32:25 -07:00
Pierre Willenbrock 5b05a589ef format == 0 means "use default" in I830DRI2CreateBuffer
Reviewed-by: Ian Romanick <idr@freedesktop.org>
2009-04-27 12:00:49 -07:00
Eric Anholt e55d943126 Don't try to do anything for I830Sync when VT switched.
Fixes a crash with fake bufmgr and UXA.
2009-04-27 11:19:00 -07:00
Shuang He 9748aa5594 Free front buffer bo when X exit
It's needed when KMS or DRI2 is enabled, or there will be memory leak.
Also fixes a segfault at startup with fake bufmgr.

Signed-off-by: Eric Anholt <eric@anholt.net>
2009-04-24 16:48:25 -07:00
Alan Coopersmith b8ca146b06 Fix UXA to build with Sun compilers (use __func__ instead of __FUNCTION__)
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2009-04-24 16:04:13 -07:00
Ian Romanick 5d6f4f6eb7 DRI2: If the SDK supports it, use the DRI2GetBuffersWithFormat interfaces
If DRI2INFOREC_VERSION is defined in the server's dri2.h and has a
value greater than 1, compile to use the CreateBuffer and
DestroyBuffer interfaces.  The format parameter parameter to
CreateBuffer is assumed to be the bits-per-pixel of the buffer.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kristian Høgsberg <krh@redhat.com>
2009-04-24 12:53:16 -07:00
Zhenyu Wang 106e4b44c5 SDVO: switch bus once for i2c transfer
Before sdvo try to get edid by i2c bus, it must do switch control bus to ddc active state from sdvo only state.
However if current state has been ddc active state, redundant switch operation in our driver will cause error-
"Unable to write to SDVOCTRL_E for SDVOB Slave 0x70". The patch will do switch control bus only one time during
whole edid transmission.

It has fixed bug #19937

Signed-off-by: Zhenyu Wang <zhenyu.z.wang@intel.com>
Tested-by: Ma Ling <ling.ma@intel.com>
Signed-off-by: Ma Ling <ling.ma@intel.com>
2009-04-24 10:55:09 +08:00
Shaohua Li 8f64837e56 Disable FBC on IGD for UMS
It appears the new chip doesn't support FBC currently.

Signed-off-by: Shaohua Li<shaohua.li@intel.com>
Signed-off-by: Zhenyu Wang <zhenyu.z.wang@intel.com>
2009-04-24 08:54:09 +08:00
Eric Anholt 7b01aa5cc4 Revert "fix overflow warning on videoRam"
This reverts commit 08ebde4715, which was
apparently untested and broke KMS.
2009-04-22 09:07:12 -07:00
Zdenek Kabelac ceb3a2eaf9 Remember allocated offscreenImages memory for freeing it in CloseScreen()
Signed-off-by: Zdenek Kabelac <zkabelac@redhat.com>
[anholt: renamed the member to match the variable name]
Signed-off-by: Eric Anholt <eric@anholt.net>
2009-04-21 19:54:21 -07:00
Zdenek Kabelac 701c6bef14 free allocated name inside sdvo_destroy
Signed-off-by: Zdenek Kabelac <zkabelac@redhat.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
2009-04-21 19:54:21 -07:00
Zdenek Kabelac fe71217ca8 Unreference allocated bos in i965 render error paths
Signed-off-by: Zdenek Kabelac <zkabelac@redhat.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
2009-04-21 19:54:14 -07:00
Zdenek Kabelac b8b6ca830b Fix leak of some 965 render state on VT switch.
Signed-off-by: Zdenek Kabelac <zkabelac@redhat.com>
[anholt: fixed up unneeded != NULL checks]
Signed-off-by: Eric Anholt <eric@anholt.net>
2009-04-21 18:48:45 -07:00
Albert Damen d7ca870e1c Fix crash with XV with large virtual display
If a virtual display with width > 2048 is used, the first time
an XV buffer is needed will result in a BadAlloc error message,
but the next time X would crash.

Signed-off-by: Eric Anholt <eric@anholt.net>
2009-04-21 16:53:50 -07:00
Eric Anholt 04ed92e3db Remove dead xoffset/yoffset from pre-randr. 2009-04-21 15:28:59 -07:00
Eric Anholt ab2c988767 Remove dead monitor detect debugger.
watch xrandr works fine.
2009-04-21 15:28:59 -07:00
Eric Anholt 928a37041d Replace a bunch of #ifdef debug flushing/syncing with a single function.
This removes it from a callsite where it would have just resulted in a
fatalerror.
2009-04-21 15:28:55 -07:00
Eric Anholt 1fc93ee184 Staticize a bunch of functions and variables in the driver.
This cleans up findstatic.pl output for the i830+ code, which resulted in
removing some code.  The only odd part of this commit is the
if (0) i830_sdvo_dump() in i830_sdvo.c -- it tells the compiler that the code
is used, without using it since we want the code around while debugging.
It's also in a likely place to ask for the dump, so I think it's OK.
2009-04-21 15:25:58 -07:00
Eric Anholt b2d7928f19 Use a static inline to replace if (0) to an unused stub function. 2009-04-21 15:25:58 -07:00
Eric Anholt 093f51646b Remove unused i830_output_type_names 2009-04-21 15:25:58 -07:00
Eric Anholt c774ef282b Remove dead mono cursor load code. 2009-04-21 15:25:58 -07:00
Eric Anholt 75c531b965 Rename EXA rendering functions to UXA, since we're keeping them post-EXA. 2009-04-21 15:25:58 -07:00