nouveau: disable fences when running under drm-shim.
Otherwise, you get a hang at the end of shader-db. Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Karol Herbst <kherbst@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16150>
This commit is contained in:
parent
c6aa639ba9
commit
e4ca97111f
|
@ -131,6 +131,12 @@ nouveau_fence_update(struct nouveau_screen *screen, bool flushed)
|
||||||
struct nouveau_fence *next = NULL;
|
struct nouveau_fence *next = NULL;
|
||||||
u32 sequence = screen->fence.update(&screen->base);
|
u32 sequence = screen->fence.update(&screen->base);
|
||||||
|
|
||||||
|
/* If running under drm-shim, let all fences be signalled so things run to
|
||||||
|
* completion (avoids a hang at the end of shader-db).
|
||||||
|
*/
|
||||||
|
if (unlikely(screen->disable_fences))
|
||||||
|
sequence = screen->fence.sequence;
|
||||||
|
|
||||||
if (screen->fence.sequence_ack == sequence)
|
if (screen->fence.sequence_ack == sequence)
|
||||||
return;
|
return;
|
||||||
screen->fence.sequence_ack = sequence;
|
screen->fence.sequence_ack = sequence;
|
||||||
|
|
|
@ -208,6 +208,8 @@ nouveau_screen_init(struct nouveau_screen *screen, struct nouveau_device *dev)
|
||||||
if (screen->force_enable_cl)
|
if (screen->force_enable_cl)
|
||||||
glsl_type_singleton_init_or_ref();
|
glsl_type_singleton_init_or_ref();
|
||||||
|
|
||||||
|
screen->disable_fences = debug_get_bool_option("NOUVEAU_DISABLE_FENCES", false);
|
||||||
|
|
||||||
/* These must be set before any failure is possible, as the cleanup
|
/* These must be set before any failure is possible, as the cleanup
|
||||||
* paths assume they're responsible for deleting them.
|
* paths assume they're responsible for deleting them.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -74,6 +74,7 @@ struct nouveau_screen {
|
||||||
bool prefer_nir;
|
bool prefer_nir;
|
||||||
bool force_enable_cl;
|
bool force_enable_cl;
|
||||||
bool has_svm;
|
bool has_svm;
|
||||||
|
bool disable_fences;
|
||||||
void *svm_cutout;
|
void *svm_cutout;
|
||||||
size_t svm_cutout_size;
|
size_t svm_cutout_size;
|
||||||
|
|
||||||
|
|
|
@ -218,6 +218,9 @@ drm_shim_driver_init(void)
|
||||||
|
|
||||||
nouveau_driver_get_device_info();
|
nouveau_driver_get_device_info();
|
||||||
|
|
||||||
|
/* Ask userspace to consider all fences completed. */
|
||||||
|
setenv("NOUVEAU_DISABLE_FENCES", "true", true);
|
||||||
|
|
||||||
/* nothing looks at the pci id, so fix it to a GTX 780 */
|
/* nothing looks at the pci id, so fix it to a GTX 780 */
|
||||||
static const char uevent_content[] =
|
static const char uevent_content[] =
|
||||||
"DRIVER=nouveau\n"
|
"DRIVER=nouveau\n"
|
||||||
|
|
Loading…
Reference in New Issue