Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/external/bsd/drm2/dist/drm/nouveau/dispnv50 Hack up disp...
details: https://anonhg.NetBSD.org/src/rev/385b1a6d4429
branches: trunk
changeset: 1028370:385b1a6d4429
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sun Dec 19 10:49:47 2021 +0000
description:
Hack up dispnv50 __iomem.
diffstat:
sys/external/bsd/drm2/dist/drm/nouveau/dispnv50/atom.h | 12 +++++++++-
sys/external/bsd/drm2/dist/drm/nouveau/dispnv50/disp.h | 11 ++++++++-
sys/external/bsd/drm2/dist/drm/nouveau/dispnv50/lut.h | 9 ++++++-
sys/external/bsd/drm2/dist/drm/nouveau/dispnv50/nouveau_dispnv50_disp.c | 6 ++--
sys/external/bsd/drm2/dist/drm/nouveau/dispnv50/nouveau_dispnv50_head507d.c | 10 ++++++-
sys/external/bsd/drm2/dist/drm/nouveau/dispnv50/nouveau_dispnv50_head907d.c | 10 ++++++-
sys/external/bsd/drm2/dist/drm/nouveau/dispnv50/nouveau_dispnv50_headc57d.c | 10 ++++++-
sys/external/bsd/drm2/dist/drm/nouveau/dispnv50/nouveau_dispnv50_lut.c | 10 ++++++-
sys/external/bsd/drm2/dist/drm/nouveau/dispnv50/nouveau_dispnv50_wndwc57e.c | 10 ++++++-
9 files changed, 72 insertions(+), 16 deletions(-)
diffs (263 lines):
diff -r f7b6e5ddcbda -r 385b1a6d4429 sys/external/bsd/drm2/dist/drm/nouveau/dispnv50/atom.h
--- a/sys/external/bsd/drm2/dist/drm/nouveau/dispnv50/atom.h Sun Dec 19 10:49:38 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/nouveau/dispnv50/atom.h Sun Dec 19 10:49:47 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: atom.h,v 1.2 2021/12/18 23:45:32 riastradh Exp $ */
+/* $NetBSD: atom.h,v 1.3 2021/12/19 10:49:47 riastradh Exp $ */
#ifndef __NV50_KMS_ATOM_H__
#define __NV50_KMS_ATOM_H__
@@ -15,6 +15,11 @@
#define nv50_head_atom(p) container_of((p), struct nv50_head_atom, state)
+#ifdef __NetBSD__
+# define __lut_iomem volatile
+# define __iomem __lut_iomem
+#endif
+
struct nv50_head_atom {
struct drm_crtc_state state;
@@ -245,4 +250,9 @@
u8 mask;
} set, clr;
};
+
+#ifdef __NetBSD__
+# undef __iomem
#endif
+
+#endif
diff -r f7b6e5ddcbda -r 385b1a6d4429 sys/external/bsd/drm2/dist/drm/nouveau/dispnv50/disp.h
--- a/sys/external/bsd/drm2/dist/drm/nouveau/dispnv50/disp.h Sun Dec 19 10:49:38 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/nouveau/dispnv50/disp.h Sun Dec 19 10:49:47 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: disp.h,v 1.2 2021/12/18 23:45:32 riastradh Exp $ */
+/* $NetBSD: disp.h,v 1.3 2021/12/19 10:49:47 riastradh Exp $ */
#ifndef __NV50_KMS_H__
#define __NV50_KMS_H__
@@ -50,8 +50,17 @@
void corec37d_ntfy_init(struct nouveau_bo *, u32);
+#ifdef __NetBSD__
+# define __lut_iomem volatile
+# define __iomem __lut_iomem
+#endif
+
void head907d_olut_load(struct drm_color_lut *, int size, void __iomem *);
+#ifdef __NetBSD__
+# undef __iomem
+#endif
+
struct nv50_chan {
struct nvif_object user;
struct nvif_device *device;
diff -r f7b6e5ddcbda -r 385b1a6d4429 sys/external/bsd/drm2/dist/drm/nouveau/dispnv50/lut.h
--- a/sys/external/bsd/drm2/dist/drm/nouveau/dispnv50/lut.h Sun Dec 19 10:49:38 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/nouveau/dispnv50/lut.h Sun Dec 19 10:49:47 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lut.h,v 1.2 2021/12/18 23:45:32 riastradh Exp $ */
+/* $NetBSD: lut.h,v 1.3 2021/12/19 10:49:47 riastradh Exp $ */
#ifndef __NV50_KMS_LUT_H__
#define __NV50_KMS_LUT_H__
@@ -13,6 +13,13 @@
int nv50_lut_init(struct nv50_disp *, struct nvif_mmu *, struct nv50_lut *);
void nv50_lut_fini(struct nv50_lut *);
+#ifdef __NetBSD__
+# define __lut_iomem volatile
+# define __iomem __lut_iomem
+#endif
u32 nv50_lut_load(struct nv50_lut *, int buffer, struct drm_property_blob *,
void (*)(struct drm_color_lut *, int size, void __iomem *));
+#ifdef __NetBSD__
+# undef __iomem
#endif
+#endif
diff -r f7b6e5ddcbda -r 385b1a6d4429 sys/external/bsd/drm2/dist/drm/nouveau/dispnv50/nouveau_dispnv50_disp.c
--- a/sys/external/bsd/drm2/dist/drm/nouveau/dispnv50/nouveau_dispnv50_disp.c Sun Dec 19 10:49:38 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/nouveau/dispnv50/nouveau_dispnv50_disp.c Sun Dec 19 10:49:47 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nouveau_dispnv50_disp.c,v 1.4 2021/12/19 10:49:38 riastradh Exp $ */
+/* $NetBSD: nouveau_dispnv50_disp.c,v 1.5 2021/12/19 10:49:47 riastradh Exp $ */
/*
* Copyright 2011 Red Hat Inc.
@@ -24,7 +24,7 @@
* Authors: Ben Skeggs
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nouveau_dispnv50_disp.c,v 1.4 2021/12/19 10:49:38 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nouveau_dispnv50_disp.c,v 1.5 2021/12/19 10:49:47 riastradh Exp $");
#include "disp.h"
#include "atom.h"
@@ -175,7 +175,7 @@
if (ret)
return ret;
- dmac->ptr = dmac->push.object.map.ptr;
+ dmac->ptr = __UNVOLATILE(dmac->push.object.map.ptr);
args->pushbuf = nvif_handle(&dmac->push.object);
diff -r f7b6e5ddcbda -r 385b1a6d4429 sys/external/bsd/drm2/dist/drm/nouveau/dispnv50/nouveau_dispnv50_head507d.c
--- a/sys/external/bsd/drm2/dist/drm/nouveau/dispnv50/nouveau_dispnv50_head507d.c Sun Dec 19 10:49:38 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/nouveau/dispnv50/nouveau_dispnv50_head507d.c Sun Dec 19 10:49:47 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nouveau_dispnv50_head507d.c,v 1.3 2021/12/19 10:49:38 riastradh Exp $ */
+/* $NetBSD: nouveau_dispnv50_head507d.c,v 1.4 2021/12/19 10:49:47 riastradh Exp $ */
/*
* Copyright 2018 Red Hat Inc.
@@ -22,7 +22,7 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nouveau_dispnv50_head507d.c,v 1.3 2021/12/19 10:49:38 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nouveau_dispnv50_head507d.c,v 1.4 2021/12/19 10:49:47 riastradh Exp $");
#include "head.h"
#include "core.h"
@@ -261,6 +261,12 @@
}
}
+#ifdef __NetBSD__
+#define __iomem __lut_iomem
+#define readw(p) atomic_load_relaxed((const __iomem uint16_t *)(p))
+#define writew(v,p) atomic_store_relaxed((__iomem uint16_t *)(p), (v))
+#endif
+
static void
head507d_olut_load(struct drm_color_lut *in, int size, void __iomem *mem)
{
diff -r f7b6e5ddcbda -r 385b1a6d4429 sys/external/bsd/drm2/dist/drm/nouveau/dispnv50/nouveau_dispnv50_head907d.c
--- a/sys/external/bsd/drm2/dist/drm/nouveau/dispnv50/nouveau_dispnv50_head907d.c Sun Dec 19 10:49:38 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/nouveau/dispnv50/nouveau_dispnv50_head907d.c Sun Dec 19 10:49:47 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nouveau_dispnv50_head907d.c,v 1.2 2021/12/18 23:45:32 riastradh Exp $ */
+/* $NetBSD: nouveau_dispnv50_head907d.c,v 1.3 2021/12/19 10:49:47 riastradh Exp $ */
/*
* Copyright 2018 Red Hat Inc.
@@ -22,7 +22,7 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nouveau_dispnv50_head907d.c,v 1.2 2021/12/18 23:45:32 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nouveau_dispnv50_head907d.c,v 1.3 2021/12/19 10:49:47 riastradh Exp $");
#include "head.h"
#include "core.h"
@@ -218,6 +218,12 @@
}
}
+#ifdef __NetBSD__
+#define __iomem __lut_iomem
+#define readw(p) atomic_load_relaxed((const __iomem uint16_t *)(p))
+#define writew(v,p) atomic_store_relaxed((__iomem uint16_t *)(p), (v))
+#endif
+
void
head907d_olut_load(struct drm_color_lut *in, int size, void __iomem *mem)
{
diff -r f7b6e5ddcbda -r 385b1a6d4429 sys/external/bsd/drm2/dist/drm/nouveau/dispnv50/nouveau_dispnv50_headc57d.c
--- a/sys/external/bsd/drm2/dist/drm/nouveau/dispnv50/nouveau_dispnv50_headc57d.c Sun Dec 19 10:49:38 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/nouveau/dispnv50/nouveau_dispnv50_headc57d.c Sun Dec 19 10:49:47 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nouveau_dispnv50_headc57d.c,v 1.3 2021/12/19 10:49:38 riastradh Exp $ */
+/* $NetBSD: nouveau_dispnv50_headc57d.c,v 1.4 2021/12/19 10:49:47 riastradh Exp $ */
/*
* Copyright 2018 Red Hat Inc.
@@ -22,7 +22,7 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nouveau_dispnv50_headc57d.c,v 1.3 2021/12/19 10:49:38 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nouveau_dispnv50_headc57d.c,v 1.4 2021/12/19 10:49:47 riastradh Exp $");
#include "head.h"
#include "atom.h"
@@ -103,6 +103,12 @@
}
}
+#ifdef __NetBSD__
+#define __iomem __lut_iomem
+#define readw(p) atomic_load_relaxed((const __iomem uint16_t *)(p))
+#define writew(v,p) atomic_store_relaxed((__iomem uint16_t *)(p), (v))
+#endif
+
static void
headc57d_olut_load_8(struct drm_color_lut *in, int size, void __iomem *mem)
{
diff -r f7b6e5ddcbda -r 385b1a6d4429 sys/external/bsd/drm2/dist/drm/nouveau/dispnv50/nouveau_dispnv50_lut.c
--- a/sys/external/bsd/drm2/dist/drm/nouveau/dispnv50/nouveau_dispnv50_lut.c Sun Dec 19 10:49:38 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/nouveau/dispnv50/nouveau_dispnv50_lut.c Sun Dec 19 10:49:47 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nouveau_dispnv50_lut.c,v 1.2 2021/12/18 23:45:32 riastradh Exp $ */
+/* $NetBSD: nouveau_dispnv50_lut.c,v 1.3 2021/12/19 10:49:47 riastradh Exp $ */
/*
* Copyright 2018 Red Hat Inc.
@@ -22,7 +22,7 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nouveau_dispnv50_lut.c,v 1.2 2021/12/18 23:45:32 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nouveau_dispnv50_lut.c,v 1.3 2021/12/19 10:49:47 riastradh Exp $");
#include "lut.h"
#include "disp.h"
@@ -33,6 +33,12 @@
#include <nvif/class.h>
+#ifdef __NetBSD__
+#define __iomem __lut_iomem
+#define readw(p) atomic_load_relaxed((const __iomem uint16_t *)(p))
+#define writew(v,p) atomic_store_relaxed((__iomem uint16_t *)(p), (v))
+#endif
+
u32
nv50_lut_load(struct nv50_lut *lut, int buffer, struct drm_property_blob *blob,
void (*load)(struct drm_color_lut *, int, void __iomem *))
diff -r f7b6e5ddcbda -r 385b1a6d4429 sys/external/bsd/drm2/dist/drm/nouveau/dispnv50/nouveau_dispnv50_wndwc57e.c
--- a/sys/external/bsd/drm2/dist/drm/nouveau/dispnv50/nouveau_dispnv50_wndwc57e.c Sun Dec 19 10:49:38 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/nouveau/dispnv50/nouveau_dispnv50_wndwc57e.c Sun Dec 19 10:49:47 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nouveau_dispnv50_wndwc57e.c,v 1.2 2021/12/18 23:45:32 riastradh Exp $ */
+/* $NetBSD: nouveau_dispnv50_wndwc57e.c,v 1.3 2021/12/19 10:49:47 riastradh Exp $ */
/*
* Copyright 2018 Red Hat Inc.
@@ -22,7 +22,7 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nouveau_dispnv50_wndwc57e.c,v 1.2 2021/12/18 23:45:32 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nouveau_dispnv50_wndwc57e.c,v 1.3 2021/12/19 10:49:47 riastradh Exp $");
#include "wndw.h"
#include "atom.h"
@@ -138,6 +138,12 @@
return (sign << 15) | (exp << 10) | man;
}
+#ifdef __NetBSD__
+#define __iomem __lut_iomem
+#define readw(p) atomic_load_relaxed((const __iomem uint16_t *)(p))
+#define writew(v,p) atomic_store_relaxed((__iomem uint16_t *)(p), (v))
+#endif
+
static void
wndwc57e_ilut_load(struct drm_color_lut *in, int size, void __iomem *mem)
{
Home |
Main Index |
Thread Index |
Old Index