Subversion Repositories Kolibri OS

Rev

Rev 6084 | Rev 6937 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6084 Rev 6660
Line 1349... Line 1349...
1349
	if (bios)
1349
	if (bios)
1350
		pci_unmap_rom(pdev, bios);
1350
		pci_unmap_rom(pdev, bios);
Line 1351... Line 1351...
1351
 
1351
 
1352
	return 0;
1352
	return 0;
-
 
1353
}
-
 
1354
 
-
 
1355
/**
-
 
1356
 * intel_bios_is_port_present - is the specified digital port present
-
 
1357
 * @dev_priv:	i915 device instance
-
 
1358
 * @port:	port to check
-
 
1359
 *
-
 
1360
 * Return true if the device in %port is present.
-
 
1361
 */
-
 
1362
bool intel_bios_is_port_present(struct drm_i915_private *dev_priv, enum port port)
-
 
1363
{
-
 
1364
	static const struct {
-
 
1365
		u16 dp, hdmi;
-
 
1366
	} port_mapping[] = {
-
 
1367
		[PORT_B] = { DVO_PORT_DPB, DVO_PORT_HDMIB, },
-
 
1368
		[PORT_C] = { DVO_PORT_DPC, DVO_PORT_HDMIC, },
-
 
1369
		[PORT_D] = { DVO_PORT_DPD, DVO_PORT_HDMID, },
-
 
1370
		[PORT_E] = { DVO_PORT_DPE, DVO_PORT_HDMIE, },
-
 
1371
	};
-
 
1372
	int i;
-
 
1373
 
-
 
1374
	/* FIXME maybe deal with port A as well? */
-
 
1375
	if (WARN_ON(port == PORT_A) || port >= ARRAY_SIZE(port_mapping))
-
 
1376
		return false;
-
 
1377
 
-
 
1378
	if (!dev_priv->vbt.child_dev_num)
-
 
1379
		return false;
-
 
1380
 
-
 
1381
	for (i = 0; i < dev_priv->vbt.child_dev_num; i++) {
-
 
1382
		const union child_device_config *p_child =
-
 
1383
			&dev_priv->vbt.child_dev[i];
-
 
1384
		if ((p_child->common.dvo_port == port_mapping[port].dp ||
-
 
1385
		     p_child->common.dvo_port == port_mapping[port].hdmi) &&
-
 
1386
		    (p_child->common.device_type & (DEVICE_TYPE_TMDS_DVI_SIGNALING |
-
 
1387
						    DEVICE_TYPE_DISPLAYPORT_OUTPUT)))
-
 
1388
			return true;
-
 
1389
	}
-
 
1390
 
-
 
1391
	return false;