From patchwork Mon Mar 5 08:57:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 130624 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp2451856lja; Mon, 5 Mar 2018 00:58:12 -0800 (PST) X-Google-Smtp-Source: AG47ELvHsf0rI/hBrYLJD8Kc078o+APJc7LdkjVZ5vMCFTOr4BPNl90mx1uEoY8HYYwjvlbp47hn X-Received: by 2002:a17:902:12e:: with SMTP id 43-v6mr12439920plb.77.1520240292530; Mon, 05 Mar 2018 00:58:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520240292; cv=none; d=google.com; s=arc-20160816; b=YGEDyz6CHjeo7K/3b5wkUzYqhvqQp9G5KBw3xmJ6HU2jhfyzQp7vFfGLhwODY9Bd1H 6J6Cx+OKNZB02e0SIoqfoNecbnA3IC74xTcP9lgsnS0BIadbZaa6E6ZWtVLDxSx8NbrW eE8AlXsujl+ElwtBCBmlY2inaEDQ1pZzJP4tVzsaXVfo6iFYVd8eXckPAqQ49EcQOAVg xSM5FCYx5NE4L7BVVBpG26lXux+B+TN4tc0Q80ZVMREwhnTA2fPQ/bWqk5g0PyYrp+4x T/GlnOKAzQBg6saWCaLCe5JhJMwMd6aXw9a5hb4Ws++7HV6oLIEmylm+D2HljjH1Ri8w SGYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter :arc-authentication-results; bh=uuiV2t6kx+jdJ/EwZ4tSzS4a+F1wZfXa8JiAI5YbfgQ=; b=Ayh+nAdsGpEKlSlgX2YcZi7OaVqqQ+BvCkBgW6vYF9ktyiMLj519Hs2kysWLwQ43UX ajDznQGmrv6jD4buTVBaw4et5dyt6tVsU05eWsEDVq56HZ/1iiZlIjzAl6o/2gQxgSoL ppPbVUnxEztN/2U7G+SJR8mrmSIonGRcEEEBReysCmAvIRGI5pkT4jaGtvYzz2rqj97j J9W6tNAM9EKVIrCTZQ5JiBA71LPToZw6K6ButUF58RIg4M+V/1LpILmr06wsDc4UOHRP 6ivseYhZgb/RqnUNvGOB7snaHRerqtrLM+u29clKJ5KEHl4za9snC1LJARVpDpkYwkld KwiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@samsung.com header.s=mail20170921 header.b=d7WMTu4w; spf=pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f1-v6si8947909pld.744.2018.03.05.00.58.12; Mon, 05 Mar 2018 00:58:12 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@samsung.com header.s=mail20170921 header.b=d7WMTu4w; spf=pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933491AbeCEI6L (ORCPT + 3 others); Mon, 5 Mar 2018 03:58:11 -0500 Received: from mailout1.w1.samsung.com ([210.118.77.11]:39600 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933492AbeCEI6J (ORCPT ); Mon, 5 Mar 2018 03:58:09 -0500 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20180305085807euoutp01123cc93d2e272ab5f55292dfa431fc5d~Y_ny8L4qO2387723877euoutp011; Mon, 5 Mar 2018 08:58:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20180305085807euoutp01123cc93d2e272ab5f55292dfa431fc5d~Y_ny8L4qO2387723877euoutp011 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1520240287; bh=bW/OM0hqVhw2bwfdhVWXyXGcaTquvOO/BaMir5HmBb0=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=d7WMTu4wkKZzWyM0D6tFjneXZp1eI3Z2sFhHGzXV4TQcjZcWBlMWF3VPG0cHZZcNK yHE0TUAi1AXbZplCn961K5uElJupiyZ7lp1j9BOgg6swysjQu8o/UWIATYIC6SevJx uY8N1LwGsIXM1cDVRRY9pdugC63ty+Osk4i1xv3E= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20180305085807eucas1p2f2bb549b7dc1151b27f8639b34048ee9~Y_nyZzWjl2306223062eucas1p22; Mon, 5 Mar 2018 08:58:07 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 04.C6.17380.E960D9A5; Mon, 5 Mar 2018 08:58:06 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20180305085806eucas1p2156c70fa406dd25814b12a873dac5281~Y_nxl_mNF0174101741eucas1p2H; Mon, 5 Mar 2018 08:58:06 +0000 (GMT) X-AuditID: cbfec7f4-6f9ff700000043e4-25-5a9d069ea170 Received: from eusync1.samsung.com ( [203.254.199.211]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 60.F1.04178.E960D9A5; Mon, 5 Mar 2018 08:58:06 +0000 (GMT) Received: from AMDC2765.digital.local ([106.116.147.25]) by eusync1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0P5400MEY0WMAI90@eusync1.samsung.com>; Mon, 05 Mar 2018 08:58:06 +0000 (GMT) From: Marek Szyprowski To: dri-devel@lists.freedesktop.org, linux-samsung-soc@vger.kernel.org, linux-rockchip@lists.infradead.org Cc: Marek Szyprowski , Archit Taneja , =?utf-8?q?Heiko_St=C3=BCbner?= , Thierry Escande , Tomasz Figa , Sean Paul , Bartlomiej Zolnierkiewicz , Laurent Pinchart , Thierry Reding , Sandy Huang , Enric Balletbo i Serra , Andrzej Hajda , Douglas Anderson , Haixia Shi , Zain Wang , Lin Huang Subject: [PATCH 3/3] drm/bridge: analogix_dp: Don't create useless connectors Date: Mon, 05 Mar 2018 09:57:41 +0100 Message-id: <20180305085741.18896-4-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.15.0 In-reply-to: <20180305085741.18896-1-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAAzWSfyyUcRzH+z6/7nG5PDvGd2q1XauZSWm1fW9Ev6antaY/rLbbKocn5Bzd wxWFW5OOOD82y88L3fxahEyYH1HRMoxIkmXEH4S4miy5nEf/vT6f9/v9+Xy+25fGpQbSmQ5T R3MatVIlo8REY/da/yEjVaQ4YqySo881/SS6r18gUV3ucxL1lXVSaPjXEoWejXcBZJmaJ1FR djz6XfseRw8bpjCUkmUSoZVJC45yB9oxVP1mQoQmavsAMj/YoFDGyBCF1lqMBEoedTxpzxbo Bgn2gyEdY5smTIBtzp8QsQX6PJL9+qgHY1+YEtm/+R0Ea2ioAuzLj0acNdfvvbRTIfYK5lRh Wk5z2DtAHFq+OElF/XW+M/a2ktSBT46pwIaGzDG4kNOBpQIxLWUqAHwyObxdmAFc7lgH/121 f0wiQSgD8NX9SkIodBhcbTNhVhfFeMDUhVTKyg6MCq7ovwOrCWfqSFg93rw1yp7xg+ZRi8jK BHMAFqXptsIS5gSsmDOIhHX74NPV5q1B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hRmkOFiVx3vMGlVFCAumJJanZqakFqUUwWSYOTqkGRp886em8DzhFX3D2 FNXaFc84pcrf37fVtOF+18PAxesN7weVXLKzeyN+ZZ3dKvvXN7ZM/q/5WOnH9ETxlMPajDu/ XH8gIdnmO/vr8sZPlkI8W+PUDpgJvOWdxOmaMGmyUE/3pq/XUyYZq93dw9gxL2qdxEtvh7+Z wU0fovKF9zdllVuYN6yIUmIpzkg01GIuKk4EAI+myKZxAgAA X-CMS-MailID: 20180305085806eucas1p2156c70fa406dd25814b12a873dac5281 X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20180305085806eucas1p2156c70fa406dd25814b12a873dac5281 X-RootMTR: 20180305085806eucas1p2156c70fa406dd25814b12a873dac5281 References: <20180305085741.18896-1-m.szyprowski@samsung.com> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org If there is another bridge after analogix_dp, then the connector object should not be created. This fixes following timeouts on Exynos5420-based Chromebook2 Peach-PIT board during boot: exynos-dp 145b0000.dp-controller: AUX CH cmd reply timeout! exynos-dp 145b0000.dp-controller: AUX CH enable timeout! exynos-dp 145b0000.dp-controller: AUX CH enable timeout! exynos-dp 145b0000.dp-controller: AUX CH enable timeout! exynos-dp 145b0000.dp-controller: AUX CH enable timeout! Signed-off-by: Marek Szyprowski --- drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 29 ++++++++++++---------- drivers/gpu/drm/exynos/exynos_dp.c | 1 + include/drm/bridge/analogix_dp.h | 1 + 3 files changed, 18 insertions(+), 13 deletions(-) -- 2.15.0 -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c index b391d149db91..a693ab3078f0 100644 --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c @@ -1012,27 +1012,30 @@ static int analogix_dp_bridge_attach(struct drm_bridge *bridge) { struct analogix_dp_device *dp = bridge->driver_private; struct drm_encoder *encoder = dp->encoder; - struct drm_connector *connector = &dp->connector; - int ret; + struct drm_connector *connector = NULL; + int ret = 0; if (!bridge->encoder) { DRM_ERROR("Parent encoder object not found"); return -ENODEV; } - connector->polled = DRM_CONNECTOR_POLL_HPD; + if (!dp->plat_data->skip_connector) { + connector = &dp->connector; + connector->polled = DRM_CONNECTOR_POLL_HPD; - ret = drm_connector_init(dp->drm_dev, connector, - &analogix_dp_connector_funcs, - DRM_MODE_CONNECTOR_eDP); - if (ret) { - DRM_ERROR("Failed to initialize connector with drm\n"); - return ret; - } + ret = drm_connector_init(dp->drm_dev, connector, + &analogix_dp_connector_funcs, + DRM_MODE_CONNECTOR_eDP); + if (ret) { + DRM_ERROR("Failed to initialize connector with drm\n"); + return ret; + } - drm_connector_helper_add(connector, - &analogix_dp_connector_helper_funcs); - drm_mode_connector_attach_encoder(connector, encoder); + drm_connector_helper_add(connector, + &analogix_dp_connector_helper_funcs); + drm_mode_connector_attach_encoder(connector, encoder); + } /* * NOTE: the connector registration is implemented in analogix diff --git a/drivers/gpu/drm/exynos/exynos_dp.c b/drivers/gpu/drm/exynos/exynos_dp.c index 33319a858f3a..964831dab102 100644 --- a/drivers/gpu/drm/exynos/exynos_dp.c +++ b/drivers/gpu/drm/exynos/exynos_dp.c @@ -244,6 +244,7 @@ static int exynos_dp_probe(struct platform_device *pdev) /* The remote port can be either a panel or a bridge */ dp->plat_data.panel = panel; + dp->plat_data.skip_connector = !!bridge; dp->ptn_bridge = bridge; out: diff --git a/include/drm/bridge/analogix_dp.h b/include/drm/bridge/analogix_dp.h index 5518fc75dd6e..711fff9b6803 100644 --- a/include/drm/bridge/analogix_dp.h +++ b/include/drm/bridge/analogix_dp.h @@ -31,6 +31,7 @@ struct analogix_dp_plat_data { struct drm_panel *panel; struct drm_encoder *encoder; struct drm_connector *connector; + bool skip_connector; int (*power_on)(struct analogix_dp_plat_data *); int (*power_off)(struct analogix_dp_plat_data *);