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: 9501199 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 72F3C606E0 for ; Fri, 6 Jan 2017 14:31:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4AB5B284C8 for ; Fri, 6 Jan 2017 14:31:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3F696284D0; Fri, 6 Jan 2017 14:31: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 CDE18284C8 for ; Fri, 6 Jan 2017 14:31:16 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 62EBC6EA1A; Fri, 6 Jan 2017 14:31:05 +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 59C926EA14; Fri, 6 Jan 2017 14:30:58 +0000 (UTC) Received: by mail-wm0-x241.google.com with SMTP id l2so5416452wml.2; Fri, 06 Jan 2017 06:30:58 -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=oyhd/aTSXzdD/tsQA+qvpf/TSvOdQWxgq+CwamwPX3LOPY+i5JTMemCaCN/6YQi+od vbjjkaqKPHCIepqkFXgjooT8kIkt8PmKeSZJVQ5VF/QiBx8szBdYaoz6nZ078cdKW/0g s/Xo8po/RoCEIU38uwitvfPmEZnXdMHYzACwWm49oppbYGBwRAuoXxlqxHhZkqMDjpOl PI0nIN0f+e5MXLenyPApYAVqTjMXIOJ/OX2tkz0MqpPA+nPh6G0tCA13ae0pDBWOorr2 zKgkKxgtCAztlYAlQ3c7Y42QCLXFGwESIY8B2k1MtT2D+/bQUejAMa+qKoB2HbM4OadS XPNw== X-Gm-Message-State: AIkVDXKMyjpMPHOBYmw34ElOkIaKCnhHlbRE989JZ2Y6LbJraRaE2I3FCrp1/u8neUU3DA== 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 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> 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);