pvr/drm-shim: avoid trying a random bvnc by default

If `PVR_SHIM_DEVICE_BVNC` is not set, we would try the bvnc
corresponding to whatever was in uninitialised memory, which would
likely fail, and then fallback to `DEFAULT_DEVICE_BVNC`.

Instead, initialize to `DEFAULT_DEVICE_BVNC` so that "unset bvnc" and
"invalid bvnc" behave the same.

Fixes: ba104d3e92 ("pvr: add support for drm-shim")
Reviewed-by: Simon Perretta <simon.perretta@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39766>
This commit is contained in:
Eric Engestrom 2026-02-08 19:06:52 +01:00 committed by Marge Bot
parent 268e19378f
commit a9bf70486d

View file

@ -488,7 +488,7 @@ static void init_overrides(void)
const char *device_bvnc = debug_get_option("PVR_SHIM_DEVICE_BVNC", NULL);
static const char *delims = ",;";
unsigned b, v, n, c;
uint64_t bvnc;
uint64_t bvnc = DEFAULT_DEVICE_BVNC;
int ret;
if (device_bvnc) {