profile/ivi/libdrm.git
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 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

16 years agoradeon: bump release date/version for r500 3D support
Dave Airlie [Wed, 28 May 2008 00:02:20 +0000 (10:02 +1000)]
radeon: bump release date/version for r500 3D support

16 years agoRADEON: add get_param for number of GB pipes
Alex Deucher [Tue, 27 May 2008 22:33:33 +0000 (18:33 -0400)]
RADEON: add get_param for number of GB pipes

16 years ago[BSD] Move unlock in drm_vm.c from accidental platform #ifdeffing.
Owain Ainsworth [Tue, 27 May 2008 22:12:35 +0000 (15:12 -0700)]
[BSD] Move unlock in drm_vm.c from accidental platform #ifdeffing.

Also remove an unreachable unlock.

16 years ago[BSD] Fix lock leak in drm_update_draw malloc failure path.
Owain Ainsworth [Tue, 27 May 2008 22:11:25 +0000 (15:11 -0700)]
[BSD] Fix lock leak in drm_update_draw malloc failure path.

16 years ago[BSD] Fix lock leaks in error paths in drm_bufs.c.
Owain Ainsworth [Tue, 27 May 2008 22:07:04 +0000 (15:07 -0700)]
[BSD] Fix lock leaks in error paths in drm_bufs.c.

16 years ago[BSD] Remove superfluous recursive locking in drm_add_magic.
Owain Ainsworth [Tue, 27 May 2008 21:59:38 +0000 (14:59 -0700)]
[BSD] Remove superfluous recursive locking in drm_add_magic.

16 years ago[i915] Fix typo in (unused) START_ADDR definition.
Jie Luo [Tue, 27 May 2008 21:55:01 +0000 (14:55 -0700)]
[i915] Fix typo in (unused) START_ADDR definition.

16 years ago[FreeBSD] Add vblank-rework support and get drivers building.
Robert Noland [Fri, 23 May 2008 18:36:05 +0000 (14:36 -0400)]
[FreeBSD] Add vblank-rework support and get drivers building.

The i915 driver now works again.

16 years ago[FreeBSD] Convert from drm_device_t to struct drm_device for consistency.
Eric Anholt [Tue, 27 May 2008 21:12:51 +0000 (14:12 -0700)]
[FreeBSD] Convert from drm_device_t to struct drm_device for consistency.

16 years agoi915: do a better job of parsing VBIOS data
Jesse Barnes [Sat, 24 May 2008 01:42:47 +0000 (18:42 -0700)]
i915: do a better job of parsing VBIOS data

Add code to get panel modes from the VBIOS if present and check whether certain
outputs exist.  Should make our display detection code a little more robust.

16 years agodrm_mode_debug_printmodeline doesn't need struct drm_device *
Jesse Barnes [Sat, 24 May 2008 01:41:58 +0000 (18:41 -0700)]
drm_mode_debug_printmodeline doesn't need struct drm_device *

Makes printing modelines from some routines easier.

16 years agor500: add two more register ranges for mesa driver to setup
Dave Airlie [Thu, 22 May 2008 23:39:54 +0000 (09:39 +1000)]
r500: add two more register ranges for mesa driver to setup

16 years agodrm: fix nouveau warning
Dave Airlie [Thu, 15 May 2008 01:13:03 +0000 (11:13 +1000)]
drm: fix nouveau warning

16 years agoi915: check dummy page before freeing
Hong Liu [Mon, 19 May 2008 09:06:40 +0000 (17:06 +0800)]
i915: check dummy page before freeing

The dummy read page will point to NULL if drm_bo_driver_init failed at
firstopen (modeset is not enabled), and will cause kernel oops at
subsequent drm_lastclose call, so be sure to check it.

16 years agoi915: init bo mm at driver init only when modeset=1
Hong Liu [Mon, 19 May 2008 09:06:38 +0000 (17:06 +0800)]
i915: init bo mm at driver init only when modeset=1

To avoid bo memory manager being inited twice, it will be called
at firstopen when modeset is not enabled.

16 years agors690/r500: vblank support.
Dave Airlie [Wed, 21 May 2008 10:14:45 +0000 (20:14 +1000)]
rs690/r500: vblank support.

The new display controller has the vblank interrupts in a different place.

Add support for vbl interrupts for these chips

16 years agor500: add more register ranges for Mesa driver
Dave Airlie [Sat, 17 May 2008 00:22:12 +0000 (10:22 +1000)]
r500: add more register ranges for Mesa driver

16 years agoati_pcigart: oops wrong way around not that it actually mattered
Dave Airlie [Wed, 14 May 2008 12:48:12 +0000 (22:48 +1000)]
ati_pcigart: oops wrong way around not that it actually mattered

16 years agoati_pcigart: stop working in the evenings you mess up too often
Dave Airlie [Wed, 14 May 2008 12:44:22 +0000 (22:44 +1000)]
ati_pcigart: stop working in the evenings you mess up too often

16 years agoRevert "ati_pcigart: fixup properly this version might even work"
Dave Airlie [Wed, 14 May 2008 12:43:28 +0000 (22:43 +1000)]
Revert "ati_pcigart: fixup properly this version might even work"

This reverts commit bc0836e12a9790f1cc83f8bc29bc05043c4bc840.

tree has some kref hacks in it - oops

16 years agoati_pcigart: fixup properly this version might even work
Dave Airlie [Wed, 14 May 2008 12:42:21 +0000 (22:42 +1000)]
ati_pcigart: fixup properly this version might even work

16 years agoati_pcigart: fill out 40-bit gart table support properly
Dave Airlie [Wed, 14 May 2008 12:35:32 +0000 (22:35 +1000)]
ati_pcigart: fill out 40-bit gart table support properly

Thanks to Alex for supplying this info.

16 years agoRS4xx: separate out RS400 and RS480 IGP chips
Alex Deucher [Wed, 14 May 2008 01:02:17 +0000 (21:02 -0400)]
RS4xx: separate out RS400 and RS480 IGP chips

RS400 (intel based IGP) and RS480 (AMD based IGP) have
different MC and GART setups.  Currently we only support
RS480.

16 years agoMerge branch 'modesetting-101' of ssh://git.freedesktop.org/git/mesa/drm into modeset...
Jesse Barnes [Tue, 13 May 2008 21:47:17 +0000 (14:47 -0700)]
Merge branch 'modesetting-101' of ssh://git.freedesktop.org/git/mesa/drm into modesetting-101

16 years agoi915: register definition & header file cleanup
Jesse Barnes [Tue, 13 May 2008 21:44:17 +0000 (14:44 -0700)]
i915: register definition & header file cleanup

It would be nice if one day the DRM driver was the canonical source for
register definitions and core macros.  To that end, this patch cleans
things up quite a bit, removing redundant definitions (some with
different names referring to the same register) and generally tidying up
the header file.

16 years agoi915: execbuf now works without i915_dma_init being called
Jakob Bornecrantz [Tue, 13 May 2008 07:24:47 +0000 (09:24 +0200)]
i915: execbuf now works without i915_dma_init being called

16 years agoi915: TV hotplug fixes
Jesse Barnes [Mon, 12 May 2008 22:47:19 +0000 (15:47 -0700)]
i915: TV hotplug fixes

In order to avoid recursive ->detect->interrupt->detect->interrupt->...
we need to disable TV hotplug interrupts in
intel_tv.c:intel_tv_detect_type.  We also need to enable the TV interrupt
detection and hotplug sequence properly in i915_irq.c.

16 years agofix kernel oops when removing fb
Hong Liu [Fri, 9 May 2008 02:06:17 +0000 (10:06 +0800)]
fix kernel oops when removing fb

drm_crtc->fb may point to NULL, f.e X server will allocate a new fb
and assign it to the CRTC at startup, when X server exits, it will destroy
the allocated fb, making drm_crtc->fb points to NULL.

16 years agofree dummy read page if fail to init mm
Hong Liu [Fri, 9 May 2008 02:15:17 +0000 (10:15 +0800)]
free dummy read page if fail to init mm

Since drm_bo_driver_init will be called in driver_load, we need to free
what it alloced when error to avoid memory leak.

16 years agomodeset init code cleanup
Hong Liu [Mon, 12 May 2008 08:14:38 +0000 (16:14 +0800)]
modeset init code cleanup

moving modeset init code into one function and correct error
handling druing i915 init

16 years agofix G33 hardware status page in modeset
Hong Liu [Mon, 12 May 2008 06:38:49 +0000 (14:38 +0800)]
fix G33 hardware status page in modeset

We need to alloc a hw status page bo for G33 if modeset is enabled since the 2D
driver can't alloc gfx memory when working in drm modeset.

16 years agoRADEON: fix copy/pasto in last commit
Alex Deucher [Mon, 12 May 2008 18:49:43 +0000 (14:49 -0400)]
RADEON: fix copy/pasto in last commit

16 years agoR3/4/5: init pipe setup in drm
Alex Deucher [Mon, 12 May 2008 13:44:20 +0000 (09:44 -0400)]
R3/4/5: init pipe setup in drm

Similar (broken) code in mesa needs to be removed

16 years agoRADEON: cleanup radeon_do_engine_reset()
Alex Deucher [Mon, 12 May 2008 13:35:06 +0000 (09:35 -0400)]
RADEON: cleanup radeon_do_engine_reset()

16 years agoR300+: fixup pixcache flush
Alex Deucher [Mon, 12 May 2008 13:30:47 +0000 (09:30 -0400)]
R300+: fixup pixcache flush

16 years agoRS4xx: fix MCIND index mask
Alex Deucher [Mon, 12 May 2008 13:24:13 +0000 (09:24 -0400)]
RS4xx: fix MCIND index mask

16 years agoRADEON: write AGP_BASE_2 on chips that support it
Alex Deucher [Mon, 12 May 2008 13:21:45 +0000 (09:21 -0400)]
RADEON: write AGP_BASE_2 on chips that support it

16 years agoR300+: fixup PURGE/FLUSH macros
Alex Deucher [Mon, 12 May 2008 13:18:28 +0000 (09:18 -0400)]
R300+: fixup PURGE/FLUSH macros

16 years agoRadeon IGP: merge RS4xx/RS6xx gart setup
Alex Deucher [Mon, 12 May 2008 13:13:44 +0000 (09:13 -0400)]
Radeon IGP: merge RS4xx/RS6xx gart setup

16 years agoRadeon IGP: wrap MCIND access
Alex Deucher [Mon, 12 May 2008 13:00:40 +0000 (09:00 -0400)]
Radeon IGP: wrap MCIND access

first step in merging rs4xx/rs6xx gart setup

16 years agoRadeon IGP: clean up registers and magic numbers
Alex Deucher [Mon, 12 May 2008 12:56:11 +0000 (08:56 -0400)]
Radeon IGP: clean up registers and magic numbers

16 years agodrm: remove root only from a lot of drm ioctls to get stuff running as non-root
Dave Airlie [Mon, 12 May 2008 06:29:13 +0000 (16:29 +1000)]
drm: remove root only from a lot of drm ioctls to get stuff running as non-root

16 years agodrm: masters are always authenticated
Dave Airlie [Mon, 12 May 2008 06:28:58 +0000 (16:28 +1000)]
drm: masters are always authenticated

16 years agodrm: fix oops on reading proc file with no master
Dave Airlie [Mon, 12 May 2008 06:28:40 +0000 (16:28 +1000)]
drm: fix oops on reading proc file with no master

16 years agofixup i915 workqueue handling when modeset=1
Hong Liu [Fri, 9 May 2008 02:08:36 +0000 (10:08 +0800)]
fixup i915 workqueue handling when modeset=1

Fixup workqueue creation error handling and make sure we destroy the queue on
unload.

16 years agoi915: use BDB TV flag for TV detection
Jesse Barnes [Fri, 9 May 2008 21:19:39 +0000 (14:19 -0700)]
i915:  use BDB TV flag for TV detection

Even if the TV encoder hasn't been fused off, we may not have a TV connector on
the platform.  The BDB in the BIOS should give us this info in some cases.

16 years agoi915: add basic VBT support
Jesse Barnes [Fri, 9 May 2008 21:19:00 +0000 (14:19 -0700)]
i915:  add basic VBT support

Map the VBIOS (and therefore VBT) at init time for use by various output
initialization routines.

16 years agoFix build problems
Alan Hourihane [Fri, 9 May 2008 15:36:28 +0000 (16:36 +0100)]
Fix build problems

16 years agoFix test applications for recent DRM changes
Alan Hourihane [Fri, 9 May 2008 08:26:17 +0000 (09:26 +0100)]
Fix test applications for recent DRM changes