platform/upstream/libdrm.git
16 years agotests: Improved and renamed the mode app to modeprint
Jakob Bornecrantz [Wed, 2 Jul 2008 11:59:19 +0000 (13:59 +0200)]
tests: Improved and renamed the mode app to modeprint

16 years agoNV50: switch to fixed point scale factor calculations
Maarten Maathuis [Tue, 1 Jul 2008 14:00:09 +0000 (16:00 +0200)]
NV50: switch to fixed point scale factor calculations

16 years agoNV50: some i2c cleanup
Maarten Maathuis [Tue, 1 Jul 2008 13:14:30 +0000 (15:14 +0200)]
NV50: some i2c cleanup

16 years agoNV50: use list_head item instead of list_head head to avoid confusion
Maarten Maathuis [Fri, 27 Jun 2008 16:58:13 +0000 (18:58 +0200)]
NV50: use list_head item instead of list_head head to avoid confusion

16 years agoChange some obviously wrong things about property blobs, still broken though.
Maarten Maathuis [Fri, 27 Jun 2008 16:45:08 +0000 (18:45 +0200)]
Change some obviously wrong things about property blobs, still broken though.

- I do not fully understand these blobs, so i'm leaving it at this for the moment.

16 years ago[modesetting-101] Actually store properties when being changed.
Maarten Maathuis [Fri, 27 Jun 2008 14:30:25 +0000 (16:30 +0200)]
[modesetting-101] Actually store properties when being changed.

16 years agoNV50: A minor change.
Maarten Maathuis [Thu, 26 Jun 2008 23:29:30 +0000 (01:29 +0200)]
NV50: A minor change.

16 years agoNV50: Implement DPMS.
Maarten Maathuis [Thu, 26 Jun 2008 23:16:36 +0000 (01:16 +0200)]
NV50: Implement DPMS.

16 years ago[modesetting-101] tab-cleanup
Maarten Maathuis [Thu, 26 Jun 2008 21:21:01 +0000 (23:21 +0200)]
[modesetting-101] tab-cleanup

16 years agoRevert "modesetting-101: Make dpms property optional + misc cleanup."
Maarten Maathuis [Thu, 26 Jun 2008 21:12:04 +0000 (23:12 +0200)]
Revert "modesetting-101: Make dpms property optional + misc cleanup."

This reverts commit 13943fe5823c45759091c1a1f487a4abe377421e.

16 years agomodesetting-101: Make dpms property optional + misc cleanup.
Maarten Maathuis [Thu, 26 Jun 2008 19:28:29 +0000 (21:28 +0200)]
modesetting-101: Make dpms property optional + misc cleanup.

- intel_crt seems the only one to provide it, so init it there.

16 years agoNV50: i misunderstood NOUVEAU_MEM_INTERNAL, so remove it
Maarten Maathuis [Wed, 25 Jun 2008 13:27:07 +0000 (15:27 +0200)]
NV50: i misunderstood NOUVEAU_MEM_INTERNAL, so remove it

16 years agoNV50: Some cleanup and fixes.
Maarten Maathuis [Wed, 25 Jun 2008 13:16:38 +0000 (15:16 +0200)]
NV50: Some cleanup and fixes.

16 years agonv50: when destroying a channel make sure it's not still current on PFIFO
Ben Skeggs [Wed, 25 Jun 2008 06:45:41 +0000 (16:45 +1000)]
nv50: when destroying a channel make sure it's not still current on PFIFO

We won't get a PFIFO context switch when the same channel ID is recreated if
the hw still thinks the channel is already active, which causes fun issues.

Should allow X to be stopped and started without tearing down the entire
card state in lastclose().

16 years agonouveau: allocate drm-use vram buffers from end of vram.
Ben Skeggs [Sun, 22 Jun 2008 15:00:42 +0000 (01:00 +1000)]
nouveau: allocate drm-use vram buffers from end of vram.

This avoids seeing garbage from engine setup etc before X gets around
to pointing the CRTCs at a new scanout buffer.  Not actually a noticable
problem before G80 as PRAMIN is forced to the end of VRAM by the hardware
already.

16 years agosilence warning
root [Tue, 24 Jun 2008 22:18:29 +0000 (23:18 +0100)]
silence warning

16 years agoNV50: minor change
Maarten Maathuis [Tue, 24 Jun 2008 18:29:08 +0000 (20:29 +0200)]
NV50: minor change

16 years agoNV50: fix a few misc things
Maarten Maathuis [Tue, 24 Jun 2008 10:38:57 +0000 (12:38 +0200)]
NV50: fix a few misc things

16 years agoNV50: fix cursor hide/show
Maarten Maathuis [Tue, 24 Jun 2008 08:16:52 +0000 (10:16 +0200)]
NV50: fix cursor hide/show

16 years agoNV50: These are actually errors.
Maarten Maathuis [Tue, 24 Jun 2008 07:41:13 +0000 (09:41 +0200)]
NV50: These are actually errors.

16 years agoNV50: fix some misc bugs
Maarten Maathuis [Mon, 23 Jun 2008 22:00:02 +0000 (00:00 +0200)]
NV50: fix some misc bugs

16 years ago[modesetting-101] update mode count after fill_modes.
Maarten Maathuis [Mon, 23 Jun 2008 20:59:17 +0000 (22:59 +0200)]
[modesetting-101] update mode count after fill_modes.

- This avoids returning with a mode count of 0, thus not allocating space for the 2nd ioctl.

16 years agolibdrm: check for allocation failure
Maarten Maathuis [Mon, 23 Jun 2008 19:15:54 +0000 (21:15 +0200)]
libdrm: check for allocation failure

16 years agoNV50: Improve set_config and fix some minor bugs.
Maarten Maathuis [Mon, 23 Jun 2008 18:33:32 +0000 (20:33 +0200)]
NV50: Improve set_config and fix some minor bugs.

16 years agonouveau: disable KMS for pre-NV50 even when specifically enabled
Maarten Maathuis [Sun, 22 Jun 2008 17:31:55 +0000 (19:31 +0200)]
nouveau: disable KMS for pre-NV50 even when specifically enabled

16 years agoNV50: Fix a few more possible leaks.
Maarten Maathuis [Sun, 22 Jun 2008 17:04:22 +0000 (19:04 +0200)]
NV50: Fix a few more possible leaks.

16 years agofix typo
Maarten Maathuis [Sun, 22 Jun 2008 16:58:04 +0000 (18:58 +0200)]
fix typo

16 years agoNV50: A few minor added safeties + cleanup.
Maarten Maathuis [Sun, 22 Jun 2008 16:47:51 +0000 (18:47 +0200)]
NV50: A few minor added safeties + cleanup.

16 years agoUndo something i didn't want to change.
Maarten Maathuis [Sun, 22 Jun 2008 15:01:30 +0000 (17:01 +0200)]
Undo something i didn't want to change.

- I made it consistent with recent kernel fb code (maybe this is older bugged code?)
- Still i don't use this and i should leave it to others.

16 years agoNV50: Initial import of kernel modesetting.
Maarten Maathuis [Sun, 22 Jun 2008 14:29:00 +0000 (16:29 +0200)]
NV50: Initial import of kernel modesetting.

16 years agoi915: switch back to fbcon on panic
Jesse Barnes [Wed, 18 Jun 2008 20:57:39 +0000 (13:57 -0700)]
i915: switch back to fbcon on panic

Normally when X is running, panic messages will be invisible and the machine
will just appear to hard hang.  This patch adds support for switching back to
the fbcon framebuffer on panic (through the use of a panic notifier
registration) so we can see what happened.

Note that in order to be really useful, X will have to run its VT in something
other than KD_GRAPHICS mode.  Also, not all kernel errors result in panics,
some go through BUG() which may trigger another type of event, not resulting in
a switch.

16 years agoAdd EDID quirk handling
Jesse Barnes [Mon, 9 Jun 2008 23:20:45 +0000 (16:20 -0700)]
Add EDID quirk handling

Port over EDID quirks from X.Org so we can handle more monitors.  This meant
adding size info to the drm_display_mode struct, but other than that the
changes were isolated to the DRM EDID handling code (as they should be).

16 years ago [intel] remove settable use_mi_batchbuffer_start
Keith Packard [Fri, 6 Jun 2008 20:54:38 +0000 (21:54 +0100)]
[intel] remove settable use_mi_batchbuffer_start

    The driver can know what hardware requires MI_BATCH_BUFFER vs
    MI_BATCH_BUFFER_START; there's no reason to let user mode configure this.

16 years agodrm: fix up fb resize again
Dave Airlie [Fri, 6 Jun 2008 06:24:27 +0000 (16:24 +1000)]
drm: fix up fb resize again

16 years agointel: don't set the mode on the framebuffer if isn't set to scanout our framebuffer
Dave Airlie [Fri, 6 Jun 2008 05:38:53 +0000 (15:38 +1000)]
intel: don't set the mode on the framebuffer if isn't set to scanout our framebuffer

16 years agoMerge remote branch 'origin/modesetting-101' into modesetting-101-fb
Dave Airlie [Fri, 6 Jun 2008 05:21:57 +0000 (15:21 +1000)]
Merge remote branch 'origin/modesetting-101' into modesetting-101-fb

16 years agointelfb: add multi fb paths
Dave Airlie [Fri, 6 Jun 2008 05:21:22 +0000 (15:21 +1000)]
intelfb: add multi fb paths

16 years agointelfb: remove duplicate define
Dave Airlie [Fri, 6 Jun 2008 04:55:03 +0000 (14:55 +1000)]
intelfb: remove duplicate define

16 years agointelfb: admit fbdev is crap and punt on trying to resize to a larger fbdev.
Dave Airlie [Fri, 6 Jun 2008 04:53:34 +0000 (14:53 +1000)]
intelfb: admit fbdev is crap and punt on trying to resize to a larger fbdev.

16 years agointelfb: move mode sets into the intel crtcs
Dave Airlie [Fri, 6 Jun 2008 02:02:51 +0000 (12:02 +1000)]
intelfb: move mode sets into the intel crtcs

better place to store them.

16 years agodrm/intel: make hotplug just be an event
Dave Airlie [Fri, 6 Jun 2008 00:38:35 +0000 (10:38 +1000)]
drm/intel: make hotplug just be an event

16 years agointel: if no spare crtc exists don't just take one.
Dave Airlie [Fri, 6 Jun 2008 00:31:36 +0000 (10:31 +1000)]
intel: if no spare crtc exists don't just take one.

16 years agosysfs registration/teardown fixups
Jesse Barnes [Thu, 5 Jun 2008 22:58:43 +0000 (15:58 -0700)]
sysfs registration/teardown fixups

A check in drm_sysfs_connector_remove was supposed to allow it to be called
even with unregistered objects, to make cleanup paths a little simpler.
However, device_is_regsitered didn't always seem to return what we thought it
would, so we'd sometimes end up leaving objects lying around rather than
unregistering them.

Fix this situation up by requiring devices to be registered before being
removed.  Any problems resulting from this change should be easier to track
down than the alternative (which is leaving kobjects registered after unload).

16 years agodrm/modeset: add more debugging and fixup some fb enable/disabe bits
Dave Airlie [Thu, 5 Jun 2008 06:32:41 +0000 (16:32 +1000)]
drm/modeset: add more debugging and fixup some fb enable/disabe bits

16 years agodrm/modesetting: more fb interface cleanups
Dave Airlie [Thu, 5 Jun 2008 05:55:03 +0000 (15:55 +1000)]
drm/modesetting: more fb interface cleanups

16 years agodrm/modesetting: attempt to make fb code more sane
Dave Airlie [Thu, 5 Jun 2008 05:21:07 +0000 (15:21 +1000)]
drm/modesetting: attempt to make fb code more sane

16 years agodrm: modesetting unify the hotplug init paths a lot.
Dave Airlie [Thu, 5 Jun 2008 03:40:08 +0000 (13:40 +1000)]
drm: modesetting unify the hotplug init paths a lot.

remove fb callbacks, just probe into the driver to sort it out

16 years agomodesetting: fix fb clearing up
Dave Airlie [Thu, 5 Jun 2008 01:43:48 +0000 (11:43 +1000)]
modesetting: fix fb clearing up

16 years agomodesetting: use surface width height for buffer allocs
Dave Airlie [Thu, 5 Jun 2008 01:24:57 +0000 (11:24 +1000)]
modesetting: use surface width height for buffer allocs

16 years agomodesetting: add surface width/heights
Dave Airlie [Thu, 5 Jun 2008 01:20:52 +0000 (11:20 +1000)]
modesetting: add surface width/heights

16 years agomodesetting: initial attempt at debonging fb
Dave Airlie [Thu, 5 Jun 2008 01:11:22 +0000 (11:11 +1000)]
modesetting: initial attempt at debonging fb

16 years agoi915: use kzalloc to allocate intel_output for lvds
Jesse Barnes [Wed, 4 Jun 2008 19:50:03 +0000 (12:50 -0700)]
i915: use kzalloc to allocate intel_output for lvds

Better to initialize all the struct fields to 0.  Also more consistent with
other output init routines.

16 years agoFix crash in drm_mode_connector_update_edid_property
Jesse Barnes [Wed, 4 Jun 2008 16:38:44 +0000 (09:38 -0700)]
Fix crash in drm_mode_connector_update_edid_property

We need to initialize the edid_blob_ptr to NULL when we init a connector,
otherwise drm_mode_connector_update_edid_property may think there's a valid
EDID lying around and try to destroy it, causing a crash.

16 years agodrm: fix hotplug oops
Dave Airlie [Wed, 4 Jun 2008 05:17:13 +0000 (15:17 +1000)]
drm: fix hotplug oops

16 years agointel: report a known connector
Dave Airlie [Wed, 4 Jun 2008 05:17:00 +0000 (15:17 +1000)]
intel: report a known connector

16 years agolibdrm: shouldn't rely on this
Dave Airlie [Wed, 4 Jun 2008 03:53:33 +0000 (13:53 +1000)]
libdrm: shouldn't rely on this

16 years agodrm: introduce generation counter to interface.
Dave Airlie [Wed, 4 Jun 2008 03:49:43 +0000 (13:49 +1000)]
drm: introduce generation counter to interface.

Idea being if you want to add new crtc/output/encoder dynamically later,
you just increase the generation counter and userspace should re-read
all the resources

16 years agodrm/sysfs: don't try an unregister if not registered
Dave Airlie [Wed, 4 Jun 2008 03:16:49 +0000 (13:16 +1000)]
drm/sysfs: don't try an unregister if not registered

16 years agointel: use kzalloc
Dave Airlie [Wed, 4 Jun 2008 03:09:20 +0000 (13:09 +1000)]
intel: use kzalloc

16 years agodrm/modesetting: bo not used anymore
Dave Airlie [Wed, 4 Jun 2008 03:09:05 +0000 (13:09 +1000)]
drm/modesetting: bo not used anymore

16 years agodrm: remove sysfs in driver for now.. should probably be in helper
Dave Airlie [Wed, 4 Jun 2008 03:03:23 +0000 (13:03 +1000)]
drm: remove sysfs in driver for now.. should probably be in helper

16 years agodrm/modesetting: pass object handle to driver !bo
Dave Airlie [Wed, 4 Jun 2008 03:00:31 +0000 (13:00 +1000)]
drm/modesetting: pass object handle to driver !bo

16 years agodrm/modesetting: overhaul the fb create/delete.
Dave Airlie [Wed, 4 Jun 2008 01:59:28 +0000 (11:59 +1000)]
drm/modesetting: overhaul the fb create/delete.

Move TTM code into the driver

16 years agodrm: make mode comparison more betterer.
Dave Airlie [Wed, 4 Jun 2008 00:34:34 +0000 (10:34 +1000)]
drm: make mode comparison more betterer.

This compares the clocks after converting to fb pico timings so we
get the same answer if the X and fb modes are the same.

16 years agomore checks for NULL encoder so we don't segfault.
Alan Hourihane [Mon, 2 Jun 2008 09:44:29 +0000 (10:44 +0100)]
more checks for NULL encoder so we don't segfault.

16 years agoFix warnings
Alan Hourihane [Mon, 2 Jun 2008 09:03:28 +0000 (10:03 +0100)]
Fix warnings

16 years agodrm: initial mode object groups.
Dave Airlie [Mon, 2 Jun 2008 06:45:44 +0000 (16:45 +1000)]
drm: initial mode object groups.

This creates a default group attached to the legacy drm minor nodes.

It covers all the objects in the set. make set resources only return
objects for this set. Need to fix up other functions to only work on
objects in their allowed set.

16 years agodrm/modesetting: redo object handles around a core object.
Dave Airlie [Mon, 2 Jun 2008 06:19:21 +0000 (16:19 +1000)]
drm/modesetting: redo object handles around a core object.

handle crtc/encoders/connectors/fb/mode/property/blob using this system.

16 years agodrm: only report framebuffers available on this fd.
Dave Airlie [Mon, 2 Jun 2008 04:33:42 +0000 (14:33 +1000)]
drm: only report framebuffers available on this fd.

Not 100% sure this is a good idea, but I think I'd rather things
communicate with bo handles not fb ids.

16 years agodrm: add functions to get/set gamma ramps
Dave Airlie [Mon, 2 Jun 2008 04:04:41 +0000 (14:04 +1000)]
drm: add functions to get/set gamma ramps

16 years agoMerge branch 'modesetting-101-encoders' into modesetting-101
Dave Airlie [Mon, 2 Jun 2008 02:58:10 +0000 (12:58 +1000)]
Merge branch 'modesetting-101-encoders' into modesetting-101

16 years agodrm: fixup encoder picking in set_config stage
Dave Airlie [Mon, 2 Jun 2008 02:57:09 +0000 (12:57 +1000)]
drm: fixup encoder picking in set_config stage

16 years agodrm/modesetting: add best encoder finding for modesetting
Dave Airlie [Mon, 2 Jun 2008 01:44:35 +0000 (11:44 +1000)]
drm/modesetting: add best encoder finding for modesetting

This asks the driver to suggest the best encoder for the connector
during the pick crtcs stage.

Need to also do this during mode setting stages

16 years agodrm/modesetting: move some connector functions to helper.
Dave Airlie [Mon, 2 Jun 2008 01:12:28 +0000 (11:12 +1000)]
drm/modesetting: move some connector functions to helper.

Migrated the output mode collection into the helper.

16 years agodrm: fixup some interfaces so test code works again
Dave Airlie [Mon, 2 Jun 2008 00:41:12 +0000 (10:41 +1000)]
drm: fixup some interfaces so test code works again

16 years agodrm/modesetting: another re-org of some internals.
Dave Airlie [Mon, 2 Jun 2008 00:05:54 +0000 (10:05 +1000)]
drm/modesetting: another re-org of some internals.

Move dpms into the helper functions.
Move crtc into the encoder.
Move disable unused functions into the helper.

16 years agoFix ivch i2c read function to use the "special" i2c format.
Kristian Høgsberg [Fri, 30 May 2008 18:23:04 +0000 (14:23 -0400)]
Fix ivch i2c read function to use the "special" i2c format.

16 years agodrm: switch possible crtc/clones over to encoders
Dave Airlie [Fri, 30 May 2008 05:32:58 +0000 (15:32 +1000)]
drm: switch possible crtc/clones over to encoders

16 years agomodesetting: drop crtcs/clones from the connectors
Dave Airlie [Fri, 30 May 2008 05:18:07 +0000 (15:18 +1000)]
modesetting: drop crtcs/clones from the connectors

16 years agomodesetting: the great renaming.
Dave Airlie [Fri, 30 May 2008 05:03:12 +0000 (15:03 +1000)]
modesetting: the great renaming.

Okay we have crtc, encoder and connectors.

No more outputs exposed beyond driver internals

I've broken intel tv connector stuff.
Really for TV we should have one TV connector, with a sub property for the
type of signal been driven over it

16 years agodrm: attach an encoder.
Dave Airlie [Fri, 30 May 2008 03:57:27 +0000 (13:57 +1000)]
drm: attach an encoder.

Time to do some renaming on the connectors I think

16 years agodrm: fix a couple of bugs in the encoder return to userspace
Dave Airlie [Fri, 30 May 2008 03:49:39 +0000 (13:49 +1000)]
drm: fix a couple of bugs in the encoder return to userspace

16 years agodrm: add encoder attach/detach
Dave Airlie [Fri, 30 May 2008 03:31:16 +0000 (13:31 +1000)]
drm: add encoder attach/detach

16 years agotests: add basic encoder reading to test
Dave Airlie [Fri, 30 May 2008 03:22:51 +0000 (13:22 +1000)]
tests: add basic encoder reading to test

16 years agodrm: add encoder free function
Dave Airlie [Fri, 30 May 2008 02:29:45 +0000 (12:29 +1000)]
drm: add encoder free function

16 years agodrm: init the encoder list/count
Dave Airlie [Fri, 30 May 2008 02:24:19 +0000 (12:24 +1000)]
drm: init the encoder list/count

16 years agodrm: add red hat copyright.
Dave Airlie [Fri, 30 May 2008 02:20:36 +0000 (12:20 +1000)]
drm: add red hat copyright.

16 years agodrm: add encoder ids to the output handling
Dave Airlie [Fri, 30 May 2008 02:19:13 +0000 (12:19 +1000)]
drm: add encoder ids to the output handling

16 years agodrm: add more encoder interfaces
Dave Airlie [Fri, 30 May 2008 02:14:44 +0000 (12:14 +1000)]
drm: add more encoder interfaces

16 years agolibdrm: add encoder retrival
Dave Airlie [Fri, 30 May 2008 02:10:01 +0000 (12:10 +1000)]
libdrm: add encoder retrival

16 years agodrm: add encoder / get encoder to the modesetting resources interface
Dave Airlie [Fri, 30 May 2008 02:03:36 +0000 (12:03 +1000)]
drm: add encoder / get encoder to the modesetting resources interface

16 years agodrm: remove unused init func from outputs
Dave Airlie [Fri, 30 May 2008 01:48:41 +0000 (11:48 +1000)]
drm: remove unused init func from outputs

16 years agodrm/modesetting: add initial encoder structures and setup functions
Dave Airlie [Fri, 30 May 2008 01:47:57 +0000 (11:47 +1000)]
drm/modesetting: add initial encoder structures and setup functions

16 years agomodesetting: reorganise out crtc/outputs are allocated.
Dave Airlie [Fri, 30 May 2008 01:25:41 +0000 (11:25 +1000)]
modesetting: reorganise out crtc/outputs are allocated.

Use subclassing from the drivers to allocate the objects. This saves
two objects being allocated for each crtc/output and generally makes
exit paths cleaner.

16 years agomodesetting: reorganise code into core and helper functions.
Dave Airlie [Thu, 29 May 2008 04:02:14 +0000 (14:02 +1000)]
modesetting: reorganise code into core and helper functions.

This splits a lot of the core modesetting code out into a file of
helper functions, that are only called from themselves and/or the driver.

The driver gets called into more often or can call these functions from itself
if it is a helper using driver.

I've broken framebuffer resize doing this but I didn't like the API for that
in any case.

16 years agomodeset: disable radeon ms by default
Dave Airlie [Thu, 29 May 2008 03:58:26 +0000 (13:58 +1000)]
modeset: disable radeon ms by default

as I'm going to break it.

16 years agoMerge branch 'master' of git+ssh://git.freedesktop.org/git/mesa/drm into modesetting-101
Alan Hourihane [Wed, 28 May 2008 20:01:18 +0000 (21:01 +0100)]
Merge branch 'master' of git+ssh://git.freedesktop.org/git/mesa/drm into modesetting-101

Conflicts:

shared-core/i915_dma.c
shared-core/i915_drv.h

16 years agoi915: unmap BIOS when we're done with it
Jesse Barnes [Wed, 28 May 2008 15:24:42 +0000 (08:24 -0700)]
i915: unmap BIOS when we're done with it

At the moment, we only read it at startup time, so we can just unmap it there
when we're done.

16 years agoradeon: split microcode out into a separate header file.
Dave Airlie [Wed, 28 May 2008 01:12:57 +0000 (11:12 +1000)]
radeon: split microcode out into a separate header file.

16 years agoi915: fix BSD bh, DRI2 not uses anywhere else
Dave Airlie [Wed, 28 May 2008 00:28:13 +0000 (10:28 +1000)]
i915: fix BSD bh, DRI2 not uses anywhere else