[PATCH 1/9] drm/simpledrm: Use fbdev defaults for shadow buffering

Thomas Zimmermann tzimmermann at suse.de
Tue Mar 8 09:56:02 UTC 2022


Hi

Am 08.03.22 um 10:31 schrieb Javier Martinez Canillas:
> On 3/3/22 21:58, Thomas Zimmermann wrote:
>> Don't select shadow buffering for the fbdev console explicitly. The
>> fbdev emulation's heuristic will enable it for any framebuffer with
>> .dirty callback.
>>
> 
> Indeed it does. Not related to your series but looking at this
> patch I noticed that drivers/gpu/drm/tiny/bochs.c will be the
> only driver that sets .prefer_shadow_fbdev after this lands.
> 
> The driver is using GEM so I wonder if after your series this
> DRM driver could have a .dirty callback and the field just be
> dropped? Or there would still be a case where it is needed ?
Bochs uses VRAM helpers (i.e., TTM). Fbdev and userspace would directly 
write into that buffer memory without a copy. So the dirty function 
would be empty.

Other drivers with VRAM helpers (e.g., hibmc, ast) operate on uncached 
I/O memory AFAICT. So they set .prefer_shadow, which also affects 
userspace. Bochs uses cached memory and shouldn't need prefer_shadow. 
Setting prefer_shadow_fbdev is only there for making the fbdev buffer 
object evictable from video memory.

As it stands, using prefer_shadow_fbdev is the cleanest solution, even 
if bochs is the only user of that field.

Alternatively, we could make it a requirement that qemu provides enough 
video memory for bochs to unconditionally pin the fbdev BO there without 
ever evicting. I guess, that would mean 32 MiB of VRAM at least.

Best regards
Thomas

> 
> Anyway, just wanted to mention in case I forget later.
> 
> Your patch looks good to me and I think it could be pushed
> without waiting for the other patches in the series.
> 
> Reviewed-by: Javier Martinez Canillas <javierm at redhat.com>
> 

-- 
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Ivo Totev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20220308/6fe7d550/attachment.sig>


More information about the dri-devel mailing list