nvk: wire up M2MF for Fermi

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
This commit is contained in:
Karol Herbst 2022-09-11 00:38:34 +02:00 committed by Marge Bot
parent 970bd70584
commit ae14362ff6
3 changed files with 15 additions and 0 deletions

View file

@ -1,5 +1,6 @@
nvk_classes = [
'cl902d',
'cl9039',
'cl906f',
'cl9097',
'cl90b5',

View file

@ -58,6 +58,8 @@ void vk_push_print(FILE *fp, const struct nv_push *push,
#define SUBC_NVC0C0 1
#define SUBC_NVC3C0 1
#define SUBC_NV9039 2
#define SUBC_NV902D 3
#define SUBC_NV90B5 4

View file

@ -16,6 +16,7 @@
#include "nouveau_context.h"
#include "nvk_cl902d.h"
#include "nvk_cl9039.h"
#include "nvk_cl90c0.h"
#include "nvk_clb0c0.h"
@ -43,6 +44,17 @@ nvk_queue_init_context_draw_state(struct nvk_queue *queue)
nv_push_init(&push, push_data, ARRAY_SIZE(push_data));
struct nv_push *p = &push;
/* M2MF state */
if (dev->ctx->m2mf.cls <= FERMI_MEMORY_TO_MEMORY_FORMAT_A) {
/* we absolutely do not support Fermi, but if somebody wants to toy
/* around with it, this is a must */
P_MTHD(p, NV9039, SET_OBJECT);
P_NV9039_SET_OBJECT(p, {
.class_id = dev->ctx->m2mf.cls,
.engine_id = 0,
});
}
/* 2D state */
P_MTHD(p, NV902D, SET_OBJECT);
P_NV902D_SET_OBJECT(p, {