/* Enumerate the child dev array parsed from VBT to check whether the integrated TV is present. If it is present, return 1. If it is not present, return false. If no child dev is parsed from VBT, it assumes that the TV is present.  */
static int tv_is_present_in_vbt(struct drm_device *dev)
/* Enumerate the child dev array parsed from VBT to check whether the integrated TV is present. If it is present, return 1. If it is not present, return false. If no child dev is parsed from VBT, it assumes that the TV is present.  */
static int tv_is_present_in_vbt(struct drm_device *dev)
{
	struct drm_i915_private *dev_priv = dev->dev_private;
	struct child_device_config *p_child;
	int i, ret;
	if (!dev_priv->child_dev_num)
		return 1;
	ret = 0;
	for (i = 0; i < dev_priv->child_dev_num; i++) {
		p_child = dev_priv->child_dev + i;
		if (p_child->device_type != DEVICE_TYPE_INT_TV &&
			p_child->device_type != DEVICE_TYPE_TV)
			continue;
		if (p_child->addin_offset) {
			ret = 1;
			break;
		}
	}
	return ret;
}