From 1543e317f1da31b75942316931e8f491a8920811 Mon Sep 17 00:00:00 2001
From: hc <hc@nodka.com>
Date: Thu, 04 Jan 2024 10:08:02 +0000
Subject: [PATCH] disable FB
---
kernel/drivers/gpu/drm/nouveau/dispnv50/dac907d.c | 20 +++++++++++++-------
1 files changed, 13 insertions(+), 7 deletions(-)
diff --git a/kernel/drivers/gpu/drm/nouveau/dispnv50/dac907d.c b/kernel/drivers/gpu/drm/nouveau/dispnv50/dac907d.c
index 11e87fa..95efa62 100644
--- a/kernel/drivers/gpu/drm/nouveau/dispnv50/dac907d.c
+++ b/kernel/drivers/gpu/drm/nouveau/dispnv50/dac907d.c
@@ -21,16 +21,22 @@
*/
#include "core.h"
-static void
+#include <nvif/push507c.h>
+
+#include <nvhw/class/cl907d.h>
+
+static int
dac907d_ctrl(struct nv50_core *core, int or, u32 ctrl,
struct nv50_head_atom *asyh)
{
- u32 *push;
- if ((push = evo_wait(&core->chan, 2))) {
- evo_mthd(push, 0x0180 + (or * 0x020), 1);
- evo_data(push, ctrl);
- evo_kick(push, &core->chan);
- }
+ struct nvif_push *push = core->chan.push;
+ int ret;
+
+ if ((ret = PUSH_WAIT(push, 2)))
+ return ret;
+
+ PUSH_MTHD(push, NV907D, DAC_SET_CONTROL(or), ctrl);
+ return 0;
}
const struct nv50_outp_func
--
Gitblit v1.6.2