Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
65f456ff55 | |||
e8423b5109 |
@ -0,0 +1,28 @@
|
|||||||
|
From 460d2c46a903fed295a1528c8b6273dd6b0e0d19 Mon Sep 17 00:00:00 2001
|
||||||
|
From: thfrwn <11335318+rfht@users.noreply.github.com>
|
||||||
|
Date: Fri, 9 Feb 2024 17:00:55 -0500
|
||||||
|
Subject: [PATCH] mesa: fix off-by-one for newblock allocation in dlist_alloc
|
||||||
|
|
||||||
|
Cc: mesa-stable
|
||||||
|
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
|
||||||
|
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27556>
|
||||||
|
---
|
||||||
|
src/mesa/main/dlist.c | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c
|
||||||
|
index b0184a24e20..9213641699a 100644
|
||||||
|
--- a/src/mesa/main/dlist.c
|
||||||
|
+++ b/src/mesa/main/dlist.c
|
||||||
|
@@ -1220,7 +1220,7 @@ dlist_alloc(struct gl_context *ctx, OpCode opcode, GLuint bytes, bool align8)
|
||||||
|
ctx->ListState.CurrentPos++;
|
||||||
|
}
|
||||||
|
|
||||||
|
- if (ctx->ListState.CurrentPos + numNodes + contNodes > BLOCK_SIZE) {
|
||||||
|
+ if (ctx->ListState.CurrentPos + numNodes + contNodes >= BLOCK_SIZE) {
|
||||||
|
/* This block is full. Allocate a new block and chain to it */
|
||||||
|
Node *newblock;
|
||||||
|
Node *n = ctx->ListState.CurrentBlock + ctx->ListState.CurrentPos;
|
||||||
|
--
|
||||||
|
2.45.2
|
||||||
|
|
@ -0,0 +1,37 @@
|
|||||||
|
From f7434d7576032cf97e3c74ef09912f59617a4bad Mon Sep 17 00:00:00 2001
|
||||||
|
From: Dave Airlie <airlied@redhat.com>
|
||||||
|
Date: Fri, 14 Jun 2024 12:22:58 +1000
|
||||||
|
Subject: [PATCH] nouveau/nvc0: increase overallocation on shader bo to 2K
|
||||||
|
|
||||||
|
I've been seeing a bunch of read page faults at the end of the
|
||||||
|
shader allocation, nvk uses a full page at the end to overallocate
|
||||||
|
so align with that and see if it goes away.
|
||||||
|
|
||||||
|
ahulliet and skeggsb both said 2k was used.
|
||||||
|
|
||||||
|
Cc: mesa-stable
|
||||||
|
Reviewed-by: Arthur Huillet <ahuillet@nvidia.com>
|
||||||
|
Reviewed-by: Karol Herbst <kherbst@redhat.com>
|
||||||
|
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29722>
|
||||||
|
---
|
||||||
|
src/gallium/drivers/nouveau/nvc0/nvc0_screen.c | 7 ++++---
|
||||||
|
1 file changed, 4 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff -up mesa-23.1.4/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c.dma mesa-23.1.4/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
|
||||||
|
--- mesa-23.1.4/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c.dma 2023-07-21 22:42:42.000000000 +1000
|
||||||
|
+++ mesa-23.1.4/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c 2024-08-16 12:49:13.532998512 +1000
|
||||||
|
@@ -886,10 +886,11 @@ nvc0_screen_resize_text_area(struct nvc0
|
||||||
|
nouveau_heap_free(&screen->lib_code);
|
||||||
|
nouveau_heap_destroy(&screen->text_heap);
|
||||||
|
|
||||||
|
- /* XXX: getting a page fault at the end of the code buffer every few
|
||||||
|
- * launches, don't use the last 256 bytes to work around them - prefetch ?
|
||||||
|
+ /*
|
||||||
|
+ * Shader storage needs a 2K (from NVIDIA) overallocations at the end
|
||||||
|
+ * to avoid prefetch bugs.
|
||||||
|
*/
|
||||||
|
- nouveau_heap_init(&screen->text_heap, 0, size - 0x100);
|
||||||
|
+ nouveau_heap_init(&screen->text_heap, 0, size - 0x800);
|
||||||
|
|
||||||
|
/* update the code segment setup */
|
||||||
|
if (screen->eng3d->oclass < GV100_3D_CLASS) {
|
30
SOURCES/nouveau-work-around-linear-zs-issue.patch
Normal file
30
SOURCES/nouveau-work-around-linear-zs-issue.patch
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
diff -up mesa-23.1.4/src/gallium/drivers/nouveau/nvc0/nvc0_state_validate.c.da mesa-23.1.4/src/gallium/drivers/nouveau/nvc0/nvc0_state_validate.c
|
||||||
|
--- mesa-23.1.4/src/gallium/drivers/nouveau/nvc0/nvc0_state_validate.c.da 2025-01-10 13:14:31.119630821 +1000
|
||||||
|
+++ mesa-23.1.4/src/gallium/drivers/nouveau/nvc0/nvc0_state_validate.c 2025-01-10 13:15:11.917433170 +1000
|
||||||
|
@@ -149,6 +149,7 @@ nvc0_validate_fb(struct nvc0_context *nv
|
||||||
|
unsigned ms_mode = NVC0_3D_MULTISAMPLE_MODE_MS1;
|
||||||
|
unsigned nr_cbufs = fb->nr_cbufs;
|
||||||
|
bool serialize = false;
|
||||||
|
+ bool cbuf_is_linear = false;
|
||||||
|
|
||||||
|
nouveau_bufctx_reset(nvc0->bufctx_3d, NVC0_BIND_3D_FB);
|
||||||
|
|
||||||
|
@@ -203,8 +204,7 @@ nvc0_validate_fb(struct nvc0_context *nv
|
||||||
|
PUSH_DATA(push, 0);
|
||||||
|
|
||||||
|
nvc0_resource_fence(nvc0, res, NOUVEAU_BO_WR);
|
||||||
|
-
|
||||||
|
- assert(!fb->zsbuf);
|
||||||
|
+ cbuf_is_linear = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (res->status & NOUVEAU_BUFFER_STATUS_GPU_READING)
|
||||||
|
@@ -216,7 +216,7 @@ nvc0_validate_fb(struct nvc0_context *nv
|
||||||
|
BCTX_REFN(nvc0->bufctx_3d, 3D_FB, res, WR);
|
||||||
|
}
|
||||||
|
|
||||||
|
- if (fb->zsbuf) {
|
||||||
|
+ if (fb->zsbuf && !cbuf_is_linear) {
|
||||||
|
struct nv50_miptree *mt = nv50_miptree(fb->zsbuf->texture);
|
||||||
|
struct nv50_surface *sf = nv50_surface(fb->zsbuf);
|
||||||
|
int unk = mt->base.base.target == PIPE_TEXTURE_2D;
|
@ -38,7 +38,7 @@
|
|||||||
Name: mesa
|
Name: mesa
|
||||||
Summary: Mesa graphics libraries
|
Summary: Mesa graphics libraries
|
||||||
Version: 23.1.4
|
Version: 23.1.4
|
||||||
Release: 2%{?rctag:.%{rctag}}%{?dist}
|
Release: 4%{?rctag:.%{rctag}}%{?dist}
|
||||||
|
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: http://www.mesa3d.org
|
URL: http://www.mesa3d.org
|
||||||
@ -66,6 +66,13 @@ Patch12: radeonsi-turn-off-glthread.patch
|
|||||||
Patch13: 0001-llvmpipe-only-include-old-Transform-includes-when-ne.patch
|
Patch13: 0001-llvmpipe-only-include-old-Transform-includes-when-ne.patch
|
||||||
Patch14: 0001-clover-llvm-move-to-modern-pass-manager.patch
|
Patch14: 0001-clover-llvm-move-to-modern-pass-manager.patch
|
||||||
|
|
||||||
|
# https://issues.redhat.com/browse/RHEL-40566
|
||||||
|
Patch15: 0001-mesa-fix-off-by-one-for-newblock-allocation-in-dlist.patch
|
||||||
|
|
||||||
|
# two nouveau fixes to avoid kernel crashes with multiple cards
|
||||||
|
Patch20: 0001-nouveau-nvc0-increase-overallocation-on-shader-bo-to.patch
|
||||||
|
Patch21: nouveau-work-around-linear-zs-issue.patch
|
||||||
|
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
|
|
||||||
@ -89,7 +96,7 @@ BuildRequires: elfutils
|
|||||||
BuildRequires: python3-devel
|
BuildRequires: python3-devel
|
||||||
BuildRequires: gettext
|
BuildRequires: gettext
|
||||||
BuildRequires: glslang
|
BuildRequires: glslang
|
||||||
BuildRequires: %{llvm_pkg_prefix}llvm-devel >= 3.4-7
|
BuildRequires: %{llvm_pkg_prefix}llvm-compat-devel >= 3.4-7
|
||||||
%if 0%{?with_opencl}
|
%if 0%{?with_opencl}
|
||||||
BuildRequires: %{llvm_pkg_prefix}clang-devel >= 3.0
|
BuildRequires: %{llvm_pkg_prefix}clang-devel >= 3.0
|
||||||
%endif
|
%endif
|
||||||
@ -343,6 +350,7 @@ cd -
|
|||||||
export ASFLAGS="--generate-missing-build-notes=yes"
|
export ASFLAGS="--generate-missing-build-notes=yes"
|
||||||
%global __meson %{buildroot}/usr/bin/meson
|
%global __meson %{buildroot}/usr/bin/meson
|
||||||
export PYTHONPATH=/usr/lib/python3.6/site-packages/:%{buildroot}/usr/lib/python3.6/site-packages/
|
export PYTHONPATH=/usr/lib/python3.6/site-packages/:%{buildroot}/usr/lib/python3.6/site-packages/
|
||||||
|
export PATH=%{_libdir}/llvm17/bin:$PATH
|
||||||
%meson -Dcpp_std=gnu++17 \
|
%meson -Dcpp_std=gnu++17 \
|
||||||
-Db_ndebug=true \
|
-Db_ndebug=true \
|
||||||
-Dplatforms=x11,wayland \
|
-Dplatforms=x11,wayland \
|
||||||
@ -587,6 +595,13 @@ done
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Mar 17 2025 Dave Airlie <airlied@redhat.com> - 23.1.4-4
|
||||||
|
- Fix two nouveau bugs for customer (RHEL-54452)
|
||||||
|
|
||||||
|
* Thu Jun 20 2024 José Expósito <jexposit@redhat.com> - 23.1.4-3
|
||||||
|
- Fix off-by-one error for newblock allocation in dlist_alloc
|
||||||
|
Resolves: https://issues.redhat.com/browse/RHEL-40566
|
||||||
|
|
||||||
* Thu Nov 23 2023 José Expósito <jexposit@redhat.com> - 23.1.4-2
|
* Thu Nov 23 2023 José Expósito <jexposit@redhat.com> - 23.1.4-2
|
||||||
- Rebuild against LLVM 17
|
- Rebuild against LLVM 17
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user