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

ykzhao yakui.zhao at intel.com
Wed Nov 18 03:45:22 CET 2009


On Tue, 2009-11-17 at 23:37 +0800, Adam Jackson wrote:
> 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?
You are right. This will be more clear.

Thanks.
> 
> - ajax




More information about the Intel-gfx mailing list