diff options
-rw-r--r-- | drivers/gpu/drm/meson/meson_drv.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/drivers/gpu/drm/meson/meson_drv.c b/drivers/gpu/drm/meson/meson_drv.c index 75382f5f0fce..10b227d83e9a 100644 --- a/drivers/gpu/drm/meson/meson_drv.c +++ b/drivers/gpu/drm/meson/meson_drv.c | |||
@@ -152,7 +152,7 @@ static struct regmap_config meson_regmap_config = { | |||
152 | .max_register = 0x1000, | 152 | .max_register = 0x1000, |
153 | }; | 153 | }; |
154 | 154 | ||
155 | static int meson_drv_bind(struct device *dev) | 155 | static int meson_drv_bind_master(struct device *dev, bool has_components) |
156 | { | 156 | { |
157 | struct platform_device *pdev = to_platform_device(dev); | 157 | struct platform_device *pdev = to_platform_device(dev); |
158 | struct meson_drm *priv; | 158 | struct meson_drm *priv; |
@@ -233,10 +233,12 @@ static int meson_drv_bind(struct device *dev) | |||
233 | if (ret) | 233 | if (ret) |
234 | goto free_drm; | 234 | goto free_drm; |
235 | 235 | ||
236 | ret = component_bind_all(drm->dev, drm); | 236 | if (has_components) { |
237 | if (ret) { | 237 | ret = component_bind_all(drm->dev, drm); |
238 | dev_err(drm->dev, "Couldn't bind all components\n"); | 238 | if (ret) { |
239 | goto free_drm; | 239 | dev_err(drm->dev, "Couldn't bind all components\n"); |
240 | goto free_drm; | ||
241 | } | ||
240 | } | 242 | } |
241 | 243 | ||
242 | ret = meson_plane_create(priv); | 244 | ret = meson_plane_create(priv); |
@@ -276,6 +278,11 @@ free_drm: | |||
276 | return ret; | 278 | return ret; |
277 | } | 279 | } |
278 | 280 | ||
281 | static int meson_drv_bind(struct device *dev) | ||
282 | { | ||
283 | return meson_drv_bind_master(dev, true); | ||
284 | } | ||
285 | |||
279 | static void meson_drv_unbind(struct device *dev) | 286 | static void meson_drv_unbind(struct device *dev) |
280 | { | 287 | { |
281 | struct drm_device *drm = dev_get_drvdata(dev); | 288 | struct drm_device *drm = dev_get_drvdata(dev); |
@@ -357,6 +364,9 @@ static int meson_drv_probe(struct platform_device *pdev) | |||
357 | count += meson_probe_remote(pdev, &match, np, remote); | 364 | count += meson_probe_remote(pdev, &match, np, remote); |
358 | } | 365 | } |
359 | 366 | ||
367 | if (count && !match) | ||
368 | return meson_drv_bind_master(&pdev->dev, false); | ||
369 | |||
360 | /* If some endpoints were found, initialize the nodes */ | 370 | /* If some endpoints were found, initialize the nodes */ |
361 | if (count) { | 371 | if (count) { |
362 | dev_info(&pdev->dev, "Queued %d outputs on vpu\n", count); | 372 | dev_info(&pdev->dev, "Queued %d outputs on vpu\n", count); |