aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nouveau_state.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/nouveau/nouveau_state.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/nouveau/nouveau_state.c')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_state.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_state.c b/drivers/gpu/drm/nouveau/nouveau_state.c
index 58b46807de2..23e67bf0898 100644
--- a/drivers/gpu/drm/nouveau/nouveau_state.c
+++ b/drivers/gpu/drm/nouveau/nouveau_state.c
@@ -33,6 +33,7 @@
33 33
34#include "nouveau_drv.h" 34#include "nouveau_drv.h"
35#include "nouveau_drm.h" 35#include "nouveau_drm.h"
36#include "nouveau_fbcon.h"
36#include "nv50_display.h" 37#include "nv50_display.h"
37 38
38static void nouveau_stub_takedown(struct drm_device *dev) {} 39static void nouveau_stub_takedown(struct drm_device *dev) {}
@@ -511,7 +512,7 @@ nouveau_card_init(struct drm_device *dev)
511 dev_priv->init_state = NOUVEAU_CARD_INIT_DONE; 512 dev_priv->init_state = NOUVEAU_CARD_INIT_DONE;
512 513
513 if (drm_core_check_feature(dev, DRIVER_MODESET)) 514 if (drm_core_check_feature(dev, DRIVER_MODESET))
514 drm_helper_initial_config(dev); 515 nouveau_fbcon_init(dev);
515 516
516 return 0; 517 return 0;
517 518
@@ -552,6 +553,7 @@ static void nouveau_card_takedown(struct drm_device *dev)
552 NV_DEBUG(dev, "prev state = %d\n", dev_priv->init_state); 553 NV_DEBUG(dev, "prev state = %d\n", dev_priv->init_state);
553 554
554 if (dev_priv->init_state != NOUVEAU_CARD_INIT_DOWN) { 555 if (dev_priv->init_state != NOUVEAU_CARD_INIT_DOWN) {
556
555 nouveau_backlight_exit(dev); 557 nouveau_backlight_exit(dev);
556 558
557 if (dev_priv->channel) { 559 if (dev_priv->channel) {
@@ -783,6 +785,7 @@ int nouveau_unload(struct drm_device *dev)
783 struct drm_nouveau_private *dev_priv = dev->dev_private; 785 struct drm_nouveau_private *dev_priv = dev->dev_private;
784 786
785 if (drm_core_check_feature(dev, DRIVER_MODESET)) { 787 if (drm_core_check_feature(dev, DRIVER_MODESET)) {
788 nouveau_fbcon_fini(dev);
786 if (dev_priv->card_type >= NV_50) 789 if (dev_priv->card_type >= NV_50)
787 nv50_display_destroy(dev); 790 nv50_display_destroy(dev);
788 else 791 else