Skip to content

Commit d712f4c

Browse files
mthierrydanvet
authored andcommitted
drm/i915: allocate cmd ring in lmem
Prefer allocating the cmd ring from LMEM on dgfx. Signed-off-by: Michel Thierry <[email protected]> Signed-off-by: Matthew Auld <[email protected]> Reviewed-by: Chris Wilson <[email protected]> Signed-off-by: Chris Wilson <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Daniel Vetter <[email protected]>
1 parent 772d5bd commit d712f4c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

drivers/gpu/drm/i915/gt/intel_ring.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* Copyright © 2019 Intel Corporation
44
*/
55

6+
#include "gem/i915_gem_lmem.h"
67
#include "gem/i915_gem_object.h"
78

89
#include "i915_drv.h"
@@ -108,8 +109,8 @@ static struct i915_vma *create_ring_vma(struct i915_ggtt *ggtt, int size)
108109
struct drm_i915_gem_object *obj;
109110
struct i915_vma *vma;
110111

111-
obj = ERR_PTR(-ENODEV);
112-
if (i915_ggtt_has_aperture(ggtt))
112+
obj = i915_gem_object_create_lmem(i915, size, I915_BO_ALLOC_VOLATILE);
113+
if (IS_ERR(obj) && i915_ggtt_has_aperture(ggtt))
113114
obj = i915_gem_object_create_stolen(i915, size);
114115
if (IS_ERR(obj))
115116
obj = i915_gem_object_create_internal(i915, size);

0 commit comments

Comments
 (0)