Re: [PATCH 10/49] staging: hikey9xx/gpu: add debug prints for this driver

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

 



On Wed, 2020-08-19 at 13:45 +0200, Mauro Carvalho Chehab wrote:
> From: Xiubin Zhang <zhangxiubin1@xxxxxxxxxx>
> 
> Add some debug prints on adv7535 and kirin_drm_drv.

bikeshed:

> diff --git a/drivers/staging/hikey9xx/gpu/hdmi/adv7535.c b/drivers/staging/hikey9xx/gpu/hdmi/adv7535.c
[]
> @@ -785,19 +786,25 @@ adv7511_detect(struct adv7511 *adv7511,
>  {
>  	enum drm_connector_status status;
>  	unsigned int val;
> +	unsigned int time = 0;

time is not a good name.  Maybe rename to loops

> @@ -820,7 +827,32 @@ adv7511_detect(struct adv7511 *adv7511,
>  	}
>  #endif
>  
> +	if (status == connector_status_disconnected) {
> +		do {
> +			ret = regmap_read(adv7511->regmap, ADV7511_REG_STATUS, &val);
> +			if (ret < 0) {
> +				DRM_ERROR("regmap_read fail, ret = %d \n", ret);
> +				return connector_status_disconnected;
> +			}
> +
> +			if (val & ADV7511_STATUS_HPD) {
> +				DRM_INFO("connected : regmap_read val = 0x%x \n", val);
> +				status = connector_status_connected;
> +			} else {
> +				DRM_INFO("disconnected : regmap_read val = 0x%x \n", val);
> +				status = connector_status_disconnected;
> +			}
> +			time ++;
> +			mdelay(20);
> +		} while (status == connector_status_disconnected && time < 10);
> +	}
> +
> +	if (time >= 10)
> +		DRM_ERROR("Read connector status timout, time = %d \n", time);

No space necessary before ++

s/timout/timeout/

No space before the newline please in any of the DRM_ERROR
output messages.


_______________________________________________
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