dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Xinwei Kong <kong.kongxinwei@hisilicon.com>
To: airlied@linux.ie, dri-devel@lists.freedesktop.org,
	benjamin.gaignard@linaro.org, robdclark@gmail.com,
	gregkh@linuxfoundation.org
Cc: kong.kongxinwei@hisilicon.com, liguozhu@hisilicon.com
Subject: [PATCH 1/1] drm/sti: fix master bind bug for using component
Date: Tue, 14 Jul 2015 17:28:40 +0800	[thread overview]
Message-ID: <55A4D648.6060404@hisilicon.com> (raw)

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

             reply	other threads:[~2015-07-14  9:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-14  9:28 Xinwei Kong [this message]
2015-07-15 10:19 ` [PATCH 1/1] drm/sti: fix master bind bug for using component 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55A4D648.6060404@hisilicon.com \
    --to=kong.kongxinwei@hisilicon.com \
    --cc=airlied@linux.ie \
    --cc=benjamin.gaignard@linaro.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=liguozhu@hisilicon.com \
    --cc=robdclark@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox