[Mesa-dev] [PATCH] gbm: Add gbm_bo_write entry point

Jakob Bornecrantz jakob at vmware.com
Thu May 3 10:14:17 PDT 2012


----- Ursprungligt meddelande -----
> This new gbm entry point allows writing data into a gbm bo.  The bo
> has to be created with the GBM_BO_USE_WRITE flag, and it's only
> required to work for GBM_BO_USE_CURSOR_64X64 bos.
> 
> The gbm API is designed to be the glue layer between EGL and KMS, but
> there was never a mechanism initialize a buffer suitable for use with
> KMS hw cursors.  The hw cursor bo is typically not compatible with
> anything EGL can render to, and thus there's no way to get data into
> such a bo.
> 
> gbm_bo_write() fills that gap while staying out of the efficient
> cpu->gpu pixel transfer business.

Actually I was thinking of libkms when reviewing this patch.

Sorry but I'm going to strongly NAK this patch, if you had done the
gallium part of this you would have known why.

The reason is that there is no way to upload data to a buffer in
Gallium without a context and there is a big chance that the
context will try to get into the efficient cpu->gpu business
whether you like it or not.

This all means that the gbm_device is a rendering context and
if we ever want to do something better of synchronizing between
context then the FIFO approach we have now we all of a sudden
need to add fences to gbm. And I'm strongly opposed to this.

Can we work out something else for this?

Cheers, Jakob.


More information about the mesa-dev mailing list