From patchwork Fri Sep 1 09:46:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 111478 Delivered-To: patch@linaro.org Received: by 10.140.95.112 with SMTP id h103csp793683qge; Fri, 1 Sep 2017 02:46:37 -0700 (PDT) X-Received: by 10.98.82.207 with SMTP id g198mr1634677pfb.294.1504259197033; Fri, 01 Sep 2017 02:46:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1504259197; cv=none; d=google.com; s=arc-20160816; b=yQMKpl72QIztp1943+wX3cNfd6ADEyJ2cD10fwvNhIfxs/FVjJs4UquAL314Kk2JWV vaTypmBFJ1ALHUBHYpLxsUclTSxLJXWNccLg1r+/YqdGwLXdpu928yIU52nvjRPYl7gZ Uhr3NSE+H0brXpaPj5dihDknLdPM4ZG0kiTijrO83t4Vgpo1Mjo75+7Bc/YCL/VVIBHK ngDAlJvTMIxysK/eCo+3RuaozAhXK7GgZW1GXI2Lmu3Q4SppgkvI2s5+KJG+2iu1lHJs R/dlzDvF3zjGEKH+dMSEhTwlXIzlp7HZTxuWYTIQMbugk9BFjcgzUcVdnU42C6L8ixBd eriQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:cc:message-id:date:subject:to:from :dkim-signature:delivered-to:arc-authentication-results; bh=0IUtbg4ob7WhTvxbEFB6WaxuB3zHm33zT8VqTzr4LLE=; b=rXONHpJdwNnFrFqS6i1ztcnY2iru1VYjhbCw+kpIKV7B9RZJRVIdsSY+hfp/8wKLqa DMedMmBs/+94AX2jJQwxTHVZnjfyueNSvY8QMqUnT586P70xOhz5/0ClaaAvFmMgz4R+ wooV7aM58TZPO4SgECE7Wgyx67uBlPK7J2okK6UDUaJ7g3Z8bIHv9Z3uIKlbbhgvl8vf ZsOg24BeKuPCPviAh7y9FIkiUk3rp2ciXwI9AmV+dvlnQx51OmZLA0HnHz5buEgcJE/9 MBAXfCF6uPsCBDFQZxUU0z4+QUclrMVLm+yhYpdeQXz9n2GgWgajc2otqyUeyxrDU1zZ it/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Ef63Na6G; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id b34si1582431pld.109.2017.09.01.02.46.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 01 Sep 2017 02:46:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Ef63Na6G; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 480256E80C; Fri, 1 Sep 2017 09:46:36 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf0-x230.google.com (mail-lf0-x230.google.com [IPv6:2a00:1450:4010:c07::230]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1865B6E80C for ; Fri, 1 Sep 2017 09:46:33 +0000 (UTC) Received: by mail-lf0-x230.google.com with SMTP id z12so7346061lfd.3 for ; Fri, 01 Sep 2017 02:46:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=KxtYu8WX+TSYpb4Id9J1gXUIRjjGy7KZ7F9y1mN800o=; b=Ef63Na6Gxnq38Q9ET0wb6dfRtJzMflBCYXdFyhZKnqgF8Szw0qcEUrR6HovZkv9N2P Ce/nPGhEcx8SZ5lDS3+hmobJGJwjr2Tiy+gJgovBL4UgThg4iul1Qocp59nE9zO6QuGs TWi+DwxPz9iA6LZroW2CsoCLNtkFOGCY+WAaY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=KxtYu8WX+TSYpb4Id9J1gXUIRjjGy7KZ7F9y1mN800o=; b=fkphxQ+Ou7Maq7nZZfC+FEZfRxMhMUOa6gw5oavrgzzRLPlLvRLOWYjwsyGy+EnacU d4wBZGrewtEFL1hS2nkk1XhQlGi7bh7hyBHq2SeMr3K2M3EFnLJCbSIT0ey93p+XXyK0 bpJgQ/Xv1NTChX8SVtdnIFKQmBTg3ibxHu8bA9bII54ULeI2neaEGwVIZ1guNHDXdzTh txC+k9ZKKfH+09C1v8o6Nh94lDV1HU+udEemfZE7p+Wf8i5wAJ1AXANo+/snBxnFbQd+ mnLkseZrsiBUvmMrTukZbUyeFJUCZl7xwPwXDK1pIU8vKKakO7KLTfJB96ap/pKx8nsI 2tuQ== X-Gm-Message-State: AHPjjUjETX5x96ti07XjZkVEv1yNnn/sxYi/ghFfTLzkF9q3ita3OCKB 3j3G5BWlEpUKW/vZhcqayg== X-Google-Smtp-Source: ADKCNb5iEDV46EO8XT6rMcptE0g3mn0YPklc50cT9l7MIwbkmnl76wGQxXwpZXXderneHmxFTbB/wQ== X-Received: by 10.46.86.17 with SMTP id k17mr547073ljb.77.1504259192297; Fri, 01 Sep 2017 02:46:32 -0700 (PDT) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id s82sm341472lja.8.2017.09.01.02.46.31 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 01 Sep 2017 02:46:31 -0700 (PDT) From: Linus Walleij To: Archit Taneja , Andrzej Hajda , Laurent Pinchart Subject: [PATCH 2/2] RFC: drm/pl111: Support using the VGA bridge as fallback Date: Fri, 1 Sep 2017 11:46:29 +0200 Message-Id: <20170901094629.6566-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.13.5 Cc: linux-arm-kernel@lists.infradead.org, dri-devel@lists.freedesktop.org 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" If we cannot find a panel, assume that the output from the PL111 is connected directly to a "dumb" VGA connector, so look up the connector from that bridge. Signed-off-by: Linus Walleij --- This is how the new API is used in the PL111. --- drivers/gpu/drm/pl111/Kconfig | 1 + drivers/gpu/drm/pl111/pl111_drv.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/drivers/gpu/drm/pl111/Kconfig b/drivers/gpu/drm/pl111/Kconfig index e5e2abd66491..82cb3e60ddc8 100644 --- a/drivers/gpu/drm/pl111/Kconfig +++ b/drivers/gpu/drm/pl111/Kconfig @@ -8,6 +8,7 @@ config DRM_PL111 select DRM_GEM_CMA_HELPER select DRM_BRIDGE select DRM_PANEL_BRIDGE + select DRM_DUMB_VGA_DAC select VT_HW_CONSOLE_BINDING if FRAMEBUFFER_CONSOLE help Choose this option for DRM support for the PL111 CLCD controller. diff --git a/drivers/gpu/drm/pl111/pl111_drv.c b/drivers/gpu/drm/pl111/pl111_drv.c index f5bc6f160e60..6db423bbd84e 100644 --- a/drivers/gpu/drm/pl111/pl111_drv.c +++ b/drivers/gpu/drm/pl111/pl111_drv.c @@ -67,6 +67,7 @@ #include #include #include +#include #include "pl111_drm.h" #include "pl111_versatile.h" @@ -128,6 +129,8 @@ static int pl111_modeset_init(struct drm_device *dev) if (panel) { priv->panel = panel; priv->connector = panel->connector; + } else { + priv->connector = drm_dumb_vga_get_connector(bridge); } priv->bridge = bridge;