diff options
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_display.c | 9 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_fb.c | 22 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_kms.c | 5 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_mode.h | 3 |
4 files changed, 4 insertions, 35 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_display.c b/drivers/gpu/drm/radeon/radeon_display.c index ddfe91efa61e..dfda5e0ed166 100644 --- a/drivers/gpu/drm/radeon/radeon_display.c +++ b/drivers/gpu/drm/radeon/radeon_display.c | |||
@@ -32,6 +32,7 @@ | |||
32 | 32 | ||
33 | #include <linux/pm_runtime.h> | 33 | #include <linux/pm_runtime.h> |
34 | #include <drm/drm_crtc_helper.h> | 34 | #include <drm/drm_crtc_helper.h> |
35 | #include <drm/drm_fb_helper.h> | ||
35 | #include <drm/drm_plane_helper.h> | 36 | #include <drm/drm_plane_helper.h> |
36 | #include <drm/drm_edid.h> | 37 | #include <drm/drm_edid.h> |
37 | 38 | ||
@@ -1362,15 +1363,9 @@ radeon_user_framebuffer_create(struct drm_device *dev, | |||
1362 | return &radeon_fb->base; | 1363 | return &radeon_fb->base; |
1363 | } | 1364 | } |
1364 | 1365 | ||
1365 | static void radeon_output_poll_changed(struct drm_device *dev) | ||
1366 | { | ||
1367 | struct radeon_device *rdev = dev->dev_private; | ||
1368 | radeon_fb_output_poll_changed(rdev); | ||
1369 | } | ||
1370 | |||
1371 | static const struct drm_mode_config_funcs radeon_mode_funcs = { | 1366 | static const struct drm_mode_config_funcs radeon_mode_funcs = { |
1372 | .fb_create = radeon_user_framebuffer_create, | 1367 | .fb_create = radeon_user_framebuffer_create, |
1373 | .output_poll_changed = radeon_output_poll_changed | 1368 | .output_poll_changed = drm_fb_helper_output_poll_changed, |
1374 | }; | 1369 | }; |
1375 | 1370 | ||
1376 | static const struct drm_prop_enum_list radeon_tmds_pll_enum_list[] = | 1371 | static const struct drm_prop_enum_list radeon_tmds_pll_enum_list[] = |
diff --git a/drivers/gpu/drm/radeon/radeon_fb.c b/drivers/gpu/drm/radeon/radeon_fb.c index 33b821d6d018..57c5404a1654 100644 --- a/drivers/gpu/drm/radeon/radeon_fb.c +++ b/drivers/gpu/drm/radeon/radeon_fb.c | |||
@@ -306,12 +306,6 @@ out: | |||
306 | return ret; | 306 | return ret; |
307 | } | 307 | } |
308 | 308 | ||
309 | void radeon_fb_output_poll_changed(struct radeon_device *rdev) | ||
310 | { | ||
311 | if (rdev->mode_info.rfbdev) | ||
312 | drm_fb_helper_hotplug_event(&rdev->mode_info.rfbdev->helper); | ||
313 | } | ||
314 | |||
315 | static int radeon_fbdev_destroy(struct drm_device *dev, struct radeon_fbdev *rfbdev) | 309 | static int radeon_fbdev_destroy(struct drm_device *dev, struct radeon_fbdev *rfbdev) |
316 | { | 310 | { |
317 | struct radeon_framebuffer *rfb = &rfbdev->rfb; | 311 | struct radeon_framebuffer *rfb = &rfbdev->rfb; |
@@ -422,19 +416,3 @@ void radeon_fb_remove_connector(struct radeon_device *rdev, struct drm_connector | |||
422 | if (rdev->mode_info.rfbdev) | 416 | if (rdev->mode_info.rfbdev) |
423 | drm_fb_helper_remove_one_connector(&rdev->mode_info.rfbdev->helper, connector); | 417 | drm_fb_helper_remove_one_connector(&rdev->mode_info.rfbdev->helper, connector); |
424 | } | 418 | } |
425 | |||
426 | void radeon_fbdev_restore_mode(struct radeon_device *rdev) | ||
427 | { | ||
428 | struct radeon_fbdev *rfbdev = rdev->mode_info.rfbdev; | ||
429 | struct drm_fb_helper *fb_helper; | ||
430 | int ret; | ||
431 | |||
432 | if (!rfbdev) | ||
433 | return; | ||
434 | |||
435 | fb_helper = &rfbdev->helper; | ||
436 | |||
437 | ret = drm_fb_helper_restore_fbdev_mode_unlocked(fb_helper); | ||
438 | if (ret) | ||
439 | DRM_DEBUG("failed to restore crtc mode\n"); | ||
440 | } | ||
diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c index cde037f213d7..dec1e081f529 100644 --- a/drivers/gpu/drm/radeon/radeon_kms.c +++ b/drivers/gpu/drm/radeon/radeon_kms.c | |||
@@ -26,6 +26,7 @@ | |||
26 | * Jerome Glisse | 26 | * Jerome Glisse |
27 | */ | 27 | */ |
28 | #include <drm/drmP.h> | 28 | #include <drm/drmP.h> |
29 | #include <drm/drm_fb_helper.h> | ||
29 | #include "radeon.h" | 30 | #include "radeon.h" |
30 | #include <drm/radeon_drm.h> | 31 | #include <drm/radeon_drm.h> |
31 | #include "radeon_asic.h" | 32 | #include "radeon_asic.h" |
@@ -629,9 +630,7 @@ static int radeon_info_ioctl(struct drm_device *dev, void *data, struct drm_file | |||
629 | */ | 630 | */ |
630 | void radeon_driver_lastclose_kms(struct drm_device *dev) | 631 | void radeon_driver_lastclose_kms(struct drm_device *dev) |
631 | { | 632 | { |
632 | struct radeon_device *rdev = dev->dev_private; | 633 | drm_fb_helper_lastclose(dev); |
633 | |||
634 | radeon_fbdev_restore_mode(rdev); | ||
635 | vga_switcheroo_process_delayed_switch(); | 634 | vga_switcheroo_process_delayed_switch(); |
636 | } | 635 | } |
637 | 636 | ||
diff --git a/drivers/gpu/drm/radeon/radeon_mode.h b/drivers/gpu/drm/radeon/radeon_mode.h index ca0a7ed28c9b..3243e5e01432 100644 --- a/drivers/gpu/drm/radeon/radeon_mode.h +++ b/drivers/gpu/drm/radeon/radeon_mode.h | |||
@@ -984,9 +984,6 @@ int radeon_fbdev_init(struct radeon_device *rdev); | |||
984 | void radeon_fbdev_fini(struct radeon_device *rdev); | 984 | void radeon_fbdev_fini(struct radeon_device *rdev); |
985 | void radeon_fbdev_set_suspend(struct radeon_device *rdev, int state); | 985 | void radeon_fbdev_set_suspend(struct radeon_device *rdev, int state); |
986 | bool radeon_fbdev_robj_is_fb(struct radeon_device *rdev, struct radeon_bo *robj); | 986 | bool radeon_fbdev_robj_is_fb(struct radeon_device *rdev, struct radeon_bo *robj); |
987 | void radeon_fbdev_restore_mode(struct radeon_device *rdev); | ||
988 | |||
989 | void radeon_fb_output_poll_changed(struct radeon_device *rdev); | ||
990 | 987 | ||
991 | void radeon_crtc_handle_vblank(struct radeon_device *rdev, int crtc_id); | 988 | void radeon_crtc_handle_vblank(struct radeon_device *rdev, int crtc_id); |
992 | 989 | ||