All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tomeu Vizoso <tomeu.vizoso@collabora.com>
To: linux-kernel@vger.kernel.org
Cc: "Ville Syrjälä" <ville.syrjala@linux.intel.com>,
	"Sean Paul" <seanpaul@chromium.org>,
	"Thierry Reding" <thierry.reding@gmail.com>,
	intel-gfx-trybot@lists.freedesktop.org,
	"Emil Velikov" <emil.l.velikov@gmail.com>,
	"Daniel Vetter" <daniel.vetter@intel.com>,
	"Benjamin Gaignard" <benjamin.gaignard@linaro.org>,
	"Tomeu Vizoso" <tomeu.vizoso@collabora.com>,
	"Archit Taneja" <architt@codeaurora.org>,
	"David Airlie" <airlied@linux.ie>,
	dri-devel@lists.freedesktop.org
Subject: [PATCH v5 1/4] drm/bridge: analogix_dp: set connector to drm_dp_aux
Date: Thu, 12 Jan 2017 09:58:41 +0100	[thread overview]
Message-ID: <20170112085844.19878-2-tomeu.vizoso@collabora.com> (raw)
In-Reply-To: <20170112085844.19878-1-tomeu.vizoso@collabora.com>

Set the backpointer so that the DP helpers are able to access the
connector that the drm_dp_aux is associated with.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
---

 drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
index e7cd1056ff2d..44c2b74bf771 100644
--- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
+++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
@@ -1403,26 +1403,28 @@ int analogix_dp_bind(struct device *dev, struct drm_device *drm_dev,
 	dp->drm_dev = drm_dev;
 	dp->encoder = dp->plat_data->encoder;
 
+	ret = analogix_dp_create_bridge(drm_dev, dp);
+	if (ret) {
+		DRM_ERROR("failed to create bridge (%d)\n", ret);
+		goto err_encoder_cleanup;
+	}
+
 	dp->aux.name = "DP-AUX";
 	dp->aux.transfer = analogix_dpaux_transfer;
 	dp->aux.dev = &pdev->dev;
+	dp->aux.connector = &dp->connector;
 
 	ret = drm_dp_aux_register(&dp->aux);
 	if (ret)
-		goto err_disable_pm_runtime;
-
-	ret = analogix_dp_create_bridge(drm_dev, dp);
-	if (ret) {
-		DRM_ERROR("failed to create bridge (%d)\n", ret);
-		drm_encoder_cleanup(dp->encoder);
-		goto err_disable_pm_runtime;
-	}
+		goto err_encoder_cleanup;
 
 	phy_power_off(dp->phy);
 	pm_runtime_put(dev);
 
 	return 0;
 
+err_encoder_cleanup:
+	drm_encoder_cleanup(dp->encoder);
 err_disable_pm_runtime:
 
 	phy_power_off(dp->phy);
-- 
2.9.3

  reply	other threads:[~2017-01-12  8:59 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-12  8:58 [PATCH v5 0/4] drm/dp: Implement CRC debugfs API Tomeu Vizoso
2017-01-12  8:58 ` Tomeu Vizoso
2017-01-12  8:58 ` Tomeu Vizoso
2017-01-12  8:58 ` Tomeu Vizoso [this message]
2017-01-12  8:58 ` [PATCH v5 2/4] drm/dp: add helpers for capture of frame CRCs Tomeu Vizoso
2017-01-12  8:58   ` Tomeu Vizoso
2017-01-12  8:58 ` [PATCH v5 3/4] drm/bridge: analogix_dp: " Tomeu Vizoso
2017-01-12  8:58   ` Tomeu Vizoso
2017-01-12  8:58 ` [PATCH v5 4/4] drm/rockchip: Implement CRC debugfs API Tomeu Vizoso
2017-01-12  8:58   ` Tomeu Vizoso
2017-01-12  8:58   ` Tomeu Vizoso

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=20170112085844.19878-2-tomeu.vizoso@collabora.com \
    --to=tomeu.vizoso@collabora.com \
    --cc=airlied@linux.ie \
    --cc=architt@codeaurora.org \
    --cc=benjamin.gaignard@linaro.org \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=emil.l.velikov@gmail.com \
    --cc=intel-gfx-trybot@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=seanpaul@chromium.org \
    --cc=thierry.reding@gmail.com \
    --cc=ville.syrjala@linux.intel.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 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.