On 2024-02-15 18:44, Matthew Auld wrote:
Seems like we can potentially hit underruns if the CFB offset is within
the first page of stolen. Just like i915 skip the first page.

BSpec: 50214
Reported-by: Matt Roper <[email protected]>
Signed-off-by: Matthew Auld <[email protected]>
---
  drivers/gpu/drm/xe/compat-i915-headers/i915_gem_stolen.h | 3 +++
  1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/xe/compat-i915-headers/i915_gem_stolen.h 
b/drivers/gpu/drm/xe/compat-i915-headers/i915_gem_stolen.h
index bd233007c1b7..003474cfdf31 100644
--- a/drivers/gpu/drm/xe/compat-i915-headers/i915_gem_stolen.h
+++ b/drivers/gpu/drm/xe/compat-i915-headers/i915_gem_stolen.h
@@ -19,6 +19,9 @@ static inline int i915_gem_stolen_insert_node_in_range(struct 
xe_device *xe,
        int err;
        u32 flags = XE_BO_CREATE_PINNED_BIT | XE_BO_CREATE_STOLEN_BIT;
+ if (start < SZ_4K)
+               start = SZ_4K;
+
        if (align)
                size = ALIGN(size, align);
Should start also be aligned?

If that's taken care of by other code, for both patches:
Reviewed-by: Maarten Lankhorst <[email protected]>

Reply via email to