From: Thomas Zimmermann Subject: Re: [PATCH 00/15] Share TTM code among framebuffer drivers Date: Tue, 9 Apr 2019 09:50:40 +0200 Message-ID: References: <20190408092144.4548-1-tzimmermann@suse.de> <096a70a7-ed24-2161-29e9-1907221b8a64@suse.de> <20190409071249.ngzarvjlztx4jwbh@sirius.home.kraxel.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2071962679==" Return-path: Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8F2E789129 for ; Tue, 9 Apr 2019 07:50:46 +0000 (UTC) In-Reply-To: <20190409071249.ngzarvjlztx4jwbh@sirius.home.kraxel.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: "kraxel@redhat.com" Cc: "airlied@linux.ie" , "puck.chen@hisilicon.com" , "dri-devel@lists.freedesktop.org" , "virtualization@lists.linux-foundation.org" , "z.liuxinliang@hisilicon.com" , "hdegoede@redhat.com" , "kong.kongxinwei@hisilicon.com" , "Huang, Ray" , "zourongrong@gmail.com" , "Zhang, Jerry" , "Koenig, Christian" List-Id: dri-devel@lists.freedesktop.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --===============2071962679== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="cSCwbcO9kjZAPMxOxD33yGznupaDEyTbs" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --cSCwbcO9kjZAPMxOxD33yGznupaDEyTbs Content-Type: multipart/mixed; boundary="nEWOBoLCUomkYnoKViBSs0ffkUX8VdR5u"; protected-headers="v1" From: Thomas Zimmermann To: "kraxel@redhat.com" Cc: "Koenig, Christian" , "daniel@ffwll.ch" , "airlied@linux.ie" , "Huang, Ray" , "Zhang, Jerry" , "hdegoede@redhat.com" , "z.liuxinliang@hisilicon.com" , "zourongrong@gmail.com" , "kong.kongxinwei@hisilicon.com" , "puck.chen@hisilicon.com" , "dri-devel@lists.freedesktop.org" , "virtualization@lists.linux-foundation.org" Message-ID: Subject: Re: [PATCH 00/15] Share TTM code among framebuffer drivers References: <20190408092144.4548-1-tzimmermann@suse.de> <096a70a7-ed24-2161-29e9-1907221b8a64@suse.de> <20190409071249.ngzarvjlztx4jwbh@sirius.home.kraxel.org> In-Reply-To: <20190409071249.ngzarvjlztx4jwbh@sirius.home.kraxel.org> --nEWOBoLCUomkYnoKViBSs0ffkUX8VdR5u Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable Hi Am 09.04.19 um 09:12 schrieb kraxel@redhat.com: > Hi, >=20 >> If not for TTM, what would be the alternative? One VMA manager per >> memory region per device? >=20 > Depends pretty much on the device. >=20 > The cirrus is a display device with only 4 MB of vram. You can't fit > much in there. A single 1024x768 @ 24bpp framebuffer needs more 50% > of the video memory already. Which is why the cirrus driver (before th= e > rewrite) had to migrate buffers from/to vram on every page flip[1]. Wh= ich > is one[2] of the reasons why cirrus (after rewrite) doesn't ttm-manage = the > vram any more. gem objects are managed with the shmem helpers instead > and the active framebuffer is blitted to vram. >=20 > The qemu stdvga (bochs driver) has 16 MB vram by default and can be > configured to have up to 256 MB. Plenty of room even for multiple 4k > framebuffers if needed. So for the bochs driver all the ttm bo > migration logic is not needed, it could just store everything in vram. >=20 > A set of drm_gem_vram_* helpers would do the job for bochs. Thanks for clarifying. drm_gem_vram_* (and drm_vram_mm for Simple TTM) is probably a better name for the data structures. > I'd expect the same applies to the vbox driver. >=20 > Dunno about the other drm drivers and the fbdev drivers you plan to > migrate over. The AST HW can support up to 512 MiB, but 32-64 MiB seems more realistic for a server. It's similar with mgag200 HW. The old fbdev-supported device are all somewhere in the range between cirrus and bochs. Some drivers would probably benefit from the cirrus approach, some could use VRAM directly. Best regards Thomas >=20 > cheers, > Gerd >=20 > [1] Note: The page-flip migration logic is present in some of the other= > drivers too, not sure whenever they actually need that due to being= low > on vram too or whenever they just copied the old cirrus code ... >=20 > [2] The other reason is that this allow to convert formats at blit time= , > which helps to deal with some cirrus hardware limitations. >=20 --=20 Thomas Zimmermann Graphics Driver Developer SUSE Linux GmbH, Maxfeldstrasse 5, 90409 Nuernberg, Germany GF: Felix Imend=C3=B6rffer, Mary Higgins, Sri Rasiah HRB 21284 (AG N=C3=BCrnberg) --nEWOBoLCUomkYnoKViBSs0ffkUX8VdR5u-- --cSCwbcO9kjZAPMxOxD33yGznupaDEyTbs Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEchf7rIzpz2NEoWjlaA3BHVMLeiMFAlysTtAACgkQaA3BHVML eiNVCQf8DaOP0DxDGg74qC3MuVn5zTcqWjYM4/THnkpBmQpLonifVVyVZrQNxuwA aD7jzxDxvSy4GJmgyYjDw4gCF3UNp9VRRaeDjiPqMh4RdaZszqqsiZZEio/Ok+pI TPar/+B/V1xoYdx3emmcG+mizR1C+CVBpQ84Pke8hSVkthd60ntk7aoXz+swALAv DWby+4pWn4xfSkfxQvZI2cFodoVTCxDAAr5C7UNMOru0uXBpIdBYIGesophkAIC7 EK4jN9rsLmjy9oDeawodoLn/hb1jJOQI8cLHdfZhckmkoWClcfjIqF53CwAR5iLK QaSliZurKojPpotEHURDYDKFRxabDg== =D9zh -----END PGP SIGNATURE----- --cSCwbcO9kjZAPMxOxD33yGznupaDEyTbs-- --===============2071962679== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVs --===============2071962679==--