aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nv50_display.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2011-07-03 20:47:19 -0400
committerBen Skeggs <bskeggs@redhat.com>2011-09-20 02:05:04 -0400
commit048a88595a66526f68636b51b1cdb5842bc0f28c (patch)
treeb1d1378c1d6b87c9ab5687f355630697a2a3874a /drivers/gpu/drm/nouveau/nv50_display.c
parent2e9733ff7d4f1c7185bea16041f532d6142ca40a (diff)
drm/nouveau: make general drm modesetting init common
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nv50_display.c')
-rw-r--r--drivers/gpu/drm/nouveau/nv50_display.c29
1 files changed, 10 insertions, 19 deletions
diff --git a/drivers/gpu/drm/nouveau/nv50_display.c b/drivers/gpu/drm/nouveau/nv50_display.c
index db1a5f4b711d..5754c0ac8937 100644
--- a/drivers/gpu/drm/nouveau/nv50_display.c
+++ b/drivers/gpu/drm/nouveau/nv50_display.c
@@ -247,6 +247,16 @@ static int nv50_display_disable(struct drm_device *dev)
247 } 247 }
248 } 248 }
249 249
250 for (i = 0; i < 2; i++) {
251 nv_wr32(dev, NV50_PDISPLAY_CURSOR_CURSOR_CTRL2(i), 0);
252 if (!nv_wait(dev, NV50_PDISPLAY_CURSOR_CURSOR_CTRL2(i),
253 NV50_PDISPLAY_CURSOR_CURSOR_CTRL2_STATUS, 0)) {
254 NV_ERROR(dev, "timeout: CURSOR_CTRL2_STATUS == 0\n");
255 NV_ERROR(dev, "CURSOR_CTRL2 = 0x%08x\n",
256 nv_rd32(dev, NV50_PDISPLAY_CURSOR_CURSOR_CTRL2(i)));
257 }
258 }
259
250 nv50_evo_fini(dev); 260 nv50_evo_fini(dev);
251 261
252 for (i = 0; i < 3; i++) { 262 for (i = 0; i < 3; i++) {
@@ -286,23 +296,6 @@ int nv50_display_create(struct drm_device *dev)
286 return -ENOMEM; 296 return -ENOMEM;
287 dev_priv->engine.display.priv = priv; 297 dev_priv->engine.display.priv = priv;
288 298
289 /* init basic kernel modesetting */
290 drm_mode_config_init(dev);
291
292 /* Initialise some optional connector properties. */
293 drm_mode_create_scaling_mode_property(dev);
294 drm_mode_create_dithering_property(dev);
295
296 dev->mode_config.min_width = 0;
297 dev->mode_config.min_height = 0;
298
299 dev->mode_config.funcs = (void *)&nouveau_mode_config_funcs;
300
301 dev->mode_config.max_width = 8192;
302 dev->mode_config.max_height = 8192;
303
304 dev->mode_config.fb_base = dev_priv->fb_phys;
305
306 /* Create CRTC objects */ 299 /* Create CRTC objects */
307 for (i = 0; i < 2; i++) 300 for (i = 0; i < 2; i++)
308 nv50_crtc_create(dev, i); 301 nv50_crtc_create(dev, i);
@@ -364,8 +357,6 @@ nv50_display_destroy(struct drm_device *dev)
364 357
365 NV_DEBUG_KMS(dev, "\n"); 358 NV_DEBUG_KMS(dev, "\n");
366 359
367 drm_mode_config_cleanup(dev);
368
369 nv50_display_disable(dev); 360 nv50_display_disable(dev);
370 nouveau_irq_unregister(dev, 26); 361 nouveau_irq_unregister(dev, 26);
371 kfree(disp); 362 kfree(disp);