diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-21 11:10:09 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-21 11:10:09 -0400 |
commit | 44040f107e64d689ccd3211ac62c6bc44f3f0775 (patch) | |
tree | f85059028aa570e758c7fb272fd8cf823ab4f119 /drivers/gpu/drm/drm_sysfs.c | |
parent | 388dba30471c236a290c4082bce5f2b5cd1a7a06 (diff) | |
parent | 28d520433b6375740990ab99d69b0d0067fd656b (diff) |
Merge branch 'drm-linus' of 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.
Diffstat (limited to 'drivers/gpu/drm/drm_sysfs.c')
-rw-r--r-- | drivers/gpu/drm/drm_sysfs.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_sysfs.c b/drivers/gpu/drm/drm_sysfs.c index 5301f226cb1c..7e42b7e9d43a 100644 --- a/drivers/gpu/drm/drm_sysfs.c +++ b/drivers/gpu/drm/drm_sysfs.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/kdev_t.h> | 16 | #include <linux/kdev_t.h> |
17 | #include <linux/err.h> | 17 | #include <linux/err.h> |
18 | 18 | ||
19 | #include "drm_sysfs.h" | ||
19 | #include "drm_core.h" | 20 | #include "drm_core.h" |
20 | #include "drmP.h" | 21 | #include "drmP.h" |
21 | 22 | ||
@@ -253,6 +254,7 @@ static ssize_t subconnector_show(struct device *device, | |||
253 | case DRM_MODE_CONNECTOR_Composite: | 254 | case DRM_MODE_CONNECTOR_Composite: |
254 | case DRM_MODE_CONNECTOR_SVIDEO: | 255 | case DRM_MODE_CONNECTOR_SVIDEO: |
255 | case DRM_MODE_CONNECTOR_Component: | 256 | case DRM_MODE_CONNECTOR_Component: |
257 | case DRM_MODE_CONNECTOR_TV: | ||
256 | prop = dev->mode_config.tv_subconnector_property; | 258 | prop = dev->mode_config.tv_subconnector_property; |
257 | is_tv = 1; | 259 | is_tv = 1; |
258 | break; | 260 | break; |
@@ -293,6 +295,7 @@ static ssize_t select_subconnector_show(struct device *device, | |||
293 | case DRM_MODE_CONNECTOR_Composite: | 295 | case DRM_MODE_CONNECTOR_Composite: |
294 | case DRM_MODE_CONNECTOR_SVIDEO: | 296 | case DRM_MODE_CONNECTOR_SVIDEO: |
295 | case DRM_MODE_CONNECTOR_Component: | 297 | case DRM_MODE_CONNECTOR_Component: |
298 | case DRM_MODE_CONNECTOR_TV: | ||
296 | prop = dev->mode_config.tv_select_subconnector_property; | 299 | prop = dev->mode_config.tv_select_subconnector_property; |
297 | is_tv = 1; | 300 | is_tv = 1; |
298 | break; | 301 | break; |
@@ -391,6 +394,7 @@ int drm_sysfs_connector_add(struct drm_connector *connector) | |||
391 | case DRM_MODE_CONNECTOR_Composite: | 394 | case DRM_MODE_CONNECTOR_Composite: |
392 | case DRM_MODE_CONNECTOR_SVIDEO: | 395 | case DRM_MODE_CONNECTOR_SVIDEO: |
393 | case DRM_MODE_CONNECTOR_Component: | 396 | case DRM_MODE_CONNECTOR_Component: |
397 | case DRM_MODE_CONNECTOR_TV: | ||
394 | for (i = 0; i < ARRAY_SIZE(connector_attrs_opt1); i++) { | 398 | for (i = 0; i < ARRAY_SIZE(connector_attrs_opt1); i++) { |
395 | ret = device_create_file(&connector->kdev, &connector_attrs_opt1[i]); | 399 | ret = device_create_file(&connector->kdev, &connector_attrs_opt1[i]); |
396 | if (ret) | 400 | if (ret) |
@@ -519,3 +523,27 @@ void drm_sysfs_device_remove(struct drm_minor *minor) | |||
519 | { | 523 | { |
520 | device_unregister(&minor->kdev); | 524 | device_unregister(&minor->kdev); |
521 | } | 525 | } |
526 | |||
527 | |||
528 | /** | ||
529 | * drm_class_device_register - Register a struct device in the drm class. | ||
530 | * | ||
531 | * @dev: pointer to struct device to register. | ||
532 | * | ||
533 | * @dev should have all relevant members pre-filled with the exception | ||
534 | * of the class member. In particular, the device_type member must | ||
535 | * be set. | ||
536 | */ | ||
537 | |||
538 | int drm_class_device_register(struct device *dev) | ||
539 | { | ||
540 | dev->class = drm_class; | ||
541 | return device_register(dev); | ||
542 | } | ||
543 | EXPORT_SYMBOL_GPL(drm_class_device_register); | ||
544 | |||
545 | void drm_class_device_unregister(struct device *dev) | ||
546 | { | ||
547 | return device_unregister(dev); | ||
548 | } | ||
549 | EXPORT_SYMBOL_GPL(drm_class_device_unregister); | ||