diff options
Diffstat (limited to 'drivers/gpu/drm/nouveau')
-rw-r--r-- | drivers/gpu/drm/nouveau/core/subdev/bios/init.c | 21 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/core/subdev/mc/base.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_display.c | 35 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_fbcon.c | 3 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_sgdma.c | 4 |
5 files changed, 37 insertions, 28 deletions
diff --git a/drivers/gpu/drm/nouveau/core/subdev/bios/init.c b/drivers/gpu/drm/nouveau/core/subdev/bios/init.c index 2e11ea02cf87..57cda2a1437b 100644 --- a/drivers/gpu/drm/nouveau/core/subdev/bios/init.c +++ b/drivers/gpu/drm/nouveau/core/subdev/bios/init.c | |||
@@ -579,8 +579,22 @@ static void | |||
579 | init_reserved(struct nvbios_init *init) | 579 | init_reserved(struct nvbios_init *init) |
580 | { | 580 | { |
581 | u8 opcode = nv_ro08(init->bios, init->offset); | 581 | u8 opcode = nv_ro08(init->bios, init->offset); |
582 | trace("RESERVED\t0x%02x\n", opcode); | 582 | u8 length, i; |
583 | init->offset += 1; | 583 | |
584 | switch (opcode) { | ||
585 | case 0xaa: | ||
586 | length = 4; | ||
587 | break; | ||
588 | default: | ||
589 | length = 1; | ||
590 | break; | ||
591 | } | ||
592 | |||
593 | trace("RESERVED 0x%02x\t", opcode); | ||
594 | for (i = 1; i < length; i++) | ||
595 | cont(" 0x%02x", nv_ro08(init->bios, init->offset + i)); | ||
596 | cont("\n"); | ||
597 | init->offset += length; | ||
584 | } | 598 | } |
585 | 599 | ||
586 | /** | 600 | /** |
@@ -1437,7 +1451,7 @@ init_configure_mem(struct nvbios_init *init) | |||
1437 | data = init_rdvgai(init, 0x03c4, 0x01); | 1451 | data = init_rdvgai(init, 0x03c4, 0x01); |
1438 | init_wrvgai(init, 0x03c4, 0x01, data | 0x20); | 1452 | init_wrvgai(init, 0x03c4, 0x01, data | 0x20); |
1439 | 1453 | ||
1440 | while ((addr = nv_ro32(bios, sdata)) != 0xffffffff) { | 1454 | for (; (addr = nv_ro32(bios, sdata)) != 0xffffffff; sdata += 4) { |
1441 | switch (addr) { | 1455 | switch (addr) { |
1442 | case 0x10021c: /* CKE_NORMAL */ | 1456 | case 0x10021c: /* CKE_NORMAL */ |
1443 | case 0x1002d0: /* CMD_REFRESH */ | 1457 | case 0x1002d0: /* CMD_REFRESH */ |
@@ -2135,6 +2149,7 @@ static struct nvbios_init_opcode { | |||
2135 | [0x99] = { init_zm_auxch }, | 2149 | [0x99] = { init_zm_auxch }, |
2136 | [0x9a] = { init_i2c_long_if }, | 2150 | [0x9a] = { init_i2c_long_if }, |
2137 | [0xa9] = { init_gpio_ne }, | 2151 | [0xa9] = { init_gpio_ne }, |
2152 | [0xaa] = { init_reserved }, | ||
2138 | }; | 2153 | }; |
2139 | 2154 | ||
2140 | #define init_opcode_nr (sizeof(init_opcode) / sizeof(init_opcode[0])) | 2155 | #define init_opcode_nr (sizeof(init_opcode) / sizeof(init_opcode[0])) |
diff --git a/drivers/gpu/drm/nouveau/core/subdev/mc/base.c b/drivers/gpu/drm/nouveau/core/subdev/mc/base.c index 37712a6df923..e290cfa4acee 100644 --- a/drivers/gpu/drm/nouveau/core/subdev/mc/base.c +++ b/drivers/gpu/drm/nouveau/core/subdev/mc/base.c | |||
@@ -113,7 +113,7 @@ nouveau_mc_create_(struct nouveau_object *parent, struct nouveau_object *engine, | |||
113 | pmc->use_msi = false; | 113 | pmc->use_msi = false; |
114 | break; | 114 | break; |
115 | default: | 115 | default: |
116 | pmc->use_msi = nouveau_boolopt(device->cfgopt, "NvMSI", true); | 116 | pmc->use_msi = nouveau_boolopt(device->cfgopt, "NvMSI", false); |
117 | if (pmc->use_msi) { | 117 | if (pmc->use_msi) { |
118 | pmc->use_msi = pci_enable_msi(device->pdev) == 0; | 118 | pmc->use_msi = pci_enable_msi(device->pdev) == 0; |
119 | if (pmc->use_msi) { | 119 | if (pmc->use_msi) { |
diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c index d2712e6e5d31..7848590f5568 100644 --- a/drivers/gpu/drm/nouveau/nouveau_display.c +++ b/drivers/gpu/drm/nouveau/nouveau_display.c | |||
@@ -278,7 +278,6 @@ nouveau_display_create(struct drm_device *dev) | |||
278 | { | 278 | { |
279 | struct nouveau_drm *drm = nouveau_drm(dev); | 279 | struct nouveau_drm *drm = nouveau_drm(dev); |
280 | struct nouveau_display *disp; | 280 | struct nouveau_display *disp; |
281 | u32 pclass = dev->pdev->class >> 8; | ||
282 | int ret, gen; | 281 | int ret, gen; |
283 | 282 | ||
284 | disp = drm->display = kzalloc(sizeof(*disp), GFP_KERNEL); | 283 | disp = drm->display = kzalloc(sizeof(*disp), GFP_KERNEL); |
@@ -340,29 +339,25 @@ nouveau_display_create(struct drm_device *dev) | |||
340 | drm_kms_helper_poll_init(dev); | 339 | drm_kms_helper_poll_init(dev); |
341 | drm_kms_helper_poll_disable(dev); | 340 | drm_kms_helper_poll_disable(dev); |
342 | 341 | ||
343 | if (nouveau_modeset == 1 || | 342 | if (drm->vbios.dcb.entries) { |
344 | (nouveau_modeset < 0 && pclass == PCI_CLASS_DISPLAY_VGA)) { | 343 | if (nv_device(drm->device)->card_type < NV_50) |
345 | if (drm->vbios.dcb.entries) { | 344 | ret = nv04_display_create(dev); |
346 | if (nv_device(drm->device)->card_type < NV_50) | 345 | else |
347 | ret = nv04_display_create(dev); | 346 | ret = nv50_display_create(dev); |
348 | else | 347 | } else { |
349 | ret = nv50_display_create(dev); | 348 | ret = 0; |
350 | } else { | 349 | } |
351 | ret = 0; | ||
352 | } | ||
353 | |||
354 | if (ret) | ||
355 | goto disp_create_err; | ||
356 | 350 | ||
357 | if (dev->mode_config.num_crtc) { | 351 | if (ret) |
358 | ret = drm_vblank_init(dev, dev->mode_config.num_crtc); | 352 | goto disp_create_err; |
359 | if (ret) | ||
360 | goto vblank_err; | ||
361 | } | ||
362 | 353 | ||
363 | nouveau_backlight_init(dev); | 354 | if (dev->mode_config.num_crtc) { |
355 | ret = drm_vblank_init(dev, dev->mode_config.num_crtc); | ||
356 | if (ret) | ||
357 | goto vblank_err; | ||
364 | } | 358 | } |
365 | 359 | ||
360 | nouveau_backlight_init(dev); | ||
366 | return 0; | 361 | return 0; |
367 | 362 | ||
368 | vblank_err: | 363 | vblank_err: |
diff --git a/drivers/gpu/drm/nouveau/nouveau_fbcon.c b/drivers/gpu/drm/nouveau/nouveau_fbcon.c index 8f6d63d7edd3..a86ecf65c164 100644 --- a/drivers/gpu/drm/nouveau/nouveau_fbcon.c +++ b/drivers/gpu/drm/nouveau/nouveau_fbcon.c | |||
@@ -454,7 +454,8 @@ nouveau_fbcon_init(struct drm_device *dev) | |||
454 | int preferred_bpp; | 454 | int preferred_bpp; |
455 | int ret; | 455 | int ret; |
456 | 456 | ||
457 | if (!dev->mode_config.num_crtc) | 457 | if (!dev->mode_config.num_crtc || |
458 | (dev->pdev->class >> 8) != PCI_CLASS_DISPLAY_VGA) | ||
458 | return 0; | 459 | return 0; |
459 | 460 | ||
460 | fbcon = kzalloc(sizeof(struct nouveau_fbdev), GFP_KERNEL); | 461 | fbcon = kzalloc(sizeof(struct nouveau_fbdev), GFP_KERNEL); |
diff --git a/drivers/gpu/drm/nouveau/nouveau_sgdma.c b/drivers/gpu/drm/nouveau/nouveau_sgdma.c index ca5492ac2da5..0843ebc910d4 100644 --- a/drivers/gpu/drm/nouveau/nouveau_sgdma.c +++ b/drivers/gpu/drm/nouveau/nouveau_sgdma.c | |||
@@ -104,9 +104,7 @@ nouveau_sgdma_create_ttm(struct ttm_bo_device *bdev, | |||
104 | else | 104 | else |
105 | nvbe->ttm.ttm.func = &nv50_sgdma_backend; | 105 | nvbe->ttm.ttm.func = &nv50_sgdma_backend; |
106 | 106 | ||
107 | if (ttm_dma_tt_init(&nvbe->ttm, bdev, size, page_flags, dummy_read_page)) { | 107 | if (ttm_dma_tt_init(&nvbe->ttm, bdev, size, page_flags, dummy_read_page)) |
108 | kfree(nvbe); | ||
109 | return NULL; | 108 | return NULL; |
110 | } | ||
111 | return &nvbe->ttm.ttm; | 109 | return &nvbe->ttm.ttm; |
112 | } | 110 | } |