From patchwork Thu Jan 12 08:58:41 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomeu Vizoso X-Patchwork-Id: 91057 Delivered-To: patch@linaro.org Received: by 10.182.3.34 with SMTP id 2csp1822541obz; Thu, 12 Jan 2017 00:59:10 -0800 (PST) X-Received: by 10.84.236.76 with SMTP id h12mr19990647pln.173.1484211550837; Thu, 12 Jan 2017 00:59:10 -0800 (PST) Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id j1si8624275pli.211.2017.01.12.00.59.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Jan 2017 00:59:10 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id ED0096EBD4; Thu, 12 Jan 2017 08:59:09 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm0-x241.google.com (mail-wm0-x241.google.com [IPv6:2a00:1450:400c:c09::241]) by gabe.freedesktop.org (Postfix) with ESMTPS id DDBA86EAC0; Thu, 12 Jan 2017 08:59:07 +0000 (UTC) Received: by mail-wm0-x241.google.com with SMTP id l2so2201540wml.2; Thu, 12 Jan 2017 00:59:07 -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=S9Lua4kNMI28ZkTeSITt7DrKtg1UhChE+YXJlOnWP4w=; b=h2Z4lzGBlX7mylsc/tI8osmsRp1ye49x0GHgj5cFXaGM+/ILHSkfHBWQU+dfYP2Ms3 bNQHD8FS3Ab7lgXrFByiXV7f5y1fQHj+cI0ttCyzdDANnWQknPVmaTY1vZ9WKOIZM2aJ XGy9M0nD+eHaejzlxEUQAVMXsPf49GBCsOC1iy5xpVPWAm713CEdTQgwIbZEQLx4KDjw fyCWj9puyA/hCgesC4wE4Iq4Ii9oadJfs62j9a7JqxzfoZrq+RtIoqH27hWSh5+yxcSE /RsRPf1uuHrvqrpuqd9n0EUfbznWQQ+b5yILZLVYiY2ZJ1Mp3WqImFfWja5PFlF+qfqf zCeA== 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=S9Lua4kNMI28ZkTeSITt7DrKtg1UhChE+YXJlOnWP4w=; b=Jpm+Op0FibhHzw34DFu3hcFWMBcAV8YJ2uQpqRdlLcNRo0kO3aBb205Uz81PmrwgqW C6MXZ0eULIK/knO1aKZZtZEmNduvm8MqnRMDwCLVa+WYA2c7TVgDsPJ/+/N5X68xYIqE 2FD3rfnGSXjnNmttrrrjsuy/Gf+94WJxRjfwbkRXIN4r7Tjd2aPNYIG19ImPoHKi6Fkr t/03dRuN0n1BRbWxe6JRTNTGVpbwicLBXSdUDujUKAAuWPV/S7u/Z5x3xLLeJ1CvGWPr ZI5qHaIEquxUdPzwppqCtL8Rf/exzsz7f+YYdKVhYykxgpXG/AVQcbH1g7lVBz6uKTO1 u3Bg== X-Gm-Message-State: AIkVDXLVLMVUbx4W4dW7xwv65Frhg6OWUQz8hcs5yc/rx7nply1/KTZMLV6QFdEE4P7RdQ== X-Received: by 10.223.171.18 with SMTP id q18mr7142422wrc.145.1484211546448; Thu, 12 Jan 2017 00:59:06 -0800 (PST) Received: from cizrna.lan ([109.72.12.134]) by smtp.gmail.com with ESMTPSA id t194sm2181476wmd.1.2017.01.12.00.59.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Jan 2017 00:59:05 -0800 (PST) From: Tomeu Vizoso To: linux-kernel@vger.kernel.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 Message-Id: <20170112085844.19878-2-tomeu.vizoso@collabora.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170112085844.19878-1-tomeu.vizoso@collabora.com> References: <20170112085844.19878-1-tomeu.vizoso@collabora.com> Cc: Tomeu Vizoso , Emil Velikov , dri-devel@lists.freedesktop.org, intel-gfx-trybot@lists.freedesktop.org, Daniel Vetter X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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(-) 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);