From patchwork Fri Jan 6 14:30:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomeu Vizoso X-Patchwork-Id: 90177 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp9471904qgi; Fri, 6 Jan 2017 06:31:05 -0800 (PST) X-Received: by 10.99.239.5 with SMTP id u5mr141562629pgh.61.1483713064922; Fri, 06 Jan 2017 06:31:04 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s21si79605841pgi.284.2017.01.06.06.31.04; Fri, 06 Jan 2017 06:31:04 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756802AbdAFObB (ORCPT + 25 others); Fri, 6 Jan 2017 09:31:01 -0500 Received: from mail-wm0-f67.google.com ([74.125.82.67]:35171 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753515AbdAFOa6 (ORCPT ); Fri, 6 Jan 2017 09:30:58 -0500 Received: by mail-wm0-f67.google.com with SMTP id l2so5416476wml.2 for ; Fri, 06 Jan 2017 06:30:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=3PjHm7tqZGhb0Epvc6wOpAO9MzFTwmS8cmOX4PbP8IE=; b=tXQqNOYcjk/d4DvpLejlHzWnCDxmPW5nABshR22bt8D+pZ7SeXx/2L0aPiBV28qodM 5uS04sqSsBPSSglG2/JXkaP8Mnstz7Yv8yenMixNwU+UApEv7M5mNbPutfGgtBw1S5Ik fxgvCvt+97Kd9fzV7W7t2CXGFaHsCIII5wg6uINwO7SdNMlIwljFY9nXZLTClB+qr4Q6 4kZ3Rr/OreD/8R2T3zRmCsDqRy7K6Myiye92eilbfpG/dHUkbNCmPMzosqaUAoLcuvcj Aeds2vWbYG3V3zmSgCvEMJyixa3uiZeoTLnLrIABKWf3EArTlA4CO1HyXcDJBTeNdtIV 3XMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=3PjHm7tqZGhb0Epvc6wOpAO9MzFTwmS8cmOX4PbP8IE=; b=DzQYCOayDJp+ZPras7/lT6Ayh07FX7dQTdv4BrNgEfZe9hRUWnQe66qpjgoHYOT+L4 RB3/cmh6Ur7/BViTirJe3mpId+JCRB8jTC3y3/QKc2XyAPQ74H4DZpNVWunDzleCBuHx dNCtPs92NWC2suy4xoT3Cst537DwHp+IM333aw657iA2pdlcE7VSO8t8OjbhJkXptJx1 TZVZ7hvztr6VuVfuPRibQVTMgo8mmXEyt8iwP4mwqiohYLK3rWfnRZT0GLxY15omBFWs SkgjoVGDU6n0F27RST/T5pxT57p1p8JiDkLtrcXbWBXMGD1WGvjKFY/DX30u3EqjF2RE csVw== X-Gm-Message-State: AIkVDXJgadEDYJom4qx1K7R8kUyubU6iksfypLzPz8TxyehVLaEikpil0cA2tY9W4whqnw== X-Received: by 10.28.55.203 with SMTP id e194mr3601980wma.6.1483713056574; Fri, 06 Jan 2017 06:30:56 -0800 (PST) Received: from cizrna.lan ([109.72.12.216]) by smtp.gmail.com with ESMTPSA id u78sm3644493wma.11.2017.01.06.06.30.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 06 Jan 2017 06:30:55 -0800 (PST) From: Tomeu Vizoso To: linux-kernel@vger.kernel.org Cc: =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= , Thierry Reding , intel-gfx-trybot@lists.freedesktop.org, Emil Velikov , Daniel Vetter , Benjamin Gaignard , Tomeu Vizoso , Archit Taneja , David Airlie , dri-devel@lists.freedesktop.org Subject: [PATCH v3 2/5] drm/bridge: analogix_dp: set connector to drm_dp_aux Date: Fri, 6 Jan 2017 15:30:26 +0100 Message-Id: <20170106143029.11553-3-tomeu.vizoso@collabora.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170106143029.11553-1-tomeu.vizoso@collabora.com> References: <20170106143029.11553-1-tomeu.vizoso@collabora.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) -- 2.9.3 diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c index 02b97bf64ee4..7d45d3e4600a 100644 --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c @@ -1402,23 +1402,25 @@ 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; return 0; +err_encoder_cleanup: + drm_encoder_cleanup(dp->encoder); err_disable_pm_runtime: pm_runtime_disable(dev);