mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 13:48:06 +02:00
loader/nouveau: load zink as the GL driver for turing and above.
If the kernel supports modifiers and the GPU is a Turing+ then force using zink instead of nvc0. Signed-off-by: Faith Ekstrand <faith.ekstrand@collabora.com> Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com> Acked-by: Karol Herbst <kherbst@redhat.com> Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Reviewed-by: Mel Henning <mhenning@darkrefraction.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29232>
This commit is contained in:
parent
d1a2ba57f9
commit
2983ca0d20
1 changed files with 11 additions and 6 deletions
|
|
@ -146,12 +146,17 @@ nouveau_zink_predicate(int fd, const char *driver)
|
|||
|
||||
bool prefer_zink = false;
|
||||
|
||||
/* enable this once zink is up to speed.
|
||||
* struct drm_nouveau_getparam r = { .param = NOUVEAU_GETPARAM_CHIPSET_ID };
|
||||
* int ret = drmCommandWriteRead(fd, DRM_NOUVEAU_GETPARAM, &r, sizeof(r));
|
||||
* if (ret == 0 && (r.value & ~0xf) >= 0x160)
|
||||
* prefer_zink = true;
|
||||
*/
|
||||
/* enable this once zink is up to speed. */
|
||||
struct drm_nouveau_getparam r = { .param = NOUVEAU_GETPARAM_HAS_VMA_TILEMODE };
|
||||
int ret = drmCommandWriteRead(fd, DRM_NOUVEAU_GETPARAM, &r, sizeof(r));
|
||||
if (ret == 0 && r.value == 1) {
|
||||
r.param = NOUVEAU_GETPARAM_CHIPSET_ID;
|
||||
r.value = 0;
|
||||
ret = drmCommandWriteRead(fd, DRM_NOUVEAU_GETPARAM, &r, sizeof(r));
|
||||
if (ret == 0 && r.value >= 0x160) {
|
||||
prefer_zink = true;
|
||||
}
|
||||
}
|
||||
|
||||
prefer_zink = debug_get_bool_option("NOUVEAU_USE_ZINK", prefer_zink);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue