Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'arcpgu-updates-2019.07.18' of github.com:abrodkin/linux into drm-next

This is a pretty simple improvement that allows to find encoder
as the one and only (ARC PGU doesn't support more than one) endpoint
instead of using non-standard "encoder-slave" property.

Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
Link: https://patchwork.freedesktop.org/patch/msgid/CY4PR1201MB0120FDB10A777345F9C27720A1C90@CY4PR1201MB0120.namprd12.prod.outlook.com

+13 -3
+13 -3
drivers/gpu/drm/arc/arcpgu_drv.c
··· 14 14 #include <drm/drm_fb_helper.h> 15 15 #include <drm/drm_gem_cma_helper.h> 16 16 #include <drm/drm_gem_framebuffer_helper.h> 17 + #include <drm/drm_of.h> 17 18 #include <drm/drm_probe_helper.h> 18 19 #include <linux/dma-mapping.h> 19 20 #include <linux/module.h> ··· 46 45 { 47 46 struct platform_device *pdev = to_platform_device(drm->dev); 48 47 struct arcpgu_drm_private *arcpgu; 49 - struct device_node *encoder_node; 48 + struct device_node *encoder_node = NULL, *endpoint_node = NULL; 50 49 struct resource *res; 51 50 int ret; 52 51 ··· 81 80 if (arc_pgu_setup_crtc(drm) < 0) 82 81 return -ENODEV; 83 82 84 - /* find the encoder node and initialize it */ 85 - encoder_node = of_parse_phandle(drm->dev->of_node, "encoder-slave", 0); 83 + /* 84 + * There is only one output port inside each device. It is linked with 85 + * encoder endpoint. 86 + */ 87 + endpoint_node = of_graph_get_next_endpoint(pdev->dev.of_node, NULL); 88 + if (endpoint_node) { 89 + encoder_node = of_graph_get_remote_port_parent(endpoint_node); 90 + of_node_put(endpoint_node); 91 + } 92 + 86 93 if (encoder_node) { 87 94 ret = arcpgu_drm_hdmi_init(drm, encoder_node); 88 95 of_node_put(encoder_node); 89 96 if (ret < 0) 90 97 return ret; 91 98 } else { 99 + dev_info(drm->dev, "no encoder found. Assumed virtual LCD on simulation platform\n"); 92 100 ret = arcpgu_drm_sim_init(drm, NULL); 93 101 if (ret < 0) 94 102 return ret;