mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 17:58:26 +02:00
iris: Pin pixel hashing table BO from iris_batch submission instead of from iris_state.
This fixes sporadic rendering corruption reported on MTL with ChromeOS
in cases where multiple processes including Chrome were utilizing the
GPU concurrently, and one of the processes happened to submit a
BLORP-only batch buffer right after a switch from a different context.
In such a scenario we would fail to add the BO that holds the pixel
hashing tables to the execbuf IOCTL for the BLORP batch, because it
was being pinned from iris_restore_render_saved_bos() which isn't
called for BLORP operations, potentially causing it to use garbage as
pixel pipe hashing tables, which led to corruption of the BLORP
rendering.
Technically this could have affected DG2 as well, but it has only been
reported on MTL so far.
Cc: mesa-stable
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Tested-by: Sushma Venkatesh Reddy <sushma.venkatesh.reddy@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30274>
(cherry picked from commit 49b433d5e7)
This commit is contained in:
parent
9649e80818
commit
a3aed210bd
3 changed files with 15 additions and 8 deletions
|
|
@ -604,7 +604,7 @@
|
|||
"description": "iris: Pin pixel hashing table BO from iris_batch submission instead of from iris_state.",
|
||||
"nominated": true,
|
||||
"nomination_type": 0,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -626,6 +626,19 @@ add_aux_map_bos_to_batch(struct iris_batch *batch)
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
add_pixel_hash_table_bo_to_batch(struct iris_batch *batch)
|
||||
{
|
||||
|
||||
if (batch->ice->state.pixel_hashing_tables &&
|
||||
batch->name == IRIS_BATCH_RENDER) {
|
||||
struct iris_bo *bo = iris_resource_bo(
|
||||
batch->ice->state.pixel_hashing_tables);
|
||||
ensure_exec_obj_space(batch, 1);
|
||||
add_bo_to_batch(batch, bo, false);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
finish_seqno(struct iris_batch *batch)
|
||||
{
|
||||
|
|
@ -658,6 +671,7 @@ iris_finish_batch(struct iris_batch *batch)
|
|||
}
|
||||
|
||||
add_aux_map_bos_to_batch(batch);
|
||||
add_pixel_hash_table_bo_to_batch(batch);
|
||||
|
||||
finish_seqno(batch);
|
||||
|
||||
|
|
|
|||
|
|
@ -5936,13 +5936,6 @@ iris_restore_render_saved_bos(struct iris_context *ice,
|
|||
IRIS_DOMAIN_VF_READ);
|
||||
}
|
||||
}
|
||||
|
||||
#if GFX_VERx10 == 125
|
||||
iris_use_pinned_bo(batch, iris_resource_bo(ice->state.pixel_hashing_tables),
|
||||
false, IRIS_DOMAIN_NONE);
|
||||
#else
|
||||
assert(!ice->state.pixel_hashing_tables);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue