All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] drm/sti: fix master bind bug for using component
@ 2015-07-14  9:28 Xinwei Kong
  2015-07-15 10:19 ` Benjamin Gaignard
  0 siblings, 1 reply; 7+ messages in thread
From: Xinwei Kong @ 2015-07-14  9:28 UTC (permalink / raw)
  To: airlied, dri-devel, benjamin.gaignard, robdclark, gregkh
  Cc: kong.kongxinwei, liguozhu

From: Xinwei Kong <kong.kongxinwei@hisilicon.com>

This patch fix one bug which it can't call .bind function in
sti_hdmi.c and sti_hda.c file when changing the building sequence
(sti_hdmi.o,sti_hda.o) in Makefile file. This patch can prepare
it.

Signed-off-by: Xinwei Kong <kong.kongxinwei@hisilicon.com>
---
 drivers/gpu/drm/sti/sti_tvout.c | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/sti/sti_tvout.c b/drivers/gpu/drm/sti/sti_tvout.c
index 5cc5311..293dfae 100644
--- a/drivers/gpu/drm/sti/sti_tvout.c
+++ b/drivers/gpu/drm/sti/sti_tvout.c
@@ -683,7 +683,22 @@ static int compare_of(struct device *dev, void *data)

 static int sti_tvout_master_bind(struct device *dev)
 {
-	return 0;
+	struct sti_tvout *tvout = dev_get_drvdata(dev);
+	struct drm_device *drm_dev;
+	int ret;
+
+	if (!tvout->drm_dev) {
+		DRM_ERROR("master bind is fail\n");
+		return 0;
+	}
+
+	drm_dev = tvout->drm_dev;
+
+	ret = component_bind_all(dev, drm_dev);
+	if (ret)
+		sti_tvout_destroy_encoders(tvout);
+
+	return ret;
 }

 static void sti_tvout_master_unbind(struct device *dev)
-- 
1.9.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-07-16  9:14 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-14  9:28 [PATCH 1/1] drm/sti: fix master bind bug for using component Xinwei Kong
2015-07-15 10:19 ` Benjamin Gaignard
2015-07-15 10:42   ` Russell King - ARM Linux
2015-07-15 13:17     ` Benjamin Gaignard
2015-07-16  1:13       ` Xinwei Kong
2015-07-16  7:17         ` Benjamin Gaignard
2015-07-16  9:06           ` Xinwei Kong

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.