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: 9933825 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 4E8DF60309 for ; Fri, 1 Sep 2017 09:46:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5266028614 for ; Fri, 1 Sep 2017 09:46:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 477312861A; Fri, 1 Sep 2017 09:46:37 +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 0DD9E28614 for ; Fri, 1 Sep 2017 09:46:36 +0000 (UTC) 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" X-Virus-Scanned: ClamAV using ClamSMTP 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;