Re: [PATCH 5/5] drm/simpledrm: Synchronize access to GEM BOs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi

Am 23.09.22 um 10:06 schrieb Javier Martinez Canillas:
On 9/22/22 15:09, Thomas Zimmermann wrote:
Synchronize CPU access to GEM BOs with other drivers when updating the
screen buffer. Imported buffers might otherwise contain stale data.


Can you please elaborate what the problem is? The framebuffers memory is
setup by the firmware and would never come from an imported dma-buf, so
could the GEM BOs even be shared with other drivers?

Or is this done just for the sake of correctness ?

This isn't about the scanout buffer that we get from the firmware. This is about synchronizing access to the GEM BO memory buffers. Our BOs' memory buffer are allocated from SHMEM or could be imported via dma-buf. In the latter case, another driver or hardware might modify their content concurrently. We need to synchronize before reading the memory from our CPU. The pattern is

  1) sync BO memory content via begin_cpu_access()
  2) blit from BO mem to scanout buffer
  3) release BO memory via end_cpu_access()

Best regards
Thomas

Signed-off-by: Thomas Zimmermann <tzimmermann@xxxxxxx>
---

The change looks good to me though if is for the latter.

Reviewed-by: Javier Martinez Canillas <javierm@xxxxxxxxxx>


--
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

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux