Skip to content

Commit

Permalink
Set Scanout by default
Browse files Browse the repository at this point in the history
recommend to flag all potential scanout surface as SCNAOUT. This is
required to fix DMA DRM render on XE.

Signed-off-by: Cheah, Vincent Beng Keat <[email protected]>
  • Loading branch information
vcheah committed Sep 4, 2024
1 parent ac5f0ff commit 9e2b37c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions media_softlet/linux/common/os/xe/mos_bufmgr_xe.c
Original file line number Diff line number Diff line change
Expand Up @@ -1295,6 +1295,10 @@ 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.cpu_caching == DRM_XE_GEM_CPU_CACHING_WC)
create.flags |= DRM_XE_GEM_CREATE_FLAG_SCANOUT;

ret = drmIoctl(bufmgr_gem->fd,
DRM_IOCTL_XE_GEM_CREATE,
&create);
Expand Down

0 comments on commit 9e2b37c

Please sign in to comment.