summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_sysfs.c
Commit message (Collapse)AuthorAgeFilesLines
...
* driver-core: Add attribute argument to class_attribute show/storeAndi Kleen2010-03-081-1/+2
| | | | | | | | | | | | | | | | | | | | Passing the attribute to the low level IO functions allows all kinds of cleanups, by sharing low level IO code without requiring an own function for every piece of data. Also drivers can extend the attributes with own data fields and use that in the low level function. This makes the class attributes the same as sysdev_class attributes and plain attributes. This will allow further cleanups in drivers. Full tree sweep converting all users. Signed-off-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Merge branch 'drm-linus' of ↵Linus Torvalds2009-09-211-0/+28
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6 * 'drm-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: (133 commits) drm/vgaarb: add VGA arbitration support to the drm and kms. drm/radeon: some r420s have a CP race with the DMA engine. drm/radeon/r600/kms: rv670 is not DCE3 drm/radeon/kms: r420 idle after programming GA_ENHANCE drm/radeon/kms: more fixes to rv770 suspend/resume path. drm/radeon/kms: more alignment for rv770.c with r600.c drm/radeon/kms: rv770 blit init called too late. drm/radeon/kms: move around new init path code to avoid posting at init drm/radeon/r600: fix some issues with suspend/resume. drm/radeon/kms: disable VGA rendering engine before taking over VRAM drm/radeon/kms: Move radeon_get_clock_info() call out of radeon_clocks_init(). drm/radeon/kms: add initial connector properties drm/radeon/kms: Use surfaces for scanout / cursor byte swapping on big endian. drm/radeon/kms: don't fail if we fail to init GPU acceleration drm/r600/kms: fixup number of loops per blit calculation. drm/radeon/kms: reprogram format in set base. drm/radeon: avivo chips have no separate int bit for display drm/radeon/r600: don't do interrupts drm: fix _DRM_GEM addmap error message drm: update crtc x/y when only fb changes ... Fixed up trivial conflicts in firmware/Makefile due to network driver (cxgb3) and drm (mga/r128/radeon) firmware being listed next to each other.
| * Merge intel drm-intel-next branchDave Airlie2009-09-071-22/+29
| |\ | | | | | | | | | | | | | | | | | | | | | | | | Merge remote branch 'anholt/drm-intel-next' of ../anholt-2.6 into drm-next Conflicts: drivers/gpu/drm/i915/intel_display.c drivers/gpu/drm/i915/intel_drv.h drivers/gpu/drm/i915/intel_sdvo.c
| * | drm: Enable drm drivers to add drm sysfs devices.Thomas Hellstrom2009-08-191-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Export utility functions for drivers to add specialized devices in the sysfs drm class subdirectory. Initially this will be needed form TTM to add a virtual device that handles power management. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@linux.ie>
| * | drm: Define DRM_MODE_CONNECTOR_TVFrancisco Jerez2009-08-041-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The existing TV connector types are often unsuitable either because there is no way to probe them until they're actually plugged in or because they can change during run time (e.g. 7-pin DIN connectors that behave as S-Video, Component, Composite or SCART depending on the adaptor plugged in). Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
* | | Driver-Core: extend devnode callbacks to provide permissionsKay Sievers2009-09-191-2/+2
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | This allows subsytems to provide devtmpfs with non-default permissions for the device node. Instead of the default mode of 0600, null, zero, random, urandom, full, tty, ptmx now have a mode of 0666, which allows non-privileged processes to access standard device nodes in case no other userspace process applies the expected permissions. This also fixes a wrong assignment in pktcdvd and a checkpatch.pl complain. Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | drm: Fix sysfs device confusion.Thomas Hellstrom2009-08-211-22/+29
|/ | | | | | | | | | | | | The drm sysfs class suspend / resume methods could not distinguish between different device types wich could lead to illegal type casts. Use struct device_type and make sure the class suspend / resume callbacks are aware of those. There is no per device-type suspend / resume. Only new-style PM. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
* Driver Core: drm: add nodename for drm devicesKay Sievers2009-06-161-0/+7
| | | | | | | | | This adds support to the drm core to report the proper device name to userspace for the drm devices. Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Jan Blunck <jblunck@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* drm: set permissions on edid file to 0444Keith Packard2009-06-041-0/+1
| | | | | | | | Without initializing the sysfs attributes for the edid file, it was created with mode 0, making it difficult for applications to use. Signed-off-by: Keith Packard <keithp@keithp.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm: add newlines to text sysfs filesKeith Packard2009-06-041-3/+3
| | | | | | | | The contents of various simple text files in sysfs should end with a newline to make them easier to read from the console. Signed-off-by: Keith Packard <keithp@keithp.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm: remove unreachable code in drm_sysfs.cJonas Bonn2009-04-241-2/+0Star
| | | | | | | This code was never going to get called in there. Signed-off-by: Jonas Bonn <jonas@southpole.se> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm: clean dirty memory after device releaseMa Ling2009-04-201-0/+1
| | | | | | | | | | | | | | | | In current code we register/unregister connector object by drm_sysfs_connector_add/remove function. However under some cases, we need to dynamically register or unregister device multiple times, so we have to go through register -> unregister ->register routine. Because after device_unregister function our memory is dirty, we need to do clean operation in order to re-register the device, otherwise the system will crash. The patch intends to clean device after device release. Signed-off-by: Ma Ling <ling.ma@intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/i915: add VGA hotplug support for 945+Jesse Barnes2009-04-021-0/+1
| | | | | | | | | | | Add VGA port hotplug detection to the i915 driver. When KMS is enabled, plugging in or removing a VGA cable from the VGA connector will generate a uevent, which indicates to userspace that it should re-probe outputs on this device (to determine modes, etc.). Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> [anholt: dropped extra PORT_HOTPLUG_STAT clear with ack from jbarnes] Signed-off-by: Eric Anholt <eric@anholt.net>
* drm: merge Linux master into HEADDave Airlie2009-03-291-2/+2
|\ | | | | | | | | | | | | Conflicts: drivers/gpu/drm/drm_info.c drivers/gpu/drm/drm_proc.c drivers/gpu/drm/i915/i915_gem_debugfs.c
| * drm: struct device - replace bus_id with dev_name(), dev_set_name()Kay Sievers2009-03-251-2/+2
| | | | | | | | | | | | Cc: airlied@linux.ie Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
* | drm: Drop unused and broken dri_library_name sysfs attribute.Kristian Høgsberg2009-03-131-29/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The kernel shouldn't be in the business of telling user space which driver to load. The kernel defers mapping PCI IDs to module names to user space and we should do the same for DRI drivers. And in fact, that's how it does work today. Nothing uses the dri_library_name attribute, and the attribute is in fact broken. For intel devices, it falls back to the default behaviour of returning the kernel module name as the DRI driver name, which doesn't work for i965 devices. Nobody has ever hit this problem or filed a bug about this. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Dave Airlie <airlied@linux.ie>
* | drm: claim PCI device when running in modesetting mode.Kristian Høgsberg2009-03-131-2/+6
|/ | | | | | | | | | Under kernel modesetting, we manage the device at all times, regardless of VT switching and X servers, so the only decent thing to do is to claim the PCI device. In that case, we call the suspend/resume hooks directly from the pci driver hooks instead of the current class device detour. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Dave Airlie <airlied@linux.ie>
* gpu: struct device - replace bus_id with dev_name(), dev_set_name()Kay Sievers2009-01-061-1/+1
| | | | | | CC: Dave Airlie <airlied@redhat.com> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* DRM: add mode setting supportDave Airlie2008-12-291-3/+326
| | | | | | | | | | | | | | | | | | | | | | | | | | Add mode setting support to the DRM layer. This is a fairly big chunk of work that allows DRM drivers to provide full output control and configuration capabilities to userspace. It was motivated by several factors: - the fb layer's APIs aren't suited for anything but simple configurations - coordination between the fb layer, DRM layer, and various userspace drivers is poor to non-existent (radeonfb excepted) - user level mode setting drivers makes displaying panic & oops messages more difficult - suspend/resume of graphics state is possible in many more configurations with kernel level support This commit just adds the core DRM part of the mode setting APIs. Driver specific commits using these new structure and APIs will follow. Co-authors: Jesse Barnes <jbarnes@virtuousgeek.org>, Jakob Bornecrantz <jakob@tungstengraphics.com> Contributors: Alan Hourihane <alanh@tungstengraphics.com>, Maarten Maathuis <madman2003@gmail.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Eric Anholt <eric@anholt.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm: fix sysfs error path.Dave Airlie2008-10-171-1/+1
| | | | | | Pointed out by Roel Kluin on dri-devel. Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm: reorganise drm tree to be more future proof.Dave Airlie2008-07-141-0/+208
With the coming of kernel based modesetting and the memory manager stuff, the everything in one directory approach was getting very ugly and starting to be unmanageable. This restructures the drm along the lines of other kernel components. It creates a drivers/gpu/drm directory and moves the hw drivers into subdirectores. It moves the includes into an include/drm, and sets up the unifdef for the userspace headers we should be exporting. Signed-off-by: Dave Airlie <airlied@redhat.com>