diff options
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/drm_edid.c | 5 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_connector.c | 3 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nv40_graph.c | 8 | ||||
-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 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_state.c | 5 |
9 files changed, 36 insertions, 7 deletions
diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index f569ae88ab38..c1981861bbbd 100644 --- a/drivers/gpu/drm/drm_edid.c +++ b/drivers/gpu/drm/drm_edid.c | |||
@@ -147,7 +147,10 @@ drm_edid_block_valid(u8 *raw_edid) | |||
147 | csum += raw_edid[i]; | 147 | csum += raw_edid[i]; |
148 | if (csum) { | 148 | if (csum) { |
149 | DRM_ERROR("EDID checksum is invalid, remainder is %d\n", csum); | 149 | DRM_ERROR("EDID checksum is invalid, remainder is %d\n", csum); |
150 | goto bad; | 150 | |
151 | /* allow CEA to slide through, switches mangle this */ | ||
152 | if (raw_edid[0] != 0x02) | ||
153 | goto bad; | ||
151 | } | 154 | } |
152 | 155 | ||
153 | /* per-block-type checks */ | 156 | /* per-block-type checks */ |
diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.c b/drivers/gpu/drm/nouveau/nouveau_connector.c index 7e663a79829f..266b0ff441af 100644 --- a/drivers/gpu/drm/nouveau/nouveau_connector.c +++ b/drivers/gpu/drm/nouveau/nouveau_connector.c | |||
@@ -241,7 +241,8 @@ nouveau_connector_detect(struct drm_connector *connector) | |||
241 | if (nv_encoder && nv_connector->native_mode) { | 241 | if (nv_encoder && nv_connector->native_mode) { |
242 | unsigned status = connector_status_connected; | 242 | unsigned status = connector_status_connected; |
243 | 243 | ||
244 | #ifdef CONFIG_ACPI | 244 | #if defined(CONFIG_ACPI_BUTTON) || \ |
245 | (defined(CONFIG_ACPI_BUTTON_MODULE) && defined(MODULE)) | ||
245 | if (!nouveau_ignorelid && !acpi_lid_open()) | 246 | if (!nouveau_ignorelid && !acpi_lid_open()) |
246 | status = connector_status_unknown; | 247 | status = connector_status_unknown; |
247 | #endif | 248 | #endif |
diff --git a/drivers/gpu/drm/nouveau/nv40_graph.c b/drivers/gpu/drm/nouveau/nv40_graph.c index 0616c96e4b67..704a25d04ac9 100644 --- a/drivers/gpu/drm/nouveau/nv40_graph.c +++ b/drivers/gpu/drm/nouveau/nv40_graph.c | |||
@@ -253,7 +253,11 @@ nv40_graph_init(struct drm_device *dev) | |||
253 | 253 | ||
254 | if (!dev_priv->engine.graph.ctxprog) { | 254 | if (!dev_priv->engine.graph.ctxprog) { |
255 | struct nouveau_grctx ctx = {}; | 255 | struct nouveau_grctx ctx = {}; |
256 | uint32_t cp[256]; | 256 | uint32_t *cp; |
257 | |||
258 | cp = kmalloc(sizeof(*cp) * 256, GFP_KERNEL); | ||
259 | if (!cp) | ||
260 | return -ENOMEM; | ||
257 | 261 | ||
258 | ctx.dev = dev; | 262 | ctx.dev = dev; |
259 | ctx.mode = NOUVEAU_GRCTX_PROG; | 263 | ctx.mode = NOUVEAU_GRCTX_PROG; |
@@ -265,6 +269,8 @@ nv40_graph_init(struct drm_device *dev) | |||
265 | nv_wr32(dev, NV40_PGRAPH_CTXCTL_UCODE_INDEX, 0); | 269 | nv_wr32(dev, NV40_PGRAPH_CTXCTL_UCODE_INDEX, 0); |
266 | for (i = 0; i < ctx.ctxprog_len; i++) | 270 | for (i = 0; i < ctx.ctxprog_len; i++) |
267 | nv_wr32(dev, NV40_PGRAPH_CTXCTL_UCODE_DATA, cp[i]); | 271 | nv_wr32(dev, NV40_PGRAPH_CTXCTL_UCODE_DATA, cp[i]); |
272 | |||
273 | kfree(cp); | ||
268 | } | 274 | } |
269 | 275 | ||
270 | /* No context present currently */ | 276 | /* No context present currently */ |
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 */ |
diff --git a/drivers/gpu/drm/radeon/radeon_state.c b/drivers/gpu/drm/radeon/radeon_state.c index cc5316dcf580..b3ba44c0a818 100644 --- a/drivers/gpu/drm/radeon/radeon_state.c +++ b/drivers/gpu/drm/radeon/radeon_state.c | |||
@@ -900,9 +900,10 @@ static void radeon_cp_dispatch_clear(struct drm_device * dev, | |||
900 | flags |= RADEON_FRONT; | 900 | flags |= RADEON_FRONT; |
901 | } | 901 | } |
902 | if (flags & (RADEON_DEPTH|RADEON_STENCIL)) { | 902 | if (flags & (RADEON_DEPTH|RADEON_STENCIL)) { |
903 | if (!dev_priv->have_z_offset) | 903 | if (!dev_priv->have_z_offset) { |
904 | printk_once(KERN_ERR "radeon: illegal depth clear request. Buggy mesa detected - please update.\n"); | 904 | printk_once(KERN_ERR "radeon: illegal depth clear request. Buggy mesa detected - please update.\n"); |
905 | flags &= ~(RADEON_DEPTH | RADEON_STENCIL); | 905 | flags &= ~(RADEON_DEPTH | RADEON_STENCIL); |
906 | } | ||
906 | } | 907 | } |
907 | 908 | ||
908 | if (flags & (RADEON_FRONT | RADEON_BACK)) { | 909 | if (flags & (RADEON_FRONT | RADEON_BACK)) { |