| Subject | Re: [PATCH 10/49] staging: hikey9xx/gpu: add debug prints for this driver | From | Joe Perches <> | Date | Fri, 21 Aug 2020 13:17:32 -0700 |
| |
On Wed, 2020-08-19 at 13:45 +0200, Mauro Carvalho Chehab wrote: > From: Xiubin Zhang <zhangxiubin1@huawei.com> > > 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.
|