Re: [PATCHv6 4/7] staging: imx-drm: Use de-active and pixelclk-active display-timings.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jan 22, 2014 at 02:48:28PM +0100, Denis Carikli wrote:
> If de-active and/or pixelclk-active properties were set in the
> display-timings DT node, they were not used.
> 
> Instead the data-enable and the pixel data clock polarity
> were hardcoded.
> 
> This change is needed for making the eukrea-cpuimx51
>   QVGA display work.
> 
> Cc: David Airlie <airlied@xxxxxxxx>
> Cc: Eric Bénard <eric@xxxxxxxxxx>
> Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
> Cc: Philipp Zabel <p.zabel@xxxxxxxxxxxxxx>
> Cc: Sascha Hauer <kernel@xxxxxxxxxxxxxx>
> Cc: Shawn Guo <shawn.guo@xxxxxxxxxx>
> Cc: dri-devel@xxxxxxxxxxxxxxxxxxxxx
> Cc: driverdev-devel@xxxxxxxxxxxxxxxxxxxxxx
> Cc: linux-arm-kernel@xxxxxxxxxxxxxxxxxxx

These CC blocks are massive...  What's the point of them?

>  	if (np) {
>  		struct drm_display_mode *mode = drm_mode_create(connector->dev);
> +		struct device_node *timings_np;
> +		struct device_node *mode_np;
> +		u32 val;
> +
>  		of_get_drm_display_mode(np, &imxpd->mode, 0);
> +
> +		timings_np = of_get_child_by_name(np, "display-timings");
> +		if (timings_np) {
> +			/* get the display mode node */
> +			mode_np = of_parse_phandle(timings_np,
> +						   "native-mode", 0);
> +			if (!mode_np)
> +				mode_np = of_get_next_child(timings_np, NULL);
> +
> +			/* set de-active to 1 if not set */
> +			of_property_read_u32(mode_np, "de-active", &val);
> +			if (val) {

If of_property_read_u32() fails then val is uninitialized.

regards,
dan carpenter

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel





[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux