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: 9933829 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 685B260309 for ; Fri, 1 Sep 2017 09:47:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6BCB828619 for ; Fri, 1 Sep 2017 09:47:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 606D32861E; Fri, 1 Sep 2017 09:47:12 +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.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E3D9728619 for ; Fri, 1 Sep 2017 09:47:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=YffKvJYEpIpyg/B5vGLtHsSqBYIJPIQyp84bgVMChk8=; b=Z1N dbN5D/E7W2DxdZ24zBhNr66YeDmEeSd/0weEoBRbgZ2of243WOfuMqCtLD5Rl3o3Rbi2oSQuXxwnd XsQZWmakohBwcUHmSm31uXBbjNwu+C4axZjZb8fqPocEXFbnPQAsvQIO79aEMZWyhk8M0wW+QHqDZ 2ie2dC2HPz6MAX5PC13RKN/39a7YDORzJt+hoTeTwlHo4f54VnkW41ycy2NeXp30DHUpqz4+kRXaW GNUj6vKNxPpUycEHYdGMlBwYg52bYRtZUyKqp7v216PkW7qPTq86lShdLWGlhg8vFF55J2WE3vB+1 8HzTe8d44IbSjbN8r92auh/iQEPEf+Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dniXc-0000av-56; Fri, 01 Sep 2017 09:47:08 +0000 Received: from mail-lf0-x231.google.com ([2a00:1450:4010:c07::231]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dniXN-0000Jr-Jg for linux-arm-kernel@lists.infradead.org; Fri, 01 Sep 2017 09:46:58 +0000 Received: by mail-lf0-x231.google.com with SMTP id a126so7401488lfa.0 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=aV3A++MmwWWW2sKbm0Pu69ntauTfcjoASB9OFS9vM26NjynuKsVTbtu6CJsYD4uN30 to4HCcWgJBZng+VgM+lIx5lBbQ9echYFy4BA6BBnwo2PFGo4d4G9DCX+4qPGgaje7DRG uCsHv3tne6oTnwjqJnRK/09RHWL6D7pLOHnwL81AE2fHczTMPRTiR3xgGadHxSJc5r31 /Yp1nrocFMqzzUq41t6igrrcmd7HY23QPqeoEitb84WFOZTBJ0uuW7HI+wzOo3QgH0Jt zEguXu8Ea4HfStPZQBBaV1CtNanv9X+a41iVUXvQqXu+Il2gIVJIo934Lpu/toi7hc7r DQeQ== X-Gm-Message-State: AHPjjUiiD0u+VToiyrR7/GdInupOkE5Tmx5CenBkRGPhYZdB3qi92q2L /+IFO/5VPjQ3WopQ 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170901_024653_933925_88EFE1C9 X-CRM114-Status: GOOD ( 13.10 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Linus Walleij , linux-arm-kernel@lists.infradead.org, dri-devel@lists.freedesktop.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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;