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: 9512383 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 91C4A60476 for ; Thu, 12 Jan 2017 08:59:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8711D285FE for ; Thu, 12 Jan 2017 08:59:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7BEEF28631; Thu, 12 Jan 2017 08:59:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 94C5228650 for ; Thu, 12 Jan 2017 08:59:10 +0000 (UTC) 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" X-Virus-Scanned: ClamAV using ClamSMTP 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);