From 706cefe875fb31da08d81e4e93b0add4066840cd Mon Sep 17 00:00:00 2001 From: Vincent Cheah Beng Keat Date: Tue, 23 Jul 2024 22:39:17 +0800 Subject: [PATCH] Set Scanout by default Signed-off-by: Cheah, Vincent Beng Keat --- media_softlet/linux/common/os/xe/mos_bufmgr_xe.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/media_softlet/linux/common/os/xe/mos_bufmgr_xe.c b/media_softlet/linux/common/os/xe/mos_bufmgr_xe.c index 71e1188390f..ebc08857a35 100644 --- a/media_softlet/linux/common/os/xe/mos_bufmgr_xe.c +++ b/media_softlet/linux/common/os/xe/mos_bufmgr_xe.c @@ -1295,6 +1295,9 @@ mos_bo_alloc_xe(struct mos_bufmgr *bufmgr, */ create.cpu_caching = alloc->ext.cpu_cacheable ? DRM_XE_GEM_CPU_CACHING_WB : DRM_XE_GEM_CPU_CACHING_WC; + if (strcmp(alloc->name, "MEDIA") == 0 || strcmp(alloc->name, "Media") == 0) + create.flags |= DRM_XE_GEM_CREATE_FLAG_SCANOUT; + ret = drmIoctl(bufmgr_gem->fd, DRM_IOCTL_XE_GEM_CREATE, &create);