Re: [PATCH] imx-drm: Fix probe failure

From: Fabio Estevam
Date: Wed Aug 28 2013 - 10:39:16 EST


On Wed, Aug 28, 2013 at 2:27 AM, Sascha Hauer <s.hauer@xxxxxxxxxxxxxx> wrote:

> Nack. We need the references to prevent that encoders/connectors are
> (de)registered while the device is active. Simply dropping this code is
> no solution.

Any suggestions about a proper way of handling this?

After b5dc0d10, imx_drm_device_get() is called from
imx_drm_driver_load(), which increments the 'references' very early
now.

Then when we check:

if (imxdrm->references) {
ret = -EBUSY;
goto err_busy;
}

,it will fail always.

Not sure where is a proper location to increment/decrement
'imxdrm->references' though.

Tried to look at other drm drivers, but could not find examples on how
to deal with such references.

Regards,

Fabio Estevam
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/