Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3832704imm; Mon, 20 Aug 2018 05:36:29 -0700 (PDT) X-Google-Smtp-Source: AA+uWPwIiAi5AEYutzts0XKvPih75CsaMIu7Ia69Ye5l7PnsqYCz3ZhFawQZvHzpZ6VKmW7ti+7+ X-Received: by 2002:a63:f751:: with SMTP id f17-v6mr43709342pgk.410.1534768589416; Mon, 20 Aug 2018 05:36:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534768589; cv=none; d=google.com; s=arc-20160816; b=BigPFKH0U1VrrGODZIIVs9Nft7sljQXLLetBCkntB8+s6+pMd7PLwt1mL1rEv9m10q x5/ypDNHmN3R+9yyhKCxAvtQSAErC0tpHeCzfR5BzeM0Sn+aFBm4Hc8kPPOExHmRucGz 7W9Srh7Q2XTW03SiqRyJF73Wng3ebsaA/yh+OLiRbd0/gsZOv/eLiLjMPlRLV83Z7Ppd VREg256r7JTXwBDxq5LGT5Af8tTU1pJXpHW9wrecphRNisXrF9pZp6KlkSU8JCGIz6IV eb0kp6jUuGcvcil5hnolj2Zx3yLG6uUIPzaoetDk3uEBWlX/PzhC6UA8NXkrzySxpQCd Uhmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :arc-authentication-results; bh=49Ij6ib3vmZEpogcNaVhCRnRiUqU+uTwDTynB5pYMu4=; b=cNbQ76hQxlLZqU9+XyLbsImLSIBo89mE74OUz6X1MUt9hVuDUS8rinaFjdt4dwTapR nOPtKly5O8ZJxmUzOBhmkJYSESAsLf6y7bkmtoG32l70W1hwSIZVATJlO3ewzniHXt6o YpBTMkFkZzq/+rcne7RwS6BHdp/7VcP1OXBbKtau7ndT63vHcCF8mJK/vjd3Kg8RhBOc 3Fe18CaXM4M0/5ryJLxDprIuFDr4bz0hlJ00RZEwWEkLGeb5YLSEEJdoOvP74aC9qVw3 Gyhcz7Q/LDhCRId36ZX6fOnLkNAW+A1geYZ6X2J6UdghvboUNvcn/WMiirC6PAeT+xtT 6Tlg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h17-v6si9517071pgj.214.2018.08.20.05.36.14; Mon, 20 Aug 2018 05:36:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726854AbeHTPu0 (ORCPT + 99 others); Mon, 20 Aug 2018 11:50:26 -0400 Received: from leonov.paulk.fr ([185.233.101.22]:58784 "EHLO leonov.paulk.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726197AbeHTPu0 (ORCPT ); Mon, 20 Aug 2018 11:50:26 -0400 Received: from gagarine.paulk.fr (gagarine [192.168.1.127]) by leonov.paulk.fr (Postfix) with ESMTPS id 79123C01D2 for ; Mon, 20 Aug 2018 14:34:57 +0200 (CEST) Received: by gagarine.paulk.fr (Postfix, from userid 114) id 40472C0F4A; Mon, 20 Aug 2018 14:34:56 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on gagarine.paulk.fr X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT autolearn=disabled version=3.4.1 Received: from aptenodytes (AAubervilliers-681-1-85-9.w90-88.abo.wanadoo.fr [90.88.27.9]) by gagarine.paulk.fr (Postfix) with ESMTPSA id D81D3C0F3B; Mon, 20 Aug 2018 14:34:44 +0200 (CEST) Message-ID: <412de868a8d0a41aa2256a5fbe2f3701de582e1b.camel@paulk.fr> Subject: Re: [PATCH] drm/sun4i: Avoid failing to init fbdev without any connector From: Paul Kocialkowski To: Maxime Ripard Cc: Daniel Vetter , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, David Airlie , Chen-Yu Tsai , linux-sunxi@googlegroups.com Date: Mon, 20 Aug 2018 14:34:44 +0200 In-Reply-To: <20180820095657.rcs3wxikxprty55d@flea> References: <20180807193919.4800-1-contact@paulk.fr> <20180807201801.GF3008@phenom.ffwll.local> <230112e8b2ad4b4e53b54fe1446e7f71aa09e514.camel@paulk.fr> <20180820095657.rcs3wxikxprty55d@flea> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.4 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Mon, 2018-08-20 at 11:56 +0200, Maxime Ripard wrote: > On Tue, Aug 07, 2018 at 10:31:30PM +0200, Paul Kocialkowski wrote: > > Hi, > > > > Le mardi 07 août 2018 à 22:18 +0200, Daniel Vetter a écrit : > > > On Tue, Aug 07, 2018 at 09:39:19PM +0200, Paul Kocialkowski wrote: > > > > Initializing and registering fbdev requires at least one DRM connector > > > > and will fail otherwise. In order to support headless setups (for > > > > instance for GPU rendering with the GBM backend, where a DRI card node > > > > is required to provide GEM memory reservation), add a check on the > > > > number of registered connectors before initializing fbdev. > > > > > > sun4i is a pure kms driver, why exactly do you need it for gbm backed > > > rendering? What exactly is rendering here, and why does it insist on a > > > display card node, even if that display card node is 100% defunct? > > > > The non-free Mali blobs provide GPU support with a GBM interface that > > takes a DRM fd in order to reserve the memory it needs for its rendering > > targets. This uses the GEM interface available through the DRI card node > > (and there is no render node with the non-free Mali driver). Allwinner > > has a minimalistic out-of-tree driver pretty much only for this purpose. > > > > I crafted this patch when someone on IRC tried to get the out-of-tree > > Mali GPU driver going with the mainline kernel in order to do rendering > > in a GBM buffer, since it's apparently the only option for headless > > rendering with the blob. > > > > In my opinion, supporting the pipeline of an out-of-tree GPU driver that > > only works with a non-free userspace blob is not a valid reason to do > > anything. Still, it felt like adding support for the headless use-case > > wouldn't hurt, whatever the underlying use case for it may be. > > If you start considering the DMA constraints and the API in itself, it > does hurt. You'll get buffers that are not meant for the GPU, and > might not be accessible, and from another device without using > dma-buf, which again works because the hardware is dumb enough, but is > breaking a lot of expectations in the process. You're right, this is too much abuse. I'm dropping this patch then. Cheers, Paul > If one wants to do headless rendering, mali-drm or lima looks like a > better solution. > > Maxime > -- Developer of free digital technology and hardware support. Website: https://www.paulk.fr/ Coding blog: https://code.paulk.fr/ Git repositories: https://git.paulk.fr/ https://git.code.paulk.fr/