diff options
author | Ruud Derwig <rderwig@synopsys.com> | 2016-06-06 10:47:46 +0300 |
---|---|---|
committer | Alexey Brodkin <abrodkin@synopsys.com> | 2016-06-13 18:45:17 +0300 |
commit | a189d28e5edea70f20995547ddc84c79b2f76c03 (patch) | |
tree | 2cab6e30400c91cf771bbc0f4dc339c3d8bf74fd /drivers/gpu/drm/arc/arcpgu_drv.c | |
parent | 3c85f20a289d044f303f473ee6ab7502303fc3b0 (diff) | |
download | linux-a189d28e5edea70f20995547ddc84c79b2f76c03.tar.xz |
drm/arcpgu: Make ARC PGU usable on simulation platforms
In case of simulation there's no real encoder/transmitter device
because in the model's virtual LCD we're rendering whatever
appears in frame-buffer memory.
Signed-off-by: Ruud Derwig <rderwig@synopsys.com>
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/arc/arcpgu_drv.c')
-rw-r--r-- | drivers/gpu/drm/arc/arcpgu_drv.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/gpu/drm/arc/arcpgu_drv.c b/drivers/gpu/drm/arc/arcpgu_drv.c index 7675bbc70133..07c1bdeca489 100644 --- a/drivers/gpu/drm/arc/arcpgu_drv.c +++ b/drivers/gpu/drm/arc/arcpgu_drv.c @@ -149,15 +149,16 @@ static int arcpgu_load(struct drm_device *drm) /* find the encoder node and initialize it */ encoder_node = of_parse_phandle(drm->dev->of_node, "encoder-slave", 0); - if (!encoder_node) { - dev_err(drm->dev, "failed to get an encoder slave node\n"); - return -ENODEV; + if (encoder_node) { + ret = arcpgu_drm_hdmi_init(drm, encoder_node); + if (ret < 0) + return ret; + } else { + ret = arcpgu_drm_sim_init(drm, 0); + if (ret < 0) + return ret; } - ret = arcpgu_drm_hdmi_init(drm, encoder_node); - if (ret < 0) - return ret; - drm_mode_config_reset(drm); drm_kms_helper_poll_init(drm); |