aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/radeon_device.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2010-03-30 01:34:13 -0400
committerDave Airlie <airlied@redhat.com>2010-04-06 20:21:03 -0400
commit386516744ba45d50f42c6999151cc210cb4f96e4 (patch)
tree88e3b6aeb83040a8bd512eb7aad087e6c0fcd556 /drivers/gpu/drm/radeon/radeon_device.c
parent643acacf02679befd0f98ac3c5fecb805f1c9548 (diff)
drm/fb: fix fbdev object model + cleanup properly.
The fbdev layer in the kms code should act like a consumer of the kms services and avoid having relying on information being store in the kms core structures in order for it to work. This patch a) removes the info pointer/psuedo palette from the core drm_framebuffer structure and moves it to the fbdev helper layer, it also removes the core drm keeping a list of kernel kms fbdevs. b) migrated all the fb helper functions out of the crtc helper file into the fb helper file. c) pushed the fb probing/hotplug control into the driver d) makes the surface sizes into a structure for ease of passing This changes the intel/radeon/nouveau drivers to use the new helper. Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_device.c')
-rw-r--r--drivers/gpu/drm/radeon/radeon_device.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c
index 60ec47b71642..90e8883494ad 100644
--- a/drivers/gpu/drm/radeon/radeon_device.c
+++ b/drivers/gpu/drm/radeon/radeon_device.c
@@ -676,9 +676,10 @@ int radeon_suspend_kms(struct drm_device *dev, pm_message_t state)
676 continue; 676 continue;
677 } 677 }
678 robj = rfb->obj->driver_private; 678 robj = rfb->obj->driver_private;
679 if (robj != rdev->fbdev_rbo) { 679 /* don't unpin kernel fb objects */
680 if (!radeon_fbdev_robj_is_fb(rdev, robj)) {
680 r = radeon_bo_reserve(robj, false); 681 r = radeon_bo_reserve(robj, false);
681 if (unlikely(r == 0)) { 682 if (r == 0) {
682 radeon_bo_unpin(robj); 683 radeon_bo_unpin(robj);
683 radeon_bo_unreserve(robj); 684 radeon_bo_unreserve(robj);
684 } 685 }
@@ -703,7 +704,7 @@ int radeon_suspend_kms(struct drm_device *dev, pm_message_t state)
703 pci_set_power_state(dev->pdev, PCI_D3hot); 704 pci_set_power_state(dev->pdev, PCI_D3hot);
704 } 705 }
705 acquire_console_sem(); 706 acquire_console_sem();
706 fb_set_suspend(rdev->fbdev_info, 1); 707 radeon_fbdev_set_suspend(rdev, 1);
707 release_console_sem(); 708 release_console_sem();
708 return 0; 709 return 0;
709} 710}
@@ -727,7 +728,7 @@ int radeon_resume_kms(struct drm_device *dev)
727 radeon_agp_resume(rdev); 728 radeon_agp_resume(rdev);
728 radeon_resume(rdev); 729 radeon_resume(rdev);
729 radeon_restore_bios_scratch_regs(rdev); 730 radeon_restore_bios_scratch_regs(rdev);
730 fb_set_suspend(rdev->fbdev_info, 0); 731 radeon_fbdev_set_suspend(rdev, 0);
731 release_console_sem(); 732 release_console_sem();
732 733
733 /* reset hpd state */ 734 /* reset hpd state */