[Intel-gfx] [RFC PATCH 1/5] DRM/I915: parse child device from VBT

Adam Jackson ajax at redhat.com
Tue Nov 17 16:37:37 CET 2009


On Tue, 2009-11-17 at 15:43 +0800, yakui.zhao at intel.com wrote:

> @@ -1526,6 +1526,15 @@ int i915_driver_unload(struct drm_device *dev)
>  	}
>  
>  	if (drm_core_check_feature(dev, DRIVER_MODESET)) {
> +		/*
> +		 * free the memory space allocated for the child device
> +		 * config parsed from VBT
> +		 */
> +		if (dev_priv->child_dev && dev_priv->child_dev_num) {
> +			kfree(dev_priv->child_dev);
> +			dev_priv->child_dev = NULL;
> +			dev_priv->child_dev_num = 0;
> +		}
>  		drm_irq_uninstall(dev);
>  		vga_client_register(dev->pdev, NULL, NULL, NULL);
>  	}

    /* increment i */
    i++;

Useless comment.  Also, kfree(NULL) is a no-op, you don't need to check
first.

> @@ -549,4 +549,21 @@ bool intel_init_bios(struct drm_device *dev);
>  #define   SWF14_APM_STANDBY	0x1
>  #define   SWF14_APM_RESTORE	0x0
>  
> +/* Add the device class for LFP, TV, HDMI */
> +#define		INT_LFP_CLASS	0x1022
> +#define		INT_TV_CLASS	0x1009
> +#define		INT_HDMI_CLASS	0x60D2
> +#define		INT_DP_CLASS	0x68C6
> +#define		INT_eDP_CLASS	0x78C6

These should be DEVICE_TYPE_foo, shouldn't they?

- ajax
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20091117/883b9cf8/attachment.sig>


More information about the Intel-gfx mailing list