Commit Graph

2728 Commits

Author SHA1 Message Date
Carl Worth ae00a09237 NEWS: Add notes for 2.8.99.902 2009-09-22 15:14:38 -07:00
Matthias Hopf 7e7db7ac53 Add new backlight driver "samsung". 2009-09-22 17:47:14 +02:00
Zhao Yakui 7ae1d0dde6 Skip setting tv format property if output crtc is NULL
When TV is not connected and X start, after plugging TV cable again,
system will crash because output crtc is NULL. This patch will return,
do not handle crtc immediately, meanwhile set value will be effective
until user really enable output by xrandr command.

Signed-off-by: Ma Ling <ling.ma@intel.com>
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
2009-09-22 10:59:00 +08:00
Zhao Yakui 02fe9be695 Check whether the DVI-I/D is connected or disconnected based on EDID
When the monitor is digital type for SDVO-DVI D, there should exist the EDID. If
there is no EDID, it should be detected as disconnected.

Signe-off-by: Zhao Yakui <yakui.zhao@intel.com>
2009-09-22 10:58:38 +08:00
Chris Wilson 762e406d13 Revert "8xx: Fallback for any non-affine transformation."
This reverts commit 505025053d.

In theory, the non-affine paths work -- at least for the stated test case,
so re-enable them and avoid the slow work-around.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-09-22 01:36:09 +01:00
Keith Packard 2cc1f3cb60 i8xx: Format projective texture coordinates correctly.
Projective texture coordinates must be delivered as TEXCOORDFMT_3D
using TEXCOORDTYPE_HOMOGENOUS. This meant selecting the correct type
in i830_texture_setup, the correct format in i830_emit_composite_state
and sending only 3 coordinates in i830_emit_composite_primitive.

Signed-off-by: Keith Packard <keithp@keithp.com>
[ickle: tweaked to fix up a couple of use-before-initialised]
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-09-22 01:30:59 +01:00
Chris Wilson 00e8de212b Check the correct Picture for error during creation. 2009-09-22 01:27:25 +01:00
Keith Packard bd817e2d73 Split i915/i830 composite_emit_primitive into two functions.
The i915 and i830 take similar but different data when emitting the
primitives, instead of trying to share code here, just split this
apart and avoid potentially breaking things later on.

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-09-21 17:24:11 -07:00
Keith Packard 5e80297d08 Remove DGA support from the driver.
The xf86DiDGA code required that the scanout buffer always be
mappable, stay be at a fixed address in the aperture and have a
constant size. With frame buffer resizing, the latter two are no
longer true, and with KMS, we'd really prefer to not allow the former.

The only option available to the driver is to completely disable DGA
as the modes code has internal calls to the xf86DiDGA code when
fetching new modes from the hardware.

A fix for the DiDGA code will be added to the X server which will
automatically initialize DGA for mode switching and input, but not
frame buffer access, and not require any driver cooperation.

Thus, the correct solution is for the driver to not call xf86DiDGAInit
at all. For old servers, this eliminates a potential catastrophic
problem where random memory is written by the X server. New servers
will get the DIX-based behaviour automatically.

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-09-21 17:24:11 -07:00
Keith Packard 4758311842 Remove vestigial internal rotation which broke KMS DGA/VidMode modesetting.
Pre-2.0, the driver supported rotation internally, rather than relying
on the X server rotation support. The last piece of this dealt with
rotating the mouse coordinates and also tried to preserve rotation
across DGA/VidModeExtension modesetting requests.

That latter bit of code broke under KMS as the rotation value was
never initialized, and when set to zero would create an invalid
configuration. This would confuse xrandr which would bail before
making any changes, leaving the user without a way to recover.

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-09-21 17:24:11 -07:00
Carl Worth 505025053d 8xx: Fallback for any non-affine transformation.
There are definitely bugs in the 8xx code dealing with non-affine
transformations. Disable that code for now to get things working.

Fixes bug #22947 ([855GM, xf86-video-intel-2.8.0] "Freeze" when RENDER extension is being used)
2009-09-21 15:46:51 -07:00
Zhenyu Wang b4d29452b9 More dumps for Arrandale LVDS
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
2009-09-21 15:28:09 +08:00
Chris Wilson 57fc09cef2 Avoid fallbacks for a1 src/mask
Carl Worth did the hard work in identifying that the regression in
cairo between X.org 1.6 and 1.7 was caused by cairo sending an a1
mask to the server in 1.7 whereas in 1.6 cairo used local fallbacks
(as the source was using RepeatPad, which triggers cairo's
'buggy_pad_reflect' fallback for X.org 1.6). This was causing the driver
to do a fallback to handle the a1 mask instead, which due to the GPU
pipeline stall is much more expensive than the equivalent fallback in
cairo.

Reference:
  cairo's performance downgrades 4X with server master than server-1.6.
  https://bugs.freedesktop.org/show_bug.cgi?id=23184

The fix is a relatively simple extension of the current
uxa_picture_from_pixman_image() to use CompositePicture() instead of
CopyArea() when we need to convert to a new format.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-09-20 01:15:41 +01:00
Keith Packard 33f98e4056 Don't destroy bufmgr at CloseScreen time
Under KMS, the bufmgr is not initialized at InitOutput time and so it
won't be re-initialized during server regen. Thus we must leave the
bufmgr running during regen and cannot destroy it in CloseScreen.

Under UMS, each place the bufmgr is initialized, it checks to see if
it has already happened. Hence, we can safely leave the bufmgr running
across server regen for UMS too.

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-09-17 18:16:02 -07:00
Keith Packard ee9ad85357 Make sure DRM output properties are freed after we're done with them.
drmmode_output_get_modes was fetching output properties but only
freeing some of them.

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-09-17 17:57:40 -07:00
Jesse Barnes b8c5c996e8 Eliminate cursor flicker
We can update the cursor without hiding and showing it.  In fact, doing the
hide/show causes noticable flicker when running in KMS mode.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2009-09-15 19:46:43 -07:00
Chris Wilson c2abfa8e54 Avoid fallbacks for compositing gradient patterns
Currently when asked to composite using a gradient source or mask, we
fallback to using fbComposite().  This has the side-effect of causing a
readback on the destination surface, stalling the GPU pipeline.  Instead,
like uxa_trapezoids(), we can use pixman to fill a scratch pixmap and then
copy that to an offscreen pixmap for use with uxa_composite().

Speedups on i915:
firefox-talos-svg:  710378.14 -> 549262.96:  1.29x speedup

No slowdowns.

Thanks to Søeren Sandmann Pedersen for spotting the missing
ValidatePicture().

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-09-14 16:26:57 +01:00
Carl Worth efbcf29dd1 Update version to 2.8.99.901 for snapshot. 2009-09-09 09:32:48 -07:00
Carl Worth 54fa27fcd9 NEWS: Add notes for the 2.8.99.901 snapshot 2009-09-09 09:27:01 -07:00
Chris Wilson 1a77ca74bc i915: Restore nearest sampling
My recent commit [94fc93] to use the pixel centre for sampling with the i830
broke the i915. This restores the previous sampling coordinates for the
i915 whilst preserving the correct coordinates for i830.

Fixes: gnome characters disappear
       http://bugs.freedesktop.org/show_bug.cgi?id=23803

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-09-09 12:40:15 +01:00
Zhenyu Wang ce10b5b6fc Add B43 chipset support
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
2009-09-08 00:56:34 +08:00
Chris Wilson 94fc93d4e2 i830/i915: Set the sample position to the pixel center.
And in particular we apply the nearest sample bias separately for
src/mask.

Fixes cairo/test:
	device-offset-scale
	finer-grained-fallbacks
	mask-transformed-{similar,image}
	meta-surface-pattern
	pixman-rotate
	surface-pattern-big-scale-down
	text-transform

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-09-05 11:06:44 +01:00
Chris Wilson ced0cc8bb2 i830: Update comments
i830_composite() is no longer shared with i915 but
i830_emit_composite_primitive() is.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-09-05 11:06:44 +01:00
Chris Wilson 8863706e25 i830: Trim composite setup
Remove a couple of redundant NOOPs from the setup and correct the required
space checking for atomic batch operation.
2009-09-05 11:06:11 +01:00
Chris Wilson a9b12111f9 i830: remove padding NOOPs from composite
Bumps aa10text up from 249k to 260k!

These NOOPs have existed uncommented since
04d1584737.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-09-05 01:58:03 +01:00
Chris Wilson 9c1bf6d01c i830: do not use stale mask transform
Not only were incorrectly falling back if we had non-affine
transformations, but we made the decision based on a stale transformation
matrix.

Related bug 22877:
   batch_start_atomic horribly breaks performance after a while
   https://bugs.freedesktop.org/show_bug.cgi?id=22877

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Tested-by: Maximilian Grothusmann <maxi@own-hero.net>
2009-09-05 01:34:59 +01:00
Matthias Hopf e903b3ebad Don't set backlight level if going on->on.
Otherwise changed backlight will be reset upon DPMS switch off, because first
this function is called with DPMSModeOn.
2009-09-03 16:34:08 +02:00
Matthias Hopf 91f26937c1 Use "Backlight" as backlight brightness property.
BACKLIGHT is now deprecated, though still usable.
2009-09-03 16:14:56 +02:00
Matthias Hopf dbc8944ee9 Add get_property support.
So far only BACKLIGHT is changed.
2009-09-03 16:14:56 +02:00
Matthias Hopf c18fc7955d Don't ignore backlight level change to the same level.
If set externally to a different level, this would result in a no-op.
OTOH if the display is switched off (DPMS) you do not want the change to take
place immediately, but rather to be saved and set later when the display is
active again.
2009-09-03 16:14:56 +02:00
Zhenyu Wang fe7693c94a Make DGA optional
As DGA is optional in xserver, we should check this too instead
of always trying to init DGA.

Found when update xserver to 6fffcd5825454a7fe58ffbcfb219f007cf38e731,
but not update xf86dgaproto, which caused X fails to start.

Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
2009-09-02 07:14:57 -07:00
Carl Worth 5812531e08 debug: i830_valid_command: Return invalid for subopcodes with no name
Previously the code would always return the count, before ever looking
into the _3d_cmds table to see if there was actually a valid command.

Thanks to Alan Coopersmith who reported that the code was confusing
parfait:

https://bugs.freedesktop.org/show_bug.cgi?id=21666
2009-08-31 09:30:40 -07:00
Zou Nan hai 7c48c21b22 set correct value for indirect access check bound 2009-08-27 09:47:12 +08:00
Keith Packard 6361c3b9af Fix SHM functions to work with server after 1.6.0
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-08-25 19:33:25 -07:00
Keith Packard 2786a66719 KMS: allocate one bo per crtc for cursor
The KMS API doesn't provide for sharing a single bo for multiple
cursor images, so allocate one bo for each crtc to hold the cursor
image. KMS also only supports ARGB cursors, so don't bother to
allocate buffers for two color cursors.

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-08-25 18:37:45 -07:00
Keith Packard e51126c571 Add cursor registers to debug dump output.
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-08-25 18:37:45 -07:00
Keith Packard 5fa8d04d9c Reload cursors as needed when setting new modes.
Cursor images may need rotation, or positions updated when new modes
are set. The server provides a convenience function,
xf86_reload_cursors for precisely this purpose. Just call it after the
new mode is set.

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-08-25 18:37:44 -07:00
Jesse Barnes 1fc3f467ab Add KMS only build flag
Rather than refactoring all our init code only to have it go away when
we remove UMS, this patch adds a build time flag to allow the driver to
assume KMS support.

With this flag active, the driver will not request that I/O or MEM be
enabled at probe time, which can allow the server (if other drivers also
cooperate) to run as a non-root user.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2009-08-25 09:48:10 -07:00
Wu Fengguang 5dccd1be3a Add HDMI audio registers
Dump some of the audio registers at server startup time.

(II) intel(0):           AUD_CONFIG: 0x00000004
(II) intel(0):     AUD_HDMIW_STATUS: 0x00000000
(II) intel(0):       AUD_CONV_CHCNT: 0x00000000
(II) intel(0):        VIDEO_DIP_CTL: 0x20000600
(II) intel(0):        AUD_PINW_CNTR: 0x00000040
(II) intel(0):          AUD_CNTL_ST: 0x00002000
(II) intel(0):          AUD_PIN_CAP: 0x00000094
(II) intel(0):         AUD_PINW_CAP: 0x004073bd
(II) intel(0):   AUD_PINW_UNSOLRESP: 0x80000008
(II) intel(0):     AUD_OUT_DIG_CNVT: 0x00000001
(II) intel(0):        AUD_OUT_CWCAP: 0x00006211
(II) intel(0):          AUD_GRP_CAP: 0x00000004

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
2009-08-21 15:10:46 +08:00
Wu Fengguang 38e97d2366 Add intel_audio reg dumping program
It can dump HDMI audio registers for G45.

Signed-off-by: "Wang, Zhenyu Z" <zhenyu.z.wang@intel.com>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
2009-08-21 13:23:40 +08:00
Kristian Høgsberg 6955fc7a74 kms: Don't use fb offset when using shadow buffer 2009-08-20 17:15:13 -04:00
Eric Anholt 465a4ab416 Align the height of untiled pixmaps to 2 lines as well.
The 965 docs note, and it's probably the case on 915 as well, that the
2x2 subspans are read as a unit, even if the bottom row isn't used.  If
the address in that bottom row extended beyond the end of the GTT, a
fault could occur.

Thanks to Chris Wilson for pointing out the problem.
2009-08-18 18:00:46 -07:00
Jesse Barnes a3962e6f74 Print block length of backlight table
For debugging VBIOS dumps
2009-08-18 10:57:18 -07:00
Jesse Barnes 320f216699 Dump LVDS backlight info from bios_reader
Add LVDS backlight and power VBT structures and dump from the BIOS reader.
2009-08-18 10:57:18 -07:00
Matthias Hopf a509165304 Add BACKLIGHT property support in KMS case. 2009-08-18 13:55:46 +02:00
Zhenyu Wang 376397c21e Fix VGA plane disabling
Only apply on G4X with SR01 bit5 workaround for VGA plane disable, and
restore behavior back for other chips to make sure other modes got disabled
too.

For bug #17235, #19715, #21064, #23178

Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
2009-08-18 10:01:12 +08:00
Matthias Hopf 926c7e7d30 Add HP Mini 5101 to quirks list. 2009-08-13 15:48:21 +02:00
Adam Jackson 7138201977 Fix the chip names printed in the log to be less obnoxious.
Names taken from pci.ids.  Pineview appears to be a platform not a GMCH,
so use the G/GM convention to distinguish.
2009-08-11 14:50:03 -04:00
Eric Anholt e8f0763d40 Fix math in the tiling alignment fix. 2009-08-07 18:24:44 -07:00
Eric Anholt 222b52ef16 Align tiled pixmap height so we don't address beyond the end of our buffers. 2009-08-07 18:20:24 -07:00