summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nouveau/nv04_display.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2012-07-18 04:00:50 +0400
committerBen Skeggs <bskeggs@redhat.com>2012-10-03 07:12:53 +0400
commit017e6e2955a8b290653aa71bd321609d0d4b1486 (patch)
treec891b865843f0d11437a7acb17063ea028239179 /drivers/gpu/drm/nouveau/nv04_display.c
parent3863c9bc887e9638a9d905d55f6038641ece78d6 (diff)
downloadlinux-017e6e2955a8b290653aa71bd321609d0d4b1486.tar.xz
drm/nv04/disp: kick all private state out to own header
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nv04_display.c')
-rw-r--r--drivers/gpu/drm/nouveau/nv04_display.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nv04_display.c b/drivers/gpu/drm/nouveau/nv04_display.c
index 2b7d23e8f27f..81947ea0f82d 100644
--- a/drivers/gpu/drm/nouveau/nv04_display.c
+++ b/drivers/gpu/drm/nouveau/nv04_display.c
@@ -61,10 +61,16 @@ nv04_display_create(struct drm_device *dev)
struct drm_connector *connector, *ct;
struct drm_encoder *encoder;
struct drm_crtc *crtc;
+ struct nv04_display *disp;
int i, ret;
NV_DEBUG_KMS(dev, "\n");
+ disp = kzalloc(sizeof(*disp), GFP_KERNEL);
+ dev_priv->engine.display.priv = disp;
+ if (!disp)
+ return -ENOMEM;
+
nouveau_hw_save_vga_fonts(dev, 1);
nv04_crtc_create(dev, 0);
@@ -128,6 +134,8 @@ nv04_display_create(struct drm_device *dev)
void
nv04_display_destroy(struct drm_device *dev)
{
+ struct drm_nouveau_private *dev_priv = dev->dev_private;
+ struct nv04_display *disp = nv04_display(dev);
struct drm_encoder *encoder;
struct drm_crtc *crtc;
@@ -156,6 +164,9 @@ nv04_display_destroy(struct drm_device *dev)
crtc->funcs->restore(crtc);
nouveau_hw_save_vga_fonts(dev, 0);
+
+ dev_priv->engine.display.priv = NULL;
+ kfree(disp);
}
int