From: Chen-Yu Tsai Date: Thu, 23 Feb 2017 08:05:34 +0000 (+0800) Subject: drm/sun4i: Set drm_crtc.port to the underlying TCON's output port node X-Git-Tag: v4.14-rc1~674^2~8^2~17 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7544860733d158e3edbf309f27e79e258c8f66bd;p=platform%2Fkernel%2Flinux-rpi.git drm/sun4i: Set drm_crtc.port to the underlying TCON's output port node The way drm_of_find_possible_crtcs works is it tries to match the remote-endpoint of the given node's various endpoints to all the crtc's .port field. Thus we need to set drm_crtc.port to the output port node of the underlying TCON. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard --- diff --git a/drivers/gpu/drm/sun4i/sun4i_crtc.c b/drivers/gpu/drm/sun4i/sun4i_crtc.c index 7d332fc..eec13ce 100644 --- a/drivers/gpu/drm/sun4i/sun4i_crtc.c +++ b/drivers/gpu/drm/sun4i/sun4i_crtc.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include @@ -160,5 +161,9 @@ struct sun4i_crtc *sun4i_crtc_init(struct drm_device *drm) drm_crtc_helper_add(&scrtc->crtc, &sun4i_crtc_helper_funcs); + /* Set crtc.port to output port node of the tcon */ + scrtc->crtc.port = of_graph_get_port_by_id(drv->tcon->dev->of_node, + 1); + return scrtc; }