From patchwork Thu Jan 5 13:06:45 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomeu Vizoso X-Patchwork-Id: 9498981 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 71D03606DE for ; Thu, 5 Jan 2017 13:07:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6DEBA283AC for ; Thu, 5 Jan 2017 13:07:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 628A5283E5; Thu, 5 Jan 2017 13:07:51 +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 CDFFF283AC for ; Thu, 5 Jan 2017 13:07:50 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C9FA36E2F5; Thu, 5 Jan 2017 13:07:44 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wj0-x242.google.com (mail-wj0-x242.google.com [IPv6:2a00:1450:400c:c01::242]) by gabe.freedesktop.org (Postfix) with ESMTPS id 83B686E2EF; Thu, 5 Jan 2017 13:07:40 +0000 (UTC) Received: by mail-wj0-x242.google.com with SMTP id qs7so41489422wjc.1; Thu, 05 Jan 2017 05:07:40 -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=Lf0QjaOefmfNZGOkr0SGM+z28SbniYH3YAhlUtGFd3X7HYVYdse8g67CSJ7dC628Gg 01Xf9+32pj04pPye5WOQaUs+pJqEHiQKom1Bq0fLyJ4NzoPZQquuVHBC1q/E8lDkyXqG cYvG6matAaMhwxMKQ0y7GOoBrhqIFtcJm8arJbNuIB5FKNsvA2siyaxdFwU/+EvuiepU TouLMtfdzO+mneGL9mSTFqCiOnmDsNfg0s9HNRkvggzQqqrpQlAVqY1MNR/C6IvP+9Oe boWpvIX4S3bnd/KVZ41InTWP9OPI2uvtjkAEqH17cWHd32nPRphIX5qe11ge6IRELUTk kfkQ== 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=Lr/QpNHRItRX8cpaNL7StsTB+4BS4W2h2JHlaBomYQrOBc2n+1X0ohfQXOtg8DXwdu vTpQIXRGuqntvR8YZYG6vRq6vg2dVYJRz9eRqYeY3+I3D41DDSvhoWfmV/IAO4uLSshp 6yqE/XJ6kP1vC3Heo1hv0Nj9q3wppG8de/+jgapzLbXHybF4y+zusBH5NPvoIoBLpRNL 5vA1Ef/b+4DMhlf7pLxFT2ux1Y9TnfCX5+7ZPv8JUClPR0vcwhukmUqivihYpKGSLgN7 aoqrkm0ZC7lteZGhJMxtbLfNPMaOKJ3bgfSc1h0TU9pD6PDGd2U0fiTNHLb19ovb/s7U Anig== X-Gm-Message-State: AIkVDXI08EOew35djcdNm3/+S25e5MqDw4eQWtClpNDjk3iwg12MeGIlWBoycZG7ddo25Q== X-Received: by 10.194.90.83 with SMTP id bu19mr61050360wjb.68.1483621658768; Thu, 05 Jan 2017 05:07:38 -0800 (PST) Received: from cizrna.lan ([109.72.12.216]) by smtp.gmail.com with ESMTPSA id b3sm103716992wjy.40.2017.01.05.05.07.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Jan 2017 05:07:37 -0800 (PST) From: Tomeu Vizoso To: linux-kernel@vger.kernel.org Subject: [PATCH v2 2/5] drm/bridge: analogix_dp: set connector to drm_dp_aux Date: Thu, 5 Jan 2017 14:06:45 +0100 Message-Id: <20170105130648.3139-3-tomeu.vizoso@collabora.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170105130648.3139-1-tomeu.vizoso@collabora.com> References: <20170105130648.3139-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);