mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-22 16:57:40 +07:00
drm/nouveau/fault/tu102: rename implementation from tu104
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
parent
ef7664d9df
commit
954f97983c
@ -30,5 +30,5 @@ struct nvkm_fault_data {
|
|||||||
|
|
||||||
int gp100_fault_new(struct nvkm_device *, int, struct nvkm_fault **);
|
int gp100_fault_new(struct nvkm_device *, int, struct nvkm_fault **);
|
||||||
int gv100_fault_new(struct nvkm_device *, int, struct nvkm_fault **);
|
int gv100_fault_new(struct nvkm_device *, int, struct nvkm_fault **);
|
||||||
int tu104_fault_new(struct nvkm_device *, int, struct nvkm_fault **);
|
int tu102_fault_new(struct nvkm_device *, int, struct nvkm_fault **);
|
||||||
#endif
|
#endif
|
||||||
|
@ -2441,7 +2441,7 @@ nv162_chipset = {
|
|||||||
.bios = nvkm_bios_new,
|
.bios = nvkm_bios_new,
|
||||||
.bus = gf100_bus_new,
|
.bus = gf100_bus_new,
|
||||||
.devinit = tu102_devinit_new,
|
.devinit = tu102_devinit_new,
|
||||||
.fault = tu104_fault_new,
|
.fault = tu102_fault_new,
|
||||||
.fb = gv100_fb_new,
|
.fb = gv100_fb_new,
|
||||||
.fuse = gm107_fuse_new,
|
.fuse = gm107_fuse_new,
|
||||||
.gpio = gk104_gpio_new,
|
.gpio = gk104_gpio_new,
|
||||||
@ -2473,7 +2473,7 @@ nv164_chipset = {
|
|||||||
.bios = nvkm_bios_new,
|
.bios = nvkm_bios_new,
|
||||||
.bus = gf100_bus_new,
|
.bus = gf100_bus_new,
|
||||||
.devinit = tu102_devinit_new,
|
.devinit = tu102_devinit_new,
|
||||||
.fault = tu104_fault_new,
|
.fault = tu102_fault_new,
|
||||||
.fb = gv100_fb_new,
|
.fb = gv100_fb_new,
|
||||||
.fuse = gm107_fuse_new,
|
.fuse = gm107_fuse_new,
|
||||||
.gpio = gk104_gpio_new,
|
.gpio = gk104_gpio_new,
|
||||||
@ -2505,7 +2505,7 @@ nv166_chipset = {
|
|||||||
.bios = nvkm_bios_new,
|
.bios = nvkm_bios_new,
|
||||||
.bus = gf100_bus_new,
|
.bus = gf100_bus_new,
|
||||||
.devinit = tu102_devinit_new,
|
.devinit = tu102_devinit_new,
|
||||||
.fault = tu104_fault_new,
|
.fault = tu102_fault_new,
|
||||||
.fb = gv100_fb_new,
|
.fb = gv100_fb_new,
|
||||||
.fuse = gm107_fuse_new,
|
.fuse = gm107_fuse_new,
|
||||||
.gpio = gk104_gpio_new,
|
.gpio = gk104_gpio_new,
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
nvkm-y += nvkm/subdev/fault/base.o
|
nvkm-y += nvkm/subdev/fault/base.o
|
||||||
nvkm-y += nvkm/subdev/fault/gp100.o
|
nvkm-y += nvkm/subdev/fault/gp100.o
|
||||||
nvkm-y += nvkm/subdev/fault/gv100.o
|
nvkm-y += nvkm/subdev/fault/gv100.o
|
||||||
nvkm-y += nvkm/subdev/fault/tu104.o
|
nvkm-y += nvkm/subdev/fault/tu102.o
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
#include <nvif/class.h>
|
#include <nvif/class.h>
|
||||||
|
|
||||||
static void
|
static void
|
||||||
tu104_fault_buffer_intr(struct nvkm_fault_buffer *buffer, bool enable)
|
tu102_fault_buffer_intr(struct nvkm_fault_buffer *buffer, bool enable)
|
||||||
{
|
{
|
||||||
/*XXX: Earlier versions of RM touched the old regs on Turing,
|
/*XXX: Earlier versions of RM touched the old regs on Turing,
|
||||||
* which don't appear to actually work anymore, but newer
|
* which don't appear to actually work anymore, but newer
|
||||||
@ -37,7 +37,7 @@ tu104_fault_buffer_intr(struct nvkm_fault_buffer *buffer, bool enable)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
tu104_fault_buffer_fini(struct nvkm_fault_buffer *buffer)
|
tu102_fault_buffer_fini(struct nvkm_fault_buffer *buffer)
|
||||||
{
|
{
|
||||||
struct nvkm_device *device = buffer->fault->subdev.device;
|
struct nvkm_device *device = buffer->fault->subdev.device;
|
||||||
const u32 foff = buffer->id * 0x20;
|
const u32 foff = buffer->id * 0x20;
|
||||||
@ -45,7 +45,7 @@ tu104_fault_buffer_fini(struct nvkm_fault_buffer *buffer)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
tu104_fault_buffer_init(struct nvkm_fault_buffer *buffer)
|
tu102_fault_buffer_init(struct nvkm_fault_buffer *buffer)
|
||||||
{
|
{
|
||||||
struct nvkm_device *device = buffer->fault->subdev.device;
|
struct nvkm_device *device = buffer->fault->subdev.device;
|
||||||
const u32 foff = buffer->id * 0x20;
|
const u32 foff = buffer->id * 0x20;
|
||||||
@ -57,7 +57,7 @@ tu104_fault_buffer_init(struct nvkm_fault_buffer *buffer)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
tu104_fault_buffer_info(struct nvkm_fault_buffer *buffer)
|
tu102_fault_buffer_info(struct nvkm_fault_buffer *buffer)
|
||||||
{
|
{
|
||||||
struct nvkm_device *device = buffer->fault->subdev.device;
|
struct nvkm_device *device = buffer->fault->subdev.device;
|
||||||
const u32 foff = buffer->id * 0x20;
|
const u32 foff = buffer->id * 0x20;
|
||||||
@ -70,7 +70,7 @@ tu104_fault_buffer_info(struct nvkm_fault_buffer *buffer)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
tu104_fault_intr_fault(struct nvkm_fault *fault)
|
tu102_fault_intr_fault(struct nvkm_fault *fault)
|
||||||
{
|
{
|
||||||
struct nvkm_subdev *subdev = &fault->subdev;
|
struct nvkm_subdev *subdev = &fault->subdev;
|
||||||
struct nvkm_device *device = subdev->device;
|
struct nvkm_device *device = subdev->device;
|
||||||
@ -96,14 +96,14 @@ tu104_fault_intr_fault(struct nvkm_fault *fault)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
tu104_fault_intr(struct nvkm_fault *fault)
|
tu102_fault_intr(struct nvkm_fault *fault)
|
||||||
{
|
{
|
||||||
struct nvkm_subdev *subdev = &fault->subdev;
|
struct nvkm_subdev *subdev = &fault->subdev;
|
||||||
struct nvkm_device *device = subdev->device;
|
struct nvkm_device *device = subdev->device;
|
||||||
u32 stat = nvkm_rd32(device, 0xb83094);
|
u32 stat = nvkm_rd32(device, 0xb83094);
|
||||||
|
|
||||||
if (stat & 0x80000000) {
|
if (stat & 0x80000000) {
|
||||||
tu104_fault_intr_fault(fault);
|
tu102_fault_intr_fault(fault);
|
||||||
nvkm_wr32(device, 0xb83094, 0x80000000);
|
nvkm_wr32(device, 0xb83094, 0x80000000);
|
||||||
stat &= ~0x80000000;
|
stat &= ~0x80000000;
|
||||||
}
|
}
|
||||||
@ -129,7 +129,7 @@ tu104_fault_intr(struct nvkm_fault *fault)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
tu104_fault_fini(struct nvkm_fault *fault)
|
tu102_fault_fini(struct nvkm_fault *fault)
|
||||||
{
|
{
|
||||||
nvkm_notify_put(&fault->nrpfb);
|
nvkm_notify_put(&fault->nrpfb);
|
||||||
if (fault->buffer[0])
|
if (fault->buffer[0])
|
||||||
@ -138,7 +138,7 @@ tu104_fault_fini(struct nvkm_fault *fault)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
tu104_fault_init(struct nvkm_fault *fault)
|
tu102_fault_init(struct nvkm_fault *fault)
|
||||||
{
|
{
|
||||||
/*XXX: enable priv faults */
|
/*XXX: enable priv faults */
|
||||||
fault->func->buffer.init(fault->buffer[0]);
|
fault->func->buffer.init(fault->buffer[0]);
|
||||||
@ -146,22 +146,22 @@ tu104_fault_init(struct nvkm_fault *fault)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static const struct nvkm_fault_func
|
static const struct nvkm_fault_func
|
||||||
tu104_fault = {
|
tu102_fault = {
|
||||||
.oneinit = gv100_fault_oneinit,
|
.oneinit = gv100_fault_oneinit,
|
||||||
.init = tu104_fault_init,
|
.init = tu102_fault_init,
|
||||||
.fini = tu104_fault_fini,
|
.fini = tu102_fault_fini,
|
||||||
.intr = tu104_fault_intr,
|
.intr = tu102_fault_intr,
|
||||||
.buffer.nr = 2,
|
.buffer.nr = 2,
|
||||||
.buffer.entry_size = 32,
|
.buffer.entry_size = 32,
|
||||||
.buffer.info = tu104_fault_buffer_info,
|
.buffer.info = tu102_fault_buffer_info,
|
||||||
.buffer.init = tu104_fault_buffer_init,
|
.buffer.init = tu102_fault_buffer_init,
|
||||||
.buffer.fini = tu104_fault_buffer_fini,
|
.buffer.fini = tu102_fault_buffer_fini,
|
||||||
.buffer.intr = tu104_fault_buffer_intr,
|
.buffer.intr = tu102_fault_buffer_intr,
|
||||||
};
|
};
|
||||||
|
|
||||||
int
|
int
|
||||||
tu104_fault_new(struct nvkm_device *device, int index,
|
tu102_fault_new(struct nvkm_device *device, int index,
|
||||||
struct nvkm_fault **pfault)
|
struct nvkm_fault **pfault)
|
||||||
{
|
{
|
||||||
return nvkm_fault_new_(&tu104_fault, device, index, pfault);
|
return nvkm_fault_new_(&tu102_fault, device, index, pfault);
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user