[PATCH v2 21/21] drm/tilcdc: Initialize crtc->port
Tomi Valkeinen
tomi.valkeinen at ti.com
Mon Feb 22 12:50:01 UTC 2016
On 16/02/16 16:18, Jyri Sarha wrote:
> Initialize port device node pointer in the tilcdc crtc. Fixes "Falling
> back to first CRTC" warning from tda998x driver.
The description is rather short, and doesn't really explain what was
wrong and why this fixes it.
> Signed-off-by: Jyri Sarha <jsarha at ti.com>
> ---
> drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
> index e886277..cfd3fd1 100644
> --- a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
> +++ b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
> @@ -124,6 +124,7 @@ static void tilcdc_crtc_destroy(struct drm_crtc *crtc)
>
> tilcdc_crtc_dpms(crtc, DRM_MODE_DPMS_OFF);
>
> + of_node_put(crtc->port);
> drm_crtc_cleanup(crtc);
> drm_flip_work_cleanup(&tilcdc_crtc->unref_work);
>
> @@ -768,6 +769,7 @@ void tilcdc_crtc_cancel_page_flip(struct drm_crtc *crtc, struct drm_file *file)
>
> struct drm_crtc *tilcdc_crtc_create(struct drm_device *dev)
> {
> + struct tilcdc_drm_private *priv = dev->dev_private;
> struct tilcdc_crtc *tilcdc_crtc;
> struct drm_crtc *crtc;
> int ret;
> @@ -794,6 +796,15 @@ struct drm_crtc *tilcdc_crtc_create(struct drm_device *dev)
>
> drm_crtc_helper_add(crtc, &tilcdc_crtc_helper_funcs);
>
> + if (priv->is_componentized) {
> + crtc->port =
> + of_get_child_by_name(dev->dev->of_node, "port");
> + if (!crtc->port) {
> + dev_warn(dev->dev, "no port node found in %s\n",
> + dev->dev->of_node->full_name);
Isn't this an error? Can the driver proceed if there's no port node?
Tomi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20160222/051d0fe4/attachment.sig>
More information about the dri-devel
mailing list