Re: [linux-sunxi] [PATCH v3 05/11] drm/bridge: Add Analogix anx6345 support

2019-02-18 Thread Priit Laes
On Thu, Feb 14, 2019 at 09:09:51PM -0800, Vasily Khoruzhick wrote:
> From: Icenowy Zheng 
> 
> The ANX6345 is an ultra-low power DisplayPower/eDP transmitter designed
> for portable devices. This driver adds initial support for RGB to eDP
> mode, without HPD and interrupts.
> 
> This is a configuration usually seen in eDP applications.
> 
> Signed-off-by: Icenowy Zheng 
> Signed-off-by: Vasily Khoruzhick 
> ---
>  drivers/gpu/drm/bridge/analogix/Kconfig   |  11 +
>  drivers/gpu/drm/bridge/analogix/Makefile  |   1 +
>  .../drm/bridge/analogix/analogix-anx6345.c| 845 ++
>  .../drm/bridge/analogix/analogix-i2c-dptx.c   |   2 +-
>  .../drm/bridge/analogix/analogix-i2c-dptx.h   |   8 +
>  .../bridge/analogix/analogix-i2c-txcommon.h   |   3 +
>  6 files changed, 869 insertions(+), 1 deletion(-)
>  create mode 100644 drivers/gpu/drm/bridge/analogix/analogix-anx6345.c
> 

[ ... ]

> +
> +static int anx6345_start(struct anx6345 *anx6345)
> +{
> + int err;
> +
> + if (!anx6345->powered)
> + anx6345_poweron(anx6345);
> +
> + /* Power on needed modules */
> + err = anx6345_clear_bits(anx6345->map[I2C_IDX_TXCOM],
> +  SP_POWERDOWN_CTRL_REG,
> +  SP_VIDEO_PD | SP_LINK_PD);
> +
> + err = anx6345_tx_initialization(anx6345);
> + if (err) {
> + DRM_ERROR("Failed transmitter initialization: %d\n", err);
> + goto err_poweroff;

You can move the whole err_poweroff section from below here and drop the goto.

> + }
> +
> + /*
> +  * This delay seems to help keep the hardware in a good state. Without
> +  * it, there are times where it fails silently.
> +  */
> + usleep_range(1, 15000);
> +
> + return 0;
> +
> +err_poweroff:
> + DRM_ERROR("Failed DisplayPort transmitter initialization: %d\n", err);
> + anx6345_poweroff(anx6345);
> +
> + return err;
> +}
> +

[ ... ]
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [linux-sunxi] [PATCH v3 05/11] drm/bridge: Add Analogix anx6345 support

2019-02-16 Thread Vasily Khoruzhick via dri-devel
On Fri, Feb 15, 2019 at 12:23 AM Priit Laes  wrote:

> > + err = anx6345_tx_initialization(anx6345);
> > + if (err) {
> > + DRM_ERROR("Failed transmitter initialization: %d\n", err);
> > + goto err_poweroff;
>
> You can move the whole err_poweroff section from below here and drop the goto.

Thanks, will do.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel