Commit graph

2259 commits

Author SHA1 Message Date
Maarten Maathuis
03f8208ab0 NV50: Use bios table for load pattern when possible. 2008-07-21 14:50:07 +02:00
Maarten Maathuis
d00644c27d NV50: Do detect with hpd and load detect if possible.
- Appropriate error messages when an unknown situation is encountered are included.
- Fallback to i2c will occur when needed.
2008-07-21 14:29:13 +02:00
Michel Dänzer
4be367b84b Reinstate dev->vblank_enabled[].
I incorrectly thought it was obsolete.
2008-07-21 11:48:04 +02:00
Michel Dänzer
f529a510d2 Drop workaround for driver vblank counter going backwards.
The driver code that caused this is no longer necessary and has been dropped.
2008-07-21 08:16:59 +02:00
Michel Dänzer
205aff6a5c vblank-rework rework cleanups.
Remove some dead/obsolete code and make drm_update_vblank_count() static.
2008-07-21 08:16:55 +02:00
Michel Dänzer
014935b680 Remove obsolete dev->vblank_suspend[crtc] tests.
Caused drm_update_vblank_count() not to do its thing when called from
drm_modeset_ctl() -> drm_vblank_get().

The vblank functionality no longer needs to be suspended during a modeset, so
rename the field to vblank_inmodeset.
2008-07-21 08:13:45 +02:00
Maarten Maathuis
685bca02fe NV50: delay changing gpu<->non-gpu scaling modes until next modeset 2008-07-20 15:40:40 +02:00
Maarten Maathuis
e51cd78cac modesetting-101: Only store property value when set_property was successful. 2008-07-20 14:58:46 +02:00
Maarten Maathuis
f1e4785d4c NV50: LVDS always needs some kind of gpu scaling 2008-07-20 14:55:59 +02:00
Maarten Maathuis
3ef1d05001 modesetting-101: set_property should return an int, not a bool 2008-07-20 14:51:22 +02:00
Maarten Maathuis
65803e53a6 modesetting-101: implement optional scaling and dithering properties 2008-07-20 13:49:18 +02:00
Maarten Maathuis
e2ffee839e drm: As a workaround don't tear down sg with a modesetting driver.
- This allows me to maintain a useful prototype driver.
2008-07-20 00:09:06 +02:00
Jesse Barnes
6ac1f8a760 Update vblank code to new API
In my last push I forgot to convert users of drm_update_vblank_count
over to drm_vblank_get/put, since that's where any interrupt off->on
update accounting is done now.  Since the modeset ioctl did something
similar (an open coded update of the counter) convert it over to using
get/put too, which saves us from having to deal with every combination
of interrupt off & on between calls.
2008-07-19 13:21:38 -04:00
Ian Romanick
4d83a751b4 drm-gem: Fix build
On some distros missing prototypes cause kernel builds to fail.  These
are hack to make the code build.
2008-07-18 12:42:43 -07:00
Eric Anholt
f5c2f00e2f intel-gem: Leave 8xx tiling on until we find any issues. 2008-07-18 12:10:41 -07:00
Jesse Barnes
2204f926ab Avoid incorrect vblank wakeups
The current code uses the hw vblank counter exclusively, which can lead
to wakeups during the active period rather than during the vblank period
if the hw counter counts displayed frames rather than vblank periods.

This change coverts the code over to using the counter while interrupts
are enabled, fixing that issue.  It also includes a couple of related
changes:  one to not enable the new enable/disable behavior until the
modeset ioctl is called (to preserve old client behavior) and another to
account for lost events due to mode setting with the new counter scheme.

BSD will require similar changes to its drm_irq.c code, but they should
be straightforward.
2008-07-17 13:55:24 -04:00
Hong Liu
dfd441cf96 This is a modified version of Hong's patch from last month, with a few
modifications to make it work correctly on my test hardware (altered the
backlight write function, made it enable the legacy backlight controller
interrupts on mobile hardware, sorted the interrupt function so we don't
get an excessive number of vblank interrupts). This lets the backlight
keys on my T61 work properly, though there's a 750msec or so delay
between the request and the brightness actually changing - this sounds
awfully like the hardware spinning waiting for a status flag to become
ready, but as far as I can tell they're all set correctly. If anyone can
figure out what's wrong here, it'd be nice to know.

Some of the functions are still stubs and just tell the hardware that
the request was successful. These can be filled in as kernel modesetting
gets integrated. I think it's worth getting this in anyway, since it's
required for backlight control to work properly on some new platforms.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
2008-07-15 10:14:17 -07:00
Dave Airlie
764573f3b8 drm: fix missing symbol export 2008-07-15 20:27:14 +10:00
Dave Airlie
abdd523c75 drm: add fix for PAT on radeon with 2.6.26 2008-07-15 16:18:22 +10:00
Dave Airlie
76c8e19a29 drm/pcigart: fix warning 2008-07-15 16:18:04 +10:00
Eric Anholt
78f1fc9cbc intel-gem: Disable tiling if we get junk from the MCHBAR read.
One of our systems has been returning 0xffffffff from all MCHBAR reads, which
means we'll need to figure out why, or add an alternate detection method.
2008-07-14 09:16:45 -07:00
Dave Airlie
a9089c4557 modesetting/helper: fix array overrun - count should be reset here 2008-07-12 16:32:09 +10:00
Eric Anholt
a0474be4e7 intel-gem: Add two new ioctls for managing tiling on objects.
Various chips have exciting interactions between the CPU and the GPU's
different ways of accessing interleaved memory, so we need some kernel
assistance in determining how it works.

Only fully tested on GM965 so far.
2008-07-11 18:58:02 -07:00
Dave Airlie
2556341f8b Merge remote branch 'origin/modesetting-101' into modesetting-gem 2008-07-09 14:53:47 +10:00
martin capitanio
eac0933be7 xgi: use true/false instead of TRUE/FALSE 2008-07-08 17:58:10 +10:00
Kristian Høgsberg
38a5f6686c Add back flink, open and close ioctls.
They fell through the cracks in 86accbcb.
2008-07-07 18:00:23 -04:00
Eric Anholt
1f9a5307ac [intel-gem] typo fix in DRM_ERROR 2008-07-07 12:49:01 -07:00
Kristian Høgsberg
3e02f7fd31 Merge commit 'origin/drm-gem' into ms-gem
Conflicts:

	linux-core/drmP.h
	linux-core/drm_drv.c
	linux-core/drm_stub.c
	linux-core/i915_drv.c
	linux-core/i915_gem.c
	shared-core/i915_drv.h
	shared-core/i915_irq.c
2008-07-07 15:43:43 -04:00
Kristian Høgsberg
7fd8a5de63 Use lowercase bool constants. 2008-07-07 12:04:35 -04:00
Alan Hourihane
0b7d9a97bd Synchronize the DDC EDID read to it's fb_ddc.c counterpart 2008-07-07 15:11:48 +01:00
Maarten Maathuis
d5d3f31b10 NV50: init gamma storage 2008-07-06 12:51:43 +02:00
Maarten Maathuis
88f668a0b9 NV50: fix minor bug in fbcon crtc selection 2008-07-06 11:23:17 +02:00
Maarten Maathuis
6738e7b00b modesetting-101: Rename DPMS modes to avoid compatibility issues with xorg definitions. 2008-07-06 11:08:49 +02:00
Maarten Maathuis
e810cb9243 modesetting-101: rename modeflags, as to avoid conflicts with the xorg definitions 2008-07-06 10:52:25 +02:00
Maarten Maathuis
d495a6e28f NV50: minor fix 2008-07-06 10:11:33 +02:00
Maarten Maathuis
e1cd21bcc8 NV50: remove edid when monitor is gone, improve fbcon, misc fixes
- This should avoid switching crtc's when going to fbcon.
2008-07-05 20:17:49 +02:00
Maarten Maathuis
c48cddc7ef NV50: fix switch_fb and connector_is_digital 2008-07-05 16:54:26 +02:00
Maarten Maathuis
7cbc5f6145 modesetting-101: Make the interface variable names a little more consistent + modeprint changes.
- All things are now called _id when they are id's.
- modeprint now accepts driver name as first argument.
2008-07-05 12:04:07 +02:00
Maarten Maathuis
be31a0fa73 modesetting-101: tv_left_margin_property shouldn't be immutable. 2008-07-04 18:47:59 +02:00
Maarten Maathuis
0028ca33e9 Forgot the 0'th element for the tv property. 2008-07-04 17:37:45 +02:00
Maarten Maathuis
c9915d695d modesetting-101: Move some defines used for enumeration into the public header.
- Otherwise userspace has no idea of the meaning.
2008-07-04 17:28:04 +02:00
Maarten Maathuis
b29578103f [modesetting-101] Add subconnector and select_subconnector properties.
- These facilitate DVI-I and tv-out that can drive multiple types of signals.
2008-07-04 17:19:11 +02:00
Dave Airlie
142a309604 modesetting: rip out all of the generation code.
not needed, hotplug will work just as well hopefully.
2008-07-04 09:34:24 +10:00
Maarten Maathuis
062d850620 nv50: s/FALSE/false && s/TRUE/true 2008-07-03 09:08:01 +02:00
Maarten Maathuis
d5ca5c9cd3 [drm-sysfs] connected is ambigious in the context of a connector, replace with enabled 2008-07-03 08:07:35 +02:00
Maarten Maathuis
47c8f31741 NV50: replace active by enabled 2008-07-03 07:18:18 +02:00
Maarten Maathuis
02b30739f7 [modeseting-101] add connected field to sysfs 2008-07-03 01:05:07 +02:00
Dave Airlie
59a9a756e2 modesetting: lookup blob using correct identifier.
blob is a blob not a connector
2008-07-03 08:06:44 +10:00
Dave Airlie
70ba087191 drm: fix encoders get permissions 2008-07-03 08:00:39 +10:00
Maarten Maathuis
f1fe9178f1 NV50: basic fbcon + misc fixes
- There is one fb, used for as many outputs as possible.
- Eventually smaller screens will be scaled to see the full console, but for the moment this'll do.
2008-07-02 16:14:48 +02:00