diff options
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/gma500/mid_bios.c | 14 | ||||
-rw-r--r-- | drivers/gpu/drm/gma500/psb_drv.c | 2 |
2 files changed, 15 insertions, 1 deletions
diff --git a/drivers/gpu/drm/gma500/mid_bios.c b/drivers/gpu/drm/gma500/mid_bios.c index 128e6bb37568..55fee10eefff 100644 --- a/drivers/gpu/drm/gma500/mid_bios.c +++ b/drivers/gpu/drm/gma500/mid_bios.c | |||
@@ -45,6 +45,12 @@ static void mid_get_fuse_settings(struct drm_device *dev) | |||
45 | #define FB_SKU_100 0 | 45 | #define FB_SKU_100 0 |
46 | #define FB_SKU_100L 1 | 46 | #define FB_SKU_100L 1 |
47 | #define FB_SKU_83 2 | 47 | #define FB_SKU_83 2 |
48 | if (pci_root == NULL) { | ||
49 | WARN_ON(1); | ||
50 | return; | ||
51 | } | ||
52 | |||
53 | |||
48 | pci_write_config_dword(pci_root, 0xD0, FB_REG06); | 54 | pci_write_config_dword(pci_root, 0xD0, FB_REG06); |
49 | pci_read_config_dword(pci_root, 0xD4, &fuse_value); | 55 | pci_read_config_dword(pci_root, 0xD4, &fuse_value); |
50 | 56 | ||
@@ -101,6 +107,10 @@ static void mid_get_pci_revID(struct drm_psb_private *dev_priv) | |||
101 | uint32_t platform_rev_id = 0; | 107 | uint32_t platform_rev_id = 0; |
102 | struct pci_dev *pci_gfx_root = pci_get_bus_and_slot(0, PCI_DEVFN(2, 0)); | 108 | struct pci_dev *pci_gfx_root = pci_get_bus_and_slot(0, PCI_DEVFN(2, 0)); |
103 | 109 | ||
110 | if (pci_gfx_root == NULL) { | ||
111 | WARN_ON(1); | ||
112 | return; | ||
113 | } | ||
104 | pci_read_config_dword(pci_gfx_root, 0x08, &platform_rev_id); | 114 | pci_read_config_dword(pci_gfx_root, 0x08, &platform_rev_id); |
105 | dev_priv->platform_rev_id = (uint8_t) platform_rev_id; | 115 | dev_priv->platform_rev_id = (uint8_t) platform_rev_id; |
106 | pci_dev_put(pci_gfx_root); | 116 | pci_dev_put(pci_gfx_root); |
@@ -138,6 +148,10 @@ static void mid_get_vbt_data(struct drm_psb_private *dev_priv) | |||
138 | 148 | ||
139 | /* get the virtual address of the vbt */ | 149 | /* get the virtual address of the vbt */ |
140 | vbt_virtual = ioremap(addr, sizeof(*vbt)); | 150 | vbt_virtual = ioremap(addr, sizeof(*vbt)); |
151 | if (vbt_virtual == NULL) { | ||
152 | vbt->size = 0; | ||
153 | return; | ||
154 | } | ||
141 | 155 | ||
142 | memcpy(vbt, vbt_virtual, sizeof(*vbt)); | 156 | memcpy(vbt, vbt_virtual, sizeof(*vbt)); |
143 | iounmap(vbt_virtual); /* Free virtual address space */ | 157 | iounmap(vbt_virtual); /* Free virtual address space */ |
diff --git a/drivers/gpu/drm/gma500/psb_drv.c b/drivers/gpu/drm/gma500/psb_drv.c index b4aee0ac2dfd..a2d881b894a3 100644 --- a/drivers/gpu/drm/gma500/psb_drv.c +++ b/drivers/gpu/drm/gma500/psb_drv.c | |||
@@ -52,7 +52,7 @@ module_param_named(trap_pagefaults, drm_psb_trap_pagefaults, int, 0600); | |||
52 | static DEFINE_PCI_DEVICE_TABLE(pciidlist) = { | 52 | static DEFINE_PCI_DEVICE_TABLE(pciidlist) = { |
53 | { 0x8086, 0x8108, PCI_ANY_ID, PCI_ANY_ID, 0, 0, (long) &psb_chip_ops }, | 53 | { 0x8086, 0x8108, PCI_ANY_ID, PCI_ANY_ID, 0, 0, (long) &psb_chip_ops }, |
54 | { 0x8086, 0x8109, PCI_ANY_ID, PCI_ANY_ID, 0, 0, (long) &psb_chip_ops }, | 54 | { 0x8086, 0x8109, PCI_ANY_ID, PCI_ANY_ID, 0, 0, (long) &psb_chip_ops }, |
55 | #if defined(CONFIG_DRM_OAKTRAIL) | 55 | #if defined(CONFIG_DRM_GMA600) |
56 | { 0x8086, 0x4100, PCI_ANY_ID, PCI_ANY_ID, 0, 0, (long) &oaktrail_chip_ops}, | 56 | { 0x8086, 0x4100, PCI_ANY_ID, PCI_ANY_ID, 0, 0, (long) &oaktrail_chip_ops}, |
57 | { 0x8086, 0x4101, PCI_ANY_ID, PCI_ANY_ID, 0, 0, (long) &oaktrail_chip_ops}, | 57 | { 0x8086, 0x4101, PCI_ANY_ID, PCI_ANY_ID, 0, 0, (long) &oaktrail_chip_ops}, |
58 | { 0x8086, 0x4102, PCI_ANY_ID, PCI_ANY_ID, 0, 0, (long) &oaktrail_chip_ops}, | 58 | { 0x8086, 0x4102, PCI_ANY_ID, PCI_ANY_ID, 0, 0, (long) &oaktrail_chip_ops}, |