Commit Graph

2637 Commits

Author SHA1 Message Date
Keith Packard d655a3ff42 Remove NoAccel support
This removes yet another 'debugging' option that hasn't seen real use in a
long time, and wasn't supported under KMS in any case.

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-07-10 18:26:58 -07:00
Eric Anholt 4e4b947f0b Remove bad comment about 3DSTATE_DRAWING_RECTANGLE size. 2009-07-09 15:52:16 -07:00
Eric Anholt 9155cfca75 Fix lols in trying to figure out whether this is a 64-bit build.
Noticed by:	Michel Dänzer <michel@daenzer.net>
2009-07-09 14:16:07 -07:00
Eric Anholt 40e7c95052 Refuse to allocate giant BOs on 32-bit systems.
The overcommit of address space combined with these buffers hitting SW
fallbacks all the time means that we're probably better off telling the
application "no" instead of likely silently failing later.

Bug #22601.
2009-07-08 08:57:33 -07:00
Eric Anholt 6337cd23e6 Initialize the other argument to drmSetInterfaceVersion.
The kernel ignores it if dd_major is -1, anyway.
2009-07-08 08:57:33 -07:00
ling.ma@intel.com 216d939858 enable sdvo lvds scaling function
Currently we implemented basic sdvo lvds function,
But except for sdvo lvds fixed mode, we can not switch
to other modes, otherwise display get black. The patch
intends to work for all modes whose HDisplay and VDisplay
are lower than fixed mode.

Signed-off-by: Ma Ling <ling.ma@intel.com>
2009-07-08 09:22:40 +08:00
Simon Farnsworth 0402f4f331 Raise XV limit to 2048x2048 to match hardware limits.
The bigrequests limit isn't present in current X servers (tested using
textured video on a 965 with both image and window at 2048x2048 on a
1920x1200 display, and image at 2048x2048, window at 1024x1024).

Remove the artificial limit, enabling full-screen HD video when
rotated.
2009-07-07 15:55:48 -07:00
Keith Packard a663578323 non-DRI FB resize failed to assign the screen pixmap devPrivate.ptr (22328)
When not using DRI, the screen pixmap is not in a bo, and so the usual
enable/disable access functions don't adjust the pixmap devPrivate field,
leaving it to the frame buffer allocation code to assign this correctly.

During mode setting and fb resizing, FB access is disabled, and the
screen pixmap devPrivate is stashed away by xf86EnableDisableFBAccess,
to be restored when FB access is turned back on. This means that we have to
set the pixmap devPrivate.ptr (in case xf86EnableDisableFBAccess doesn't
do this), along with storing the address in the scrn->pixmapPrivate field.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2009-07-07 14:22:50 -07:00
Chris Wilson c889b34e43 Check for a valid I830Ptr before closing master.
After failing to become DRM master, the X server dies attempting to close
the master fd during free:

(EE) intel(0): [drm] failed to set drm interface version.
(EE) intel(0): Failed to become DRM master.
(EE) intel(0): failed to get resources: Bad file descriptor
(EE) intel(0): Kernel modesetting setup failed

Backtrace:
0: X(xorg_backtrace+0x3b) [0x8133a3b]
1: X(xf86SigHandler+0x55) [0x80c7945]
2: [0xb805d400]
3: /usr/lib/xorg/modules/drivers//intel_drv.so [0xb7b4bfcc]
4: X(xf86DeleteScreen+0x6b) [0x80d465b]
5: X(InitOutput+0x548) [0x80b0158]
6: X(main+0x1cb) [0x807220b]
7: /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe5) [0xb7d107a5]
8: X [0x8071881]
Saw signal 11.  Server aborting.
 ddxSigGiveUp: Closing log
 ddxSigGiveUp: re-raising 11
Segmentation fault

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-07-07 18:17:57 +01:00
Keith Packard 705042f497 Handle DRI2INFOREC version 3
This DRI2 version does not support the old CreateBuffers/DestroyBuffers
interface anymore.

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-07-06 13:50:34 -07:00
Keith Packard 2ebc7d32e4 Update to multi-API DRI2 interface
The DRI2 interface was changed to support both old and new drivers in an
API/ABI compatible fashion. This change syncs the intel driver with the new
version of the DRI2 API.

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-07-06 13:50:34 -07:00
Rémi Cardona f6f79eb629 remove unused shader program
This file is not even referenced by any Makefile.am

Acked-by: Zhenyu Wang <zhenyuw@linux.intel.com>
2009-07-06 11:01:31 +02:00
Zhenyu Wang 7e722ada53 Disable FBC on IGDNG
Don't make FBC count for memory allocation.

Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
2009-07-06 16:25:13 +08:00
Barry Scott 7422714192 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 buffer
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.

Barry

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2009-07-02 13:36:56 -07:00
Jesse Barnes c1755599db Clear the bo on the rotate scratch pixmap
Since the scratch pixmap header will be re-used after allocation, we
need to clear its bo attachment when we stop using it, otherwise a later
user will use a bogus bo.

Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2009-07-02 13:08:15 -07:00
Daniel Vetter 324b468620 Xv i830_display_video splitup: extract i830_update_scaling_factors
Just moved the code, no other changes.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2009-07-02 11:10:55 -07:00
Daniel Vetter c2410addbf Xv i830_display_video splitup: extract i830_update_polyphase_coeffs
To slightly clean up the implementation of i830_update_polyphase_coeffs,
introduce the two small helper functions i830_limit_coeff and
i830_store coeffs_in_overlay_regs.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2009-07-02 09:39:58 -07:00
Daniel Vetter 795c11c49c Xv i830_display_video splitup: extract i830_update_dst_box_to_crtc_coords
Just moved the code ouf of line.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2009-07-02 09:24:19 -07:00
Daniel Vetter 4100abdf5d Xv: kill !textured condition
This is in the overlay path and therefore always true.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2009-07-01 15:38:54 -07:00
Daniel Vetter b0df0fe91e Xv overlay: implement GAMMA5 errata
- also ensure that the most significant byte is zero
- while I was looking at the code, add the Overlay suffix to
SetPortAttribute like in the textured case.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2009-07-01 15:38:54 -07:00
Daniel Vetter 5ef4d3cde1 Xv: kill unneeded indirection
overlay and textured video have the exact same QueryImageAttributes
function.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2009-07-01 15:38:54 -07:00
Eric Anholt 1e4784bf26 uxa: Fix segfault on source-only picture usage with FallbackDebug.
Bug #22107.
2009-06-30 19:54:23 -07:00
Zhenyu Wang 7e79fc8aa9 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.

Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
2009-07-01 10:17:01 +08:00
Zhenyu Wang 50392ac823 Load fbcon too if kernel mode setting is checked on
If i915 module has already been loaded and kms check is true,
it would be nice to load fbcon module too.

Signed-off-by: Zhenyu Wang <zhenyu.z.wang@intel.com>
2009-07-01 10:15:45 +08:00
Jesse Barnes 058ad9e6ab Don't try to pin buffers in KMS mode
The only things we try to pin in KMS mode are the cursor objects and
front buffer, and those are taken care of by the kernel anyway, so we
shouldn't even bother trying to pin them (well, not entirely true,
XvMC tries to pin as well, but it needs work w/KMS anyway).

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2009-06-30 16:02:19 -07:00
Jesse Barnes cec9fc6f6c Make KMS set_resource function return TRUE
This is what's expected by the server, and allows the EDID for example
to be exported in the KMS case.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2009-06-30 12:27:59 -07:00
Jesse Barnes 53e248af43 Use DVO timing block instead of fp_timing when parsing LFP data
The KMS side was correct, but the UMS patch was broken.  We need to use
the DVO timing block of the LFP data to get the timing, not the
fp_timing block.

Fixes fdo bug #22529.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2009-06-30 12:02:12 -07:00
Jesse Barnes 362883c2f9 Add a few error messages for DRM initialization
Makes it easier to see where things go wrong.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2009-06-30 12:02:12 -07:00
Zhenyu Wang afac333bef Remove unused packed yuv sampler shader programs
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
2009-06-30 11:12:12 +08:00
Zhenyu Wang 150c9adebc Xv: fix domain usage for binding table on i965+ chips
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
2009-06-30 11:12:12 +08:00
Zhenyu Wang 7770958e42 Add XV support on IGDNG
This brings necessary change for IGDNG for texture video support
from 2D render code.

Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
2009-06-30 11:12:12 +08:00
Xiang Haihao f806fe7d67 Enable 2D composite on IGDNG
This patch enables 2D composite on IGDNG. IGDNG requires
new compiled shader programs for Gen5 and some command changes.
The most notable is the layout of vertex element has changed,
but we tried to keep it as origin to not change shader programs.
Also vertex buffer state requires end address of vertex buffer
instead of origin max index.

Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
2009-06-30 11:12:12 +08:00
Zhenyu Wang 9fb34012f6 Add new compiled shader program for IGDNG
Also check intel-gen4asm tool here for new -g option, which is
required to compile new programs.

Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
2009-06-30 11:12:12 +08:00
Zhenyu Wang 488acc4595 Move shader programs under its own subdirectory
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
2009-06-30 11:12:12 +08:00
Jesse Barnes 170cae0c8d Only get the VBIOS in non-KMS mode
In KMS mode, the kernel takes care of this for us, so don't bother.
2009-06-29 12:55:43 -07:00
Jesse Barnes 6511c08245 Output error info if we fail to get DRM resources
Useful for debugging.
2009-06-29 12:53:51 -07:00
Jesse Barnes 00eb73286c Use swapbuffers_wait control
Commit 1eec83a203, which added the new
SwapbuffersWait option, didn't actually include the code which used it.  So
add a test to DRI2's CopyRegion call, only emitting the scanline wait
command if the swapbuffers_wait option is set.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2009-06-29 09:15:19 -07:00
Zhenyu Wang f53b3239db Disable XvMC on 915G/GM in KMS
These chips require physical address for XvMC surface, which
is not available in KMS case. Instead of crashing X, disable it now.

Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
2009-06-29 13:44:58 +08:00
Jesse Barnes f0270bbb47 Fix i830_crtc_on to only check outputs associated with the given CRTC
Otherwise we may end up returning a false positive if some other output & crtc
are on, but not the one in question, again leading to hangs.

Reported-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2009-06-24 14:42:08 -07:00
Jesse Barnes 5d80e24b5f Treat disabled CRTCs as "not covering" for scanline wait purposes
Now that swapbuffers does a scanline wait to avoid tearing, it's
important to take into account the CRTC status to avoid hangs.  If we
do a scanline wait when the CRTC is off (due to DPMS for example) we'll
hang the GPU.  So add some code to check the CRTC DPMS status to the
i830_covering_crtc function, returning NULL if none of the covering
CRTCs are actually active.  KMS vs UMS logic is hidden in new i830*
functions, cleaning up both DRI2 & video paths a bit.

Fixes fdo bug #22383.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2009-06-24 13:13:07 -07:00
Alan Coopersmith 6d025e679a Harden i830 render in case check_composite didn't throw out bad formats.
Fixes a warning in a static analysis program, and the code's a little
clearer.

Bug #21667
2009-06-23 15:35:41 -07:00
Jesse Barnes 1eec83a203 Add option to control swapbuffers behavior
Until we get triple buffering, we'll want this so users can avoid taking a
performance hit on apps that render slower than the refresh rate.

Fixes fdo bug #22234.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2009-06-23 15:05:03 -07:00
Zou Nan hai bfeeac6de0 i915 xvmc, fix fd.o bug #22103 2009-06-23 11:31:37 +08:00
Jesse Barnes 15af8ea6ab Fix LFP data block fetch
Apparently the proper way to do this is to use the LFP data pointer block to figure out the LFP data block entry size, then use that plus the panel index to calculate an offset into the LFP data block array.

Fixes fdo bug #19450.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2009-06-22 11:13:30 -07:00
Zhao Yakui 534e73ad4f Don't change the blank/sync width when calculating scaled modes
Don't the change the blank/vsync width while doing LVDS scaled modes.
And use the border instead of border minus one.

At the same time, make sure the horizontal border and hsync are even for
the LVDS that works in dual-channel mode. So both horizontal border and hsync
start are also changed to be even, even for the LVDS in single-channel
mode.

https://bugs.freedesktop.org/show_bug.cgi?id=20951

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
2009-06-19 09:37:45 -07:00
ling.ma@intel.com b5cd2130f9 TV: Set correct voltage level override values
We detect TV connect status by setting DAC voltage level override
values as 0.7 voltage for DAC_A/B/C. The corresponding 2-bits shold be 0x2,
In order correctly to set last bit as 0, at first we must clean it.

It fixed freedesktop.org bug #21204

Signed-off-by: Ma Ling <ling.ma@intel.com>
2009-06-17 10:06:02 +08:00
ling.ma@intel.com a6cdcd9fee Set hot plug interrupt to detect HDMI output
We detect HDMI output connection status by writing to HOT Plug Interrupt
Detect Enable bit in PORT_HOTPLUG_EN. The behavior will generate an specified
interrupt, which is caught by audio driver, but during one detection driver
set all Detect Enable bits of HDMIB, HDMIC and HDMID, which generate wrong
interrupt signals for current output, according to the signals audio driver
misunderstand device status. The patch intends to handle corresponding output
precisely.

It fixed fredesktop bug #21371

Signed-off-by: Ma Ling <ling.ma@intel.com>
2009-06-17 10:05:47 +08:00
Bryce Harrington 6b93afc564 add pipe a force quirk for Dell mini
Add quirk to solve issue with black screen and hang occuring after closing the
lid with attached external monitor, on Dell Mini.

Fixes fdo bug #21960.

Signed-off-by: Bryce Harrington <bryce@bryceharrington.org>
2009-06-16 15:37:48 -07:00
Li Peng eb09014ce1 don't wait for vblank on rotated displays
We may hang or wait for the wrong line if the display is rotated, so just skip
the wait in that case.

Fixes fdo bug #22196.
2009-06-16 15:29:57 -07:00
Bryce Harrington 6c56521bdc pipe-a quirk for thinkpad x30
Fixes freeze when closing lid on ThinkPad X30.

Fixes FDO bug # 21976.

Signed-off-by: Bryce Harrington <bryce@bryceharrington.org>
2009-06-16 15:25:53 -07:00