Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3682036imm; Mon, 20 Aug 2018 02:58:21 -0700 (PDT) X-Google-Smtp-Source: AA+uWPxBBa7FF/+Q6vVBI3Ugfudv4H97dplwFidaS87EF6DNjjGSnCg+qbN4ePSN2hM8VrdgRU9T X-Received: by 2002:a17:902:3081:: with SMTP id v1-v6mr45406406plb.58.1534759101570; Mon, 20 Aug 2018 02:58:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534759101; cv=none; d=google.com; s=arc-20160816; b=vKh5STQmBCYN9Ff1/7kt5zBp2clnVsOP668nVLqhFFSGp9bAYrN2bSaotwrkd/XTmr lfpSyQbefPZTPYWtVjIU6MXBK6LKPfRRazLk+LejYdiViaqgtFhdwE5/NTzvBpcJinK2 tBQcx44kudispQ7KEAQZABh9wAwywhhxPZUM7LzKtW4UmR9kp780lEw1V3auVqgkxAyV rBvl5b0/M27RVlYm4jcgkMlkztm07N8KHkYtVh6GLVjlSCc1LFlDEw9Lpqi1Mj14i7YY 6GweTmA7WqHeU28vrBb5/NvgNIPHwyRvnDvmy86LVWJRCilX1BDEPDOTpVz1tHWLUPSe OVMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=eYYTBYLQ8HFQz4II+9lDgGcvPbi+r8n9Gj7PGi5UVB4=; b=Pe+RTepQ7VEKtFhSSOsNPuk9fFVejVFD8Z0NVwh4d/RMVfeGDVPQw3eTLpU1UMk8BF Qk/AeKSEeAWq67gZ6eu2Fd+Tkcgpa2DaeTTvJK+fXYItEuCTgtVJMxIfod1gOCYOULI2 G7pxrfdTNUhtS2nc/U3xVmWjfndX3+dwK7CpsrK8Y6oAlrlakPVNSgAj49Dztm8fvebU ZPnyFVfKbfLSQ3GYZc/ekpH8EdusImSgt9Q5uR41RW/cg+pa64bDpKdYLpcLKZcWaegQ 8rZP6Su2rzPuNd/eD1NOnwI/Fhk4NrB0b/9YgOOI65TcsClCbxe6+/saAGxKmy9DwfVk duYw== 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 8-v6si8860768pgu.519.2018.08.20.02.58.05; Mon, 20 Aug 2018 02:58:21 -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 S1726187AbeHTNL4 (ORCPT + 99 others); Mon, 20 Aug 2018 09:11:56 -0400 Received: from mail.bootlin.com ([62.4.15.54]:35188 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725948AbeHTNL4 (ORCPT ); Mon, 20 Aug 2018 09:11:56 -0400 Received: by mail.bootlin.com (Postfix, from userid 110) id 18F7020DEE; Mon, 20 Aug 2018 11:56:57 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from localhost (AAubervilliers-681-1-85-9.w90-88.abo.wanadoo.fr [90.88.27.9]) by mail.bootlin.com (Postfix) with ESMTPSA id DBFC920703; Mon, 20 Aug 2018 11:56:56 +0200 (CEST) Date: Mon, 20 Aug 2018 11:56:57 +0200 From: Maxime Ripard To: Paul Kocialkowski 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 Subject: Re: [PATCH] drm/sun4i: Avoid failing to init fbdev without any connector Message-ID: <20180820095657.rcs3wxikxprty55d@flea> References: <20180807193919.4800-1-contact@paulk.fr> <20180807201801.GF3008@phenom.ffwll.local> <230112e8b2ad4b4e53b54fe1446e7f71aa09e514.camel@paulk.fr> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="brph2bwq7h4vdshc" Content-Disposition: inline In-Reply-To: <230112e8b2ad4b4e53b54fe1446e7f71aa09e514.camel@paulk.fr> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --brph2bwq7h4vdshc Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Aug 07, 2018 at 10:31:30PM +0200, Paul Kocialkowski wrote: > Hi, >=20 > Le mardi 07 ao=FBt 2018 =E0 22:18 +0200, Daniel Vetter a =E9crit : > > 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. > >=20 > > 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? >=20 > 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. >=20 > 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. >=20 > 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. If one wants to do headless rendering, mali-drm or lima looks like a better solution. Maxime --=20 Maxime Ripard, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com --brph2bwq7h4vdshc Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEE0VqZU19dR2zEVaqr0rTAlCFNr3QFAlt6kGgACgkQ0rTAlCFN r3QvMw/+ONJADCO6KUornzlgOakDTKkCVgTK9/SouB4ykqlQulFygTjAkzUiZfbg 9A4E4DvU1DqJY+/ihqaoNZ1x3Stse7Ip/J3arWbs0lgn/5IxOXGMVFmxPr2EJ9XP lthNuB8ufC++PiY3zUORqMgXDtfmxOEI962PtaqxuFnf3RYjf4GgZzkOzs+y9xwe 2RerAB54hM1h0f+NyVZVCNw7jxvlJLO61IvEp6xPBrRQxypq5AVcQR5zyzbuVfl+ 6ITdRfeNPkFT0vHnSiCpBV/f8/9FFA+kjHxcTU7yR5Nd4KDGqsph84CtwaOvuJUP +HC6TD+ahnlVyV80FWe/fbbvdXBH93W0akOqSlvzZT3RuouoWTz1LOXmePSHHap/ o+3B9xPbo3VXhoNxUhmy1S6akSkief/JAXPxYJbG1pZ+ZMwl+fAOoYEfKruI7Ka8 7BsQPKNPFQFJKgCm+9OhXHtC6AuYpmtZr9W0hRiVOt5YJSjBKIHt2QEJLncDBRSF ZnP4O+wS0dtzu7s5UpISX6K1xmUTisTpN+kgR7H2J5+iFUe0RMpGXodi8peR61g8 s8r2S1a/AFSPx48ygPQH2LQ/2FczoIrJ6B9mrGeNcNGQKyDFZLqNSDAvMaJyZOCI L57LVkvq5KKG1iBYdxWevLjRE3/PXMookUXBRZsTjfGKeAwgcEE= =Oi5c -----END PGP SIGNATURE----- --brph2bwq7h4vdshc--