mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 08:04:30 +00:00
modesetting: map gbm bo's read/write
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
This commit is contained in:
committed by
Enrico Weigelt
parent
f4362fc4ec
commit
50ffe711ca
@@ -1087,10 +1087,13 @@ drmmode_bo_map(drmmode_ptr drmmode, drmmode_bo *bo)
|
||||
|
||||
#ifdef GLAMOR_HAS_GBM
|
||||
if (bo->gbm) {
|
||||
/* We shouldn't read from gpu memory */
|
||||
/**
|
||||
* We shouldn't read from gpu memory, as it's really slow.
|
||||
* We do allow it though, so nothing breaks.
|
||||
*/
|
||||
uint32_t stride = 0;
|
||||
void* map_addr = NULL;
|
||||
void* map_data = gbm_bo_map(bo->gbm, 0, 0, bo->width, bo->height, GBM_BO_TRANSFER_WRITE, &stride, &map_addr);
|
||||
void* map_data = gbm_bo_map(bo->gbm, 0, 0, bo->width, bo->height, GBM_BO_TRANSFER_READ_WRITE, &stride, &map_addr);
|
||||
if (map_data) {
|
||||
bo->map_data = map_data;
|
||||
bo->map_addr = map_addr;
|
||||
|
||||
Reference in New Issue
Block a user