Commit Graph

2338 Commits

Author SHA1 Message Date
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
Eric Anholt 40dbba5cf7 Remove some dead i830.h struct members. 2009-04-21 15:25:58 -07:00
Julien Cristau 84f69081ab Require xserver 1.3
I don't think anyone tests this against an old server anymore.

Signed-off-by: Eric Anholt <eric@anholt.net>
2009-04-21 15:25:58 -07:00
Zhenyu Wang 08ebde4715 fix overflow warning on videoRam
Note that pScrn->videoRam is an 'int'.

i830_driver.c: In function ‘I830ScreenInit’:
i830_driver.c:3019: warning: overflow in implicit constant conversion

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
2009-04-20 09:43:09 +08:00
Ian Romanick 5a07ab502f DRI2: Respect the src and dst parameters of CopyRegion.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2009-04-17 20:59:04 -07:00
Robert Lowery 4b5edde5da Fix typo in comment
Thanks to Robert Lowery for the sharp eyes on this one.
2009-04-15 18:03:31 -07:00
Carl Worth 506c810f8f Clarify that the default acceleration is UXA if KMS is available.
Stale documentation considered harmful of course.
2009-04-15 16:10:52 -07:00
Li Peng 9b615a5267 Turn on front buffer tiling in KMS.
This code disabled front buffer tiling in KMS. Turn it on since kernel
handles all tiling now, this improves performance of x11perf -aa10text
from 97k to 286k on my 945GME.

Should help with #20761, if not totally fix it.

Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Li Peng <peng.li@intel.com>
2009-04-13 12:45:41 -07:00
Ma Ling 62ba7211fe set broadcast RGB mode for integrated HDMI output. 2009-04-13 14:30:45 +08:00
Ma Ling 69388953ce set broadcast RGB mode for HDMI and TMDS from SDVOX output
Almost all digital TVs accept broadcast RGB values from 16 to 235 for each channel,
otherwise for those uncompensated videos, when RGB values are set from 0 to 255,
they will shows black and whiter clamping, which seriously degrades picture quality.
The patch will enable the broadcast RGB mode for hdtv according to user's setting.
It fixed bug #14486
2009-04-13 14:29:44 +08:00
Jesse Barnes 7e516b6d24 Silence warning in i830_dmi_store_field
Just add a dummy ret variable to shut up gcc.
2009-04-08 17:01:57 -07:00