diff options
Diffstat (limited to 'drivers/gpu/drm/radeon')
-rw-r--r-- | drivers/gpu/drm/radeon/atombios_crtc.c | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon.h | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_agp.c | 5 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_atombios.c | 13 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_device.c | 2 |
5 files changed, 20 insertions, 2 deletions
diff --git a/drivers/gpu/drm/radeon/atombios_crtc.c b/drivers/gpu/drm/radeon/atombios_crtc.c index 03dd6c41dc19..f3f2827017ef 100644 --- a/drivers/gpu/drm/radeon/atombios_crtc.c +++ b/drivers/gpu/drm/radeon/atombios_crtc.c | |||
@@ -707,6 +707,7 @@ static void atombios_crtc_set_pll(struct drm_crtc *crtc, struct drm_display_mode | |||
707 | break; | 707 | break; |
708 | case ATOM_DCPLL: | 708 | case ATOM_DCPLL: |
709 | case ATOM_PPLL_INVALID: | 709 | case ATOM_PPLL_INVALID: |
710 | default: | ||
710 | pll = &rdev->clock.dcpll; | 711 | pll = &rdev->clock.dcpll; |
711 | break; | 712 | break; |
712 | } | 713 | } |
diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h index 66a37fb75839..669feb689bfc 100644 --- a/drivers/gpu/drm/radeon/radeon.h +++ b/drivers/gpu/drm/radeon/radeon.h | |||
@@ -576,6 +576,7 @@ typedef int (*radeon_packet3_check_t)(struct radeon_cs_parser *p, | |||
576 | */ | 576 | */ |
577 | int radeon_agp_init(struct radeon_device *rdev); | 577 | int radeon_agp_init(struct radeon_device *rdev); |
578 | void radeon_agp_resume(struct radeon_device *rdev); | 578 | void radeon_agp_resume(struct radeon_device *rdev); |
579 | void radeon_agp_suspend(struct radeon_device *rdev); | ||
579 | void radeon_agp_fini(struct radeon_device *rdev); | 580 | void radeon_agp_fini(struct radeon_device *rdev); |
580 | 581 | ||
581 | 582 | ||
diff --git a/drivers/gpu/drm/radeon/radeon_agp.c b/drivers/gpu/drm/radeon/radeon_agp.c index 28e473f1f56f..f40dfb77f9b1 100644 --- a/drivers/gpu/drm/radeon/radeon_agp.c +++ b/drivers/gpu/drm/radeon/radeon_agp.c | |||
@@ -270,3 +270,8 @@ void radeon_agp_fini(struct radeon_device *rdev) | |||
270 | } | 270 | } |
271 | #endif | 271 | #endif |
272 | } | 272 | } |
273 | |||
274 | void radeon_agp_suspend(struct radeon_device *rdev) | ||
275 | { | ||
276 | radeon_agp_fini(rdev); | ||
277 | } | ||
diff --git a/drivers/gpu/drm/radeon/radeon_atombios.c b/drivers/gpu/drm/radeon/radeon_atombios.c index 6e733fdc3349..24ea683f7cf5 100644 --- a/drivers/gpu/drm/radeon/radeon_atombios.c +++ b/drivers/gpu/drm/radeon/radeon_atombios.c | |||
@@ -680,10 +680,18 @@ bool radeon_get_atom_connector_info_from_supported_devices_table(struct | |||
680 | uint8_t dac; | 680 | uint8_t dac; |
681 | union atom_supported_devices *supported_devices; | 681 | union atom_supported_devices *supported_devices; |
682 | int i, j, max_device; | 682 | int i, j, max_device; |
683 | struct bios_connector bios_connectors[ATOM_MAX_SUPPORTED_DEVICE]; | 683 | struct bios_connector *bios_connectors; |
684 | size_t bc_size = sizeof(*bios_connectors) * ATOM_MAX_SUPPORTED_DEVICE; | ||
684 | 685 | ||
685 | if (!atom_parse_data_header(ctx, index, &size, &frev, &crev, &data_offset)) | 686 | bios_connectors = kzalloc(bc_size, GFP_KERNEL); |
687 | if (!bios_connectors) | ||
688 | return false; | ||
689 | |||
690 | if (!atom_parse_data_header(ctx, index, &size, &frev, &crev, | ||
691 | &data_offset)) { | ||
692 | kfree(bios_connectors); | ||
686 | return false; | 693 | return false; |
694 | } | ||
687 | 695 | ||
688 | supported_devices = | 696 | supported_devices = |
689 | (union atom_supported_devices *)(ctx->bios + data_offset); | 697 | (union atom_supported_devices *)(ctx->bios + data_offset); |
@@ -851,6 +859,7 @@ bool radeon_get_atom_connector_info_from_supported_devices_table(struct | |||
851 | 859 | ||
852 | radeon_link_encoder_connector(dev); | 860 | radeon_link_encoder_connector(dev); |
853 | 861 | ||
862 | kfree(bios_connectors); | ||
854 | return true; | 863 | return true; |
855 | } | 864 | } |
856 | 865 | ||
diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c index a20b612ffe75..fdc3fdf78acb 100644 --- a/drivers/gpu/drm/radeon/radeon_device.c +++ b/drivers/gpu/drm/radeon/radeon_device.c | |||
@@ -754,6 +754,8 @@ int radeon_suspend_kms(struct drm_device *dev, pm_message_t state) | |||
754 | /* evict remaining vram memory */ | 754 | /* evict remaining vram memory */ |
755 | radeon_bo_evict_vram(rdev); | 755 | radeon_bo_evict_vram(rdev); |
756 | 756 | ||
757 | radeon_agp_suspend(rdev); | ||
758 | |||
757 | pci_save_state(dev->pdev); | 759 | pci_save_state(dev->pdev); |
758 | if (state.event == PM_EVENT_SUSPEND) { | 760 | if (state.event == PM_EVENT_SUSPEND) { |
759 | /* Shut down the device */ | 761 | /* Shut down the device */ |