aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/radeon_display.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2010-05-07 02:42:51 -0400
committerDave Airlie <airlied@redhat.com>2010-05-18 03:40:11 -0400
commiteb1f8e4f3be898df808e2dfc131099f5831d491d (patch)
tree9e5807824c60601f23016f3a2e82f8de10f7435a /drivers/gpu/drm/radeon/radeon_display.c
parent0ddfa7d574e0f3a7510b0be6c8ed807af017223f (diff)
drm/fbdev: rework output polling to be back in the core. (v4)
After thinking it over a lot it made more sense for the core to deal with the output polling especially so it can notify X. v2: drop plans for fake connector - per Michel's comments - fix X patch sent to xorg-devel, add intel polled/hpd setting, add initial nouveau polled/hpd settings. v3: add config lock take inside polling, add intel/nouveau poll init/fini calls v4: config lock was a bit agressive, only needed around connector list reading. otherwise it could re-enter. glisse: discard drm_helper_hpd_irq_event v3: Reviewed-by: Michel Dänzer <michel@daenzer.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_display.c')
-rw-r--r--drivers/gpu/drm/radeon/radeon_display.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_display.c b/drivers/gpu/drm/radeon/radeon_display.c
index 243c1c4bc836..bc9cc9211e67 100644
--- a/drivers/gpu/drm/radeon/radeon_display.c
+++ b/drivers/gpu/drm/radeon/radeon_display.c
@@ -888,8 +888,15 @@ radeon_user_framebuffer_create(struct drm_device *dev,
888 return &radeon_fb->base; 888 return &radeon_fb->base;
889} 889}
890 890
891static void radeon_output_poll_changed(struct drm_device *dev)
892{
893 struct radeon_device *rdev = dev->dev_private;
894 radeon_fb_output_poll_changed(rdev);
895}
896
891static const struct drm_mode_config_funcs radeon_mode_funcs = { 897static const struct drm_mode_config_funcs radeon_mode_funcs = {
892 .fb_create = radeon_user_framebuffer_create, 898 .fb_create = radeon_user_framebuffer_create,
899 .output_poll_changed = radeon_output_poll_changed
893}; 900};
894 901
895struct drm_prop_enum_list { 902struct drm_prop_enum_list {
@@ -1031,6 +1038,8 @@ int radeon_modeset_init(struct radeon_device *rdev)
1031 radeon_hpd_init(rdev); 1038 radeon_hpd_init(rdev);
1032 1039
1033 radeon_fbdev_init(rdev); 1040 radeon_fbdev_init(rdev);
1041 drm_kms_helper_poll_init(rdev->ddev);
1042
1034 return 0; 1043 return 0;
1035} 1044}
1036 1045
@@ -1040,6 +1049,7 @@ void radeon_modeset_fini(struct radeon_device *rdev)
1040 kfree(rdev->mode_info.bios_hardcoded_edid); 1049 kfree(rdev->mode_info.bios_hardcoded_edid);
1041 1050
1042 if (rdev->mode_info.mode_config_initialized) { 1051 if (rdev->mode_info.mode_config_initialized) {
1052 drm_kms_helper_poll_fini(rdev->ddev);
1043 radeon_hpd_fini(rdev); 1053 radeon_hpd_fini(rdev);
1044 drm_mode_config_cleanup(rdev->ddev); 1054 drm_mode_config_cleanup(rdev->ddev);
1045 rdev->mode_info.mode_config_initialized = false; 1055 rdev->mode_info.mode_config_initialized = false;