Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp1252636rdb; Mon, 19 Feb 2024 08:53:40 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUX73R5F0H4DzJJyngd6s6SSmJgc0MFLjOoGqu1Je8BwsZ618lxhf4Aqy0Fhww9h2I+hURrUjT7s4d89CUr+Bc5ekhDjoE4fBp/i9/lSQ== X-Google-Smtp-Source: AGHT+IFQB1Yq4jSMFrGgSkgOWhuRHgGnB7n/zqCxmC0Xfb6a/TeIpT4uXHX1UQjKMhjKWtmqagjG X-Received: by 2002:a05:622a:486:b0:42c:7bc0:b559 with SMTP id p6-20020a05622a048600b0042c7bc0b559mr15203167qtx.47.1708361620115; Mon, 19 Feb 2024 08:53:40 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708361620; cv=pass; d=google.com; s=arc-20160816; b=cBQh28gS4CKHi7IxnuBxlJG8uiJiwnM2HGWp3kM9Ot5wFPCazaOpJDcQsbsHe5cMm8 EkvWUfb2LRPZJcuHoSSr/xCGsQKmckELYhLM7CUyeFhD7XFs1lxVMlXEz2c++j3r+FeL VCDAF6pvTk6GASPHbflgUgD2HefYNn4EzTGaBajXQXKpp2uyGmJ+2hnU7fY3orcqUFsP njzzOq4zqOR/E11bQCWDIOOKFuQFyha8Iu2dyEsP8m4OkCJliIxrgwbM+NCIuV1OvYV+ BFjkmTkgTGUu7IyuwvPFZ2X+8MlJrMOVlocX85jMRLfICiIUwd3YrqtbRfCRbzn35i2/ 4v7g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=QWTiC+CgdWcu8WgeuX9SKMgHYYMrliIKnrnlcYBVYtM=; fh=/vL/nMVDBy/wxxRKgPfVQWsw6xEeMa+YByq0V/4jS6A=; b=C9bx2++NerulQ4+HyCBi4GOA2DZeAqusxLXijUpXuEZcBK4k22UFnFOee0GEr4eYN0 +IUy8Dj6m9XNXGINcBfnURnYM6yV+vsD+eXg95L+vW8YfeE4V/LC59ufpKcpzP5lGWYW LAjICKm9+c3NfCgWUd5zy3TIGjo3//9bGR0JBbBM4Oj46N68QKzRilzdDMySut7aUViO f9U9oFIUrsEKKsDYHpV9K+ApMv9m/CazrXQhLB2seJRRfGcrIBsZTsTpcRyu/5qmpsfd i1S16ITJFBHiw9JgE0ZrWcghoMq2Hn1ihv70vYoxgYsKow8Q4fdiG4m9PGLOCSROfkuj aSeg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JI1f4X7z; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-71711-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71711-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id z26-20020ac8711a000000b0042dd90f54c5si6044282qto.547.2024.02.19.08.53.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Feb 2024 08:53:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-71711-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JI1f4X7z; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-71711-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71711-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 791051C231A7 for ; Mon, 19 Feb 2024 16:53:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1710D4437E; Mon, 19 Feb 2024 16:53:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="JI1f4X7z" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BC30441C88; Mon, 19 Feb 2024 16:53:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708361606; cv=none; b=O3Ov8yuubjsxwlkLQFUuurbWcWQHmdGUQFUpe+/k0utBq/ZpOx8958MB7/DHyKY4p1JSt+LDwtr4N5BIjfw4Ot1IkPXKFwD2lzNMhkBaRdv+pR9FUFcKZtyGaah40gXSTLiNoXsWl6wCayl4iJLcPnnuJL1IX2XImZDpaHpzZZE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708361606; c=relaxed/simple; bh=f2pGjIrGzIVHhDCQuI/OlSCJwyDJBsyEeJGyoKZ6qSw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=nbrs4c+4Djst1z+I8Ux2+at72FteVs/HOm2+ivwbrDX4bbnzWRBgAYDwM+FajYzLwNC91CLHnMkGRlxwa7lb1ZQOSd3Ka0rEC58MHuYPVxaSY1QrWOWmmLDfaV0/pxcIxK9NGUFWmf4rNSbEScwleYFbojQm3Fb26gyZDNO34Zo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=JI1f4X7z; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2E1AEC433C7; Mon, 19 Feb 2024 16:53:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708361606; bh=f2pGjIrGzIVHhDCQuI/OlSCJwyDJBsyEeJGyoKZ6qSw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=JI1f4X7zahYiOHtaw3uaKc51xnxwwsLxnN7zcPr9UHHfa+KJMCkubhWl3d1VmnY1M dycWS34G782UHX90d03d1zcpaD74GRAaYOUZ7JLBwYAHTGzFeWYNXQ1cVUXVsj1pat NwOzbUDZftmfha9RG3+a2V8BDvyVre3gMzz8lkjdIR7Haay8YaNypl3ICq57O1DP+w dkp50REOWOrEBNgor8+6criR97GU601Y7dS5XJ8NrCds/Z9TjViMZw+EDBkzO08wan LVQ5hXW6xnMj7xFgUNjOKbSSGd2EZ3UJMB3wI3CYPgJqCUDJi1aKEMh4+VnhWLvOIt QUSGPykzEJHfA== Date: Mon, 19 Feb 2024 17:53:23 +0100 From: Maxime Ripard To: Adam Ford Cc: Biju Das , Geert Uytterhoeven , Frank Binns , Matt Coster , Maarten Lankhorst , Thomas Zimmermann , David Airlie , Daniel Vetter , Sarah Walker , "dri-devel@lists.freedesktop.org" , "linux-kernel@vger.kernel.org" , Javier Martinez Canillas , Nishanth Menon , Marek Vasut , Linux-Renesas Subject: Re: [PATCH v2] drm/imagination: DRM_POWERVR should depend on ARCH_K3 Message-ID: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="n34ceiql5xopfxiw" Content-Disposition: inline In-Reply-To: --n34ceiql5xopfxiw Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Feb 19, 2024 at 10:38:12AM -0600, Adam Ford wrote: > On Mon, Feb 19, 2024 at 1:45=E2=80=AFAM Biju Das wrote: > > > > Hi Adam, > > > > > -----Original Message----- > > > From: Adam Ford > > > Sent: Sunday, February 18, 2024 11:26 PM > > > Subject: Re: RE: RE: [PATCH v2] drm/imagination: DRM_POWERVR should d= epend > > > on ARCH_K3 > > > > > > On Fri, Feb 16, 2024 at 8:14=E2=80=AFAM Maxime Ripard wrote: > > > > > > > > On Fri, Feb 16, 2024 at 09:13:14AM +0000, Biju Das wrote: > > > > > Hi Maxime Ripard, > > > > > > > > > > > -----Original Message----- > > > > > > From: Maxime Ripard > > > > > > Sent: Friday, February 16, 2024 9:05 AM > > > > > > Subject: Re: RE: [PATCH v2] drm/imagination: DRM_POWERVR should > > > > > > depend on > > > > > > ARCH_K3 > > > > > > > > > > > > On Fri, Feb 16, 2024 at 08:47:46AM +0000, Biju Das wrote: > > > > > > > Hi Adam Ford, > > > > > > > > > > > > > > > -----Original Message----- > > > > > > > > From: Adam Ford > > > > > > > > Sent: Thursday, February 15, 2024 11:36 PM > > > > > > > > Subject: Re: [PATCH v2] drm/imagination: DRM_POWERVR should > > > > > > > > depend on > > > > > > > > ARCH_K3 > > > > > > > > > > > > > > > > On Thu, Feb 15, 2024 at 11:22=E2=80=AFAM Adam Ford > > > wrote: > > > > > > > > > > > > > > > > > > On Thu, Feb 15, 2024 at 11:10=E2=80=AFAM Adam Ford > > > > > > > > > > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > On Thu, Feb 15, 2024 at 10:54=E2=80=AFAM Geert Uytterho= even > > > > > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > > Hi Maxime, > > > > > > > > > > > > > > > > > > > > > > On Thu, Feb 15, 2024 at 5:18=E2=80=AFPM Maxime Ripard > > > > > > > > > > > > > > > > > > > wrote: > > > > > > > > > > > > On Thu, Feb 15, 2024 at 01:50:09PM +0100, Geert > > > > > > > > > > > > Uytterhoeven > > > > > > > > wrote: > > > > > > > > > > > > > Using the Imagination Technologies PowerVR Series= 6 > > > > > > > > > > > > > GPU requires a proprietary firmware image, which = is > > > > > > > > > > > > > currently only available for Texas Instruments K3 > > > > > > > > > > > > > AM62x SoCs. Hence add a dependency on ARCH_K3, to > > > > > > > > > > > > > prevent asking the user about this driver when > > > > > > > > > > > > > configuring a kernel without Texas Instruments K3 > > > > > > > > Multicore SoC support. > > > > > > > > > > > > > > > > > > > > > > > > This wasn't making sense the first time you sent it, > > > > > > > > > > > > and now that commit log is just plain wrong. We have > > > > > > > > > > > > firmwares for the G6110, GX6250, GX6650, BXE-4-32, = and > > > > > > > > > > > > BXS-4-64 models, which can be found on (at least) > > > > > > > > > > > > Renesas, Mediatek, Rockchip, TI and StarFive, so > > > > > > > > > > > > across three > > > > > > > > > > > > > > > > > > > > > > I am so happy to be proven wrong! > > > > > > > > > > > Yeah, GX6650 is found on e.g. R-Car H3, and GX6250 on= e.g. > > > > > > > > > > > R-Car M3- > > > > > > > > W. > > > > > > > > > > > > > > > > > > > > > > > architectures and 5 platforms. In two months. > > > > > > > > > > > > > > > > > > > > > > That sounds like great progress, thanks a lot! > > > > > > > > > > > > > > > > > > > > > Geert, > > > > > > > > > > > > > > > > > > > > > Where can I find these firmwares? Linux-firmware[1] > > > > > > > > > > > seems to lack all but the original K3 AM62x one. > > > > > > > > > > > > > > > > > > > > I think PowerVR has a repo [1], but the last time I > > > > > > > > > > checked it, the BVNC for the firmware didn't match what > > > > > > > > > > was necessary for the GX6250 on the RZ/G2M. I can't > > > > > > > > > > remember what the corresponding R-Car3 model is. I > > > > > > > > > > haven't tried recently because I was told more > > > > > > > > > > documentation for firmware porting would be delayed unt= il > > > everything was pushed into the kernel and Mesa. > > > > > > > > > > Maybe there is a better repo and/or newer firmware some= where > > > else. > > > > > > > > > > > > > > > > > > > I should have doubled checked the repo contents before I > > > > > > > > > sent my last e-mail , but it appears the firmware [2] for > > > > > > > > > the RZ/G2M, might be present now. I don't know if there a= re > > > > > > > > > driver updates necessary. I checked my e-mails, but I did= n't > > > > > > > > > see any notification, or I would have tried it earlier. > > > > > > > > > Either way, thank you Frank for adding it. I'll try to t= est > > > when I have some time. > > > > > > > > > > > > > > > > > > > > > > > > > I don't have the proper version of Mesa setup yet, but for > > > > > > > > what it's worth, the firmware loads without error, and it > > > doesn't hang. > > > > > > > > > > > > > > Based on [1] and [2], > > > > > > > > > > > > > > kmscube should work on R-Car as it works on RZ/G2L with panfr= ost > > > > > > > as earlier version of RZ/G2L which uses drm based on RCar-Du, > > > > > > > later changed > > > > > > to rzg2l-du. > > > > > > > > > > > > IIRC, the mesa support isn't there yet for kmscube to start. > > > > > > > > > > What about glmark2? I tested glmark2 as well. > > > > > > > > It's not really a matter of kmscube itself, but the interaction with > > > > the compositor entirely. You can run a headless vulkan rendering, b= ut > > > > an application that renders to a window won't work. > > > > > > I have made a little progress. I have Ubuntu running on an RZ/G2M (R= ogue > > > GX6250) with a device tree configuring the GPU and the GPU loads with > > > firmware. > > > > > > powervr fd000000.gpu: [drm] loaded firmware > > > powervr/rogue_4.45.2.58_v1.fw > > > powervr fd000000.gpu: [drm] FW version v1.0 (build 6513336 OS) > > > [drm] Initialized powervr 1.0.0 20230904 for fd000000.gpu on minor 0 > > > > > > drmdevice lists card0 and renderD128 > > > --- Checking the number of DRM device available --- > > > --- Devices reported 2 --- > > > --- Retrieving devices information (PCI device revision is ignored) -= -- > > > device[0] > > > +-> available_nodes 0x05 > > > +-> nodes > > > | +-> nodes[0] /dev/dri/card0 > > > | +-> nodes[2] /dev/dri/renderD128 > > > +-> bustype 0002 > > > | +-> platform > > > | +-> fullname /soc/gpu@fd000000 > > > +-> deviceinfo > > > +-> platform > > > +-> compatible > > > renesas,r8a774a1-gpu > > > img,img-axe > > > > > > There is more to this dump, but it seems to repeat. I wanted to show = that > > > it seems like it's trying to work. > > > > > > I think I need to modify the powervr code in mesa to recognize the > > > renesas,r8a774a1-gpu and associate it with the rcar-du, but I am not = sure, > > > and I am hoping someone might be able to provide some guidance, since= I > > > think I am missing something somewhere. I modified pvr_device.c in the > > > mesa driver to attempt do this: > > > > > > /* This is the list of supported DRM render/display driver configs. */ > > > static const struct pvr_drm_device_config pvr_drm_configs[] =3D { > > > DEF_CONFIG("mediatek,mt8173-gpu", "mediatek-drm"), > > > DEF_CONFIG("ti,am62-gpu", "ti,am625-dss"), > > > DEF_CONFIG("renesas,r8a774a1-gpu", "rcar-du"), }; > > > > > > When I run modetest -M rcar-du, I can see the encoders and connectors= and > > > I can display test patterns, so the rcar-du is working. > > > > > > I built Mesa 24.0.1 with the following options: > > > > > > meson setup builddir -Dvulkan-drivers=3Dimagination-experimental > > > -Dimagination-srv=3Dtrue -Dtools=3Dall -Dgallium-drivers=3Dzink,kmsro= ,swrast > > > > > > I have tried to set PVR_I_WANT_A_BROKEN_VULKAN_DRIVER=3D1 the Mesa > > > documentation for the powerVR, and I have exported the variable for > > > VK_ICD_FILENAMES to point to the powervr json file. > > > > > > when I try to run glmark2-drm, I was expecting the GL reddered to be = the > > > powervr, but it keeps using the > > > GL_RENDERER: llvmpipe (LLVM 15.0.7, 128 bits) > > > > > > I realize this driver is still in its infancy, but I was hoping someo= ne > > > could give me some guidance to let me know if the work to do is on the > > > Mesa side or the rcar-du driver side, or something else. > > > > > > I rebuilt both libdrm and mesa. While I don't get any errors, I also > > > don't get the hardware acceleration I was hoping for. > > > > > > I even tried PVR_I_WANT_A_BROKEN_VULKAN_DRIVER=3D1 > > > MESA_LOADER_DRIVER_OVERRIDE=3Dzink MESA_DEBUG=3Dcontect glmark2-drm > > > > > > ...but it only renders with llvmpipe > > > > > > glmark2 2023.01 > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D > > > OpenGL Information > > > GL_VENDOR: Mesa > > > GL_RENDERER: llvmpipe (LLVM 15.0.7, 128 bits) > > > GL_VERSION: 4.5 (Compatibility Profile) Mesa 24.0.1 > > > Surface Config: buf=3D32 r=3D8 g=3D8 b=3D8 a=3D8 depth=3D32 stenc= il=3D0 samples=3D0 > > > Surface Size: 3840x2160 fullscreen > > > > > > > > > I am not as familiar with the Mesa side, but if I can get this workin= g to > > > a point where something is rendered, even if it's not 100% compliant,= I'd > > > like to push patches to the kernel and/or Mesa if necessary. > > > > FYI, the glmark2 I tested on RZ/G2L with panfrost is with wayland windo= w system [1]. > > > > Maybe there should be an panfrost equivalent package for powevr is avai= lable in mesa?? > > That is the only difference w.r.to panfrost. > > > > PACKAGECONFIG_append_pn-mesa =3D " egl kmsro panfrost" > > >=20 > I am not using Yocto, because I am using Ubuntu, but I have build Mesa > per the instructions they provided, but the glue that connects the > powervr to the rcar-du isn't as clear. I looked at the panfrost > implementation, but I didn't see anything obvious. It looks like the > panfrost integrates with the kms driver, which I was rather expecting > powervr would do. I can tell the mesa library is build built and > loaded but it's not attempting to use it for some reason I think the reason is what Matt was hinting at: the driver doesn't support OpenGL at the moment, and you're trying to use an OpenGL application. Maxime --n34ceiql5xopfxiw Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCZdOHggAKCRDj7w1vZxhR xfIaAP41zvmkOPFe3gc+9fStEHohe5m5PkqcyJbHnJBNYpZBFwEA1ZzPg6dJj6Gv Bbh4YQUUzMoS+3Yy2oLL9CRVF52LpgY= =QFmn -----END PGP SIGNATURE----- --n34ceiql5xopfxiw--