From patchwork Mon Jan 9 13:32:34 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomeu Vizoso X-Patchwork-Id: 9504631 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 0B60760710 for ; Mon, 9 Jan 2017 13:33:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0A05E28112 for ; Mon, 9 Jan 2017 13:33:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F2D3A284AA; Mon, 9 Jan 2017 13:33:17 +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 C125028112 for ; Mon, 9 Jan 2017 13:33:16 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9B7E36E256; Mon, 9 Jan 2017 13:33:11 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wj0-x244.google.com (mail-wj0-x244.google.com [IPv6:2a00:1450:400c:c01::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id 66A816E256; Mon, 9 Jan 2017 13:33:08 +0000 (UTC) Received: by mail-wj0-x244.google.com with SMTP id ey1so5557190wjd.2; Mon, 09 Jan 2017 05:33:08 -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=kJ9hMuJIujLmV2bAyo0GTLzYUSFYiS2tkodhEzHPHVFDugeU6U6DuwW0zYEQCtqmTR 3LkvQ3KzHjFQl+4Yde8aaFnoLMxsxTf1thidwlRBwKI4fTZdbdYmRub6bh/GRMSLDFN9 J0ZY9x91Nrrq1I0/PA9py6h/vgFRNAaoKROyTFbtXEFGMSESzxAMEddFGjHH52wQy0K5 zxHnWxzSwx7HNhdZXTCkAof6pYmTkAn4PP8Gk5pQrx8ECDF7JPJOZwM8Cfx1vQuedzq5 uKXRFc80mggMRCqTOliqg6lCGJybpHPUx5PTFut2Ygnox0F572mEXw/SNqDXhoJfCijb n8pQ== 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=EIW3BLff/97hauoeLQ51Oi0ufwGuWHlP+pyvjafq/RxTbWsKK/qek1S44pyOBI0OuD OBDAm5KRQOEkxVxmB2ZSH4c2imXULzB0aOWwlPE/JDe//8vWgFQ70Jz+Y/j3ymzeq8Ho H8bdy7KqraKbE4z6LDxsCLIX3vSacXYCWbqZVPOOYgycysVfbn19COxA6YComNjnaTM1 jy0wjEuAYPMWF2v8P/0T/hDYybqmv5wR7n79YUhhFYqUlUSv2ooz+OBNo3gUAG/klod2 tC9SH8ukdMg+PHk1GHd1aITZPxhTVmPiNRUR1WmmOo0Xh9Fb+S/gGN48oYPEPXFMzhUp gTUA== X-Gm-Message-State: AIkVDXLbBGyTwh255goQdnPIz8XFI1iXsl6TG2QG9Kx4e2K4Be0stnMQ4t0aUmxrvcxpaQ== X-Received: by 10.194.86.67 with SMTP id n3mr78699588wjz.105.1483968786522; Mon, 09 Jan 2017 05:33:06 -0800 (PST) Received: from cizrna.lan ([109.72.12.251]) by smtp.gmail.com with ESMTPSA id u78sm18908423wma.11.2017.01.09.05.33.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Jan 2017 05:33:05 -0800 (PST) From: Tomeu Vizoso To: linux-kernel@vger.kernel.org Subject: [PATCH v4 2/5] drm/bridge: analogix_dp: set connector to drm_dp_aux Date: Mon, 9 Jan 2017 14:32:34 +0100 Message-Id: <20170109133237.17413-3-tomeu.vizoso@collabora.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170109133237.17413-1-tomeu.vizoso@collabora.com> References: <20170109133237.17413-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 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);