drm/amdgpu: update the domain flags for dumb buffer creation
Subsystems (2)
PATCH 1/1 drm/amdgpu: update the domain flags for dumb buffer creation
After switching to generic framebuffer framework, we rely on the ->dumb_create routine for frame buffer creation. However, the different domain flags used are not optimal. Add the contiguous flag to directly allocate the scanout BO as one linear buffer.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c +2 -1
@@ -883,7 +883,8 @@ int amdgpu_mode_dumb_create(struct drm_file *file_priv,struct drm_gem_object *gobj;uint32_t handle;u64 flags =AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED | -AMDGPU_GEM_CREATE_CPU_GTT_USWC ; +AMDGPU_GEM_CREATE_CPU_GTT_USWC | +AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS ;u32 domain;int r;
Signature · 1 line
2.29.0
[Public]
Regards,
Guchun
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Evan Quan
Sent: Thursday, November 18, 2021 4:27 PM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>; Quan, Evan <[email protected]>; Koenig, Christian <[email protected]>
Subject: [PATCH] drm/amdgpu: update the domain flags for dumb buffer creation
After switching to generic framebuffer framework, we rely on the
->dumb_create routine for frame buffer creation. However, the
different domain flags used are not optimal. Add the contiguous flag to directly allocate the scanout BO as one linear buffer.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c +2 -1
@@ -883,7 +883,8 @@ int amdgpu_mode_dumb_create(struct drm_file *file_priv,struct drm_gem_object *gobj;uint32_t handle;u64 flags =AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED | -AMDGPU_GEM_CREATE_CPU_GTT_USWC ; +AMDGPU_GEM_CREATE_CPU_GTT_USWC | +AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS ;u32 domain;int r;
--
2.29.0