Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

gma500: Final enables for Oaktrail

This switches the ifdef to match the Kconfig so that Oaktrail probing occurs
and adds some additional minor bulletproofing.

Tested on a Fujtisu Stylistic Q550 internal display. HDMI might work but that
remains to be seen.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>

authored by

Alan Cox and committed by
Dave Airlie
0cecdd81 fea578b6

+15 -1
+14
drivers/gpu/drm/gma500/mid_bios.c
··· 45 45 #define FB_SKU_100 0 46 46 #define FB_SKU_100L 1 47 47 #define FB_SKU_83 2 48 + if (pci_root == NULL) { 49 + WARN_ON(1); 50 + return; 51 + } 52 + 53 + 48 54 pci_write_config_dword(pci_root, 0xD0, FB_REG06); 49 55 pci_read_config_dword(pci_root, 0xD4, &fuse_value); 50 56 ··· 107 101 uint32_t platform_rev_id = 0; 108 102 struct pci_dev *pci_gfx_root = pci_get_bus_and_slot(0, PCI_DEVFN(2, 0)); 109 103 104 + if (pci_gfx_root == NULL) { 105 + WARN_ON(1); 106 + return; 107 + } 110 108 pci_read_config_dword(pci_gfx_root, 0x08, &platform_rev_id); 111 109 dev_priv->platform_rev_id = (uint8_t) platform_rev_id; 112 110 pci_dev_put(pci_gfx_root); ··· 148 138 149 139 /* get the virtual address of the vbt */ 150 140 vbt_virtual = ioremap(addr, sizeof(*vbt)); 141 + if (vbt_virtual == NULL) { 142 + vbt->size = 0; 143 + return; 144 + } 151 145 152 146 memcpy(vbt, vbt_virtual, sizeof(*vbt)); 153 147 iounmap(vbt_virtual); /* Free virtual address space */
+1 -1
drivers/gpu/drm/gma500/psb_drv.c
··· 52 52 static DEFINE_PCI_DEVICE_TABLE(pciidlist) = { 53 53 { 0x8086, 0x8108, PCI_ANY_ID, PCI_ANY_ID, 0, 0, (long) &psb_chip_ops }, 54 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 56 { 0x8086, 0x4100, PCI_ANY_ID, PCI_ANY_ID, 0, 0, (long) &oaktrail_chip_ops}, 57 57 { 0x8086, 0x4101, PCI_ANY_ID, PCI_ANY_ID, 0, 0, (long) &oaktrail_chip_ops}, 58 58 { 0x8086, 0x4102, PCI_ANY_ID, PCI_ANY_ID, 0, 0, (long) &oaktrail_chip_ops},