mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-06 00:39:48 +00:00
drm/nouveau/mc: use split type+inst in interrupt masking API
Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
This commit is contained in:
parent
6997ea1312
commit
a35047ba77
7 changed files with 11 additions and 11 deletions
|
@ -15,7 +15,7 @@ void nvkm_mc_reset(struct nvkm_device *, enum nvkm_subdev_type, int);
|
|||
void nvkm_mc_intr(struct nvkm_device *, bool *handled);
|
||||
void nvkm_mc_intr_unarm(struct nvkm_device *);
|
||||
void nvkm_mc_intr_rearm(struct nvkm_device *);
|
||||
void nvkm_mc_intr_mask(struct nvkm_device *, enum nvkm_devidx, bool enable);
|
||||
void nvkm_mc_intr_mask(struct nvkm_device *, enum nvkm_subdev_type, int, bool enable);
|
||||
void nvkm_mc_unk260(struct nvkm_device *, u32 data);
|
||||
|
||||
int nv04_mc_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_mc **);
|
||||
|
|
|
@ -25,7 +25,7 @@ struct nvkm_top_device {
|
|||
u32 nvkm_top_addr(struct nvkm_device *, enum nvkm_devidx);
|
||||
u32 nvkm_top_reset(struct nvkm_device *, enum nvkm_subdev_type, int);
|
||||
u32 nvkm_top_intr(struct nvkm_device *, u32 intr, u64 *subdevs);
|
||||
u32 nvkm_top_intr_mask(struct nvkm_device *, enum nvkm_devidx);
|
||||
u32 nvkm_top_intr_mask(struct nvkm_device *, enum nvkm_subdev_type, int);
|
||||
int nvkm_top_fault_id(struct nvkm_device *, enum nvkm_devidx);
|
||||
enum nvkm_devidx nvkm_top_fault(struct nvkm_device *, int fault);
|
||||
enum nvkm_devidx nvkm_top_engine(struct nvkm_device *, int, int *runl, int *engn);
|
||||
|
|
|
@ -262,7 +262,7 @@ gm200_acr_hsfw_boot(struct nvkm_acr *acr, struct nvkm_acr_hsf *hsf,
|
|||
hsf->func->bld(acr, hsf);
|
||||
|
||||
/* Boot the falcon. */
|
||||
nvkm_mc_intr_mask(device, falcon->owner->index, false);
|
||||
nvkm_mc_intr_mask(device, falcon->owner->type, falcon->owner->inst, false);
|
||||
|
||||
nvkm_falcon_wr32(falcon, 0x040, 0xdeada5a5);
|
||||
nvkm_falcon_set_start_addr(falcon, hsf->imem_tag << 8);
|
||||
|
@ -279,7 +279,7 @@ gm200_acr_hsfw_boot(struct nvkm_acr *acr, struct nvkm_acr_hsf *hsf,
|
|||
return -EIO;
|
||||
|
||||
nvkm_falcon_clear_interrupt(falcon, intr_clear);
|
||||
nvkm_mc_intr_mask(device, falcon->owner->index, true);
|
||||
nvkm_mc_intr_mask(device, falcon->owner->type, falcon->owner->inst, true);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ void
|
|||
gp100_fault_buffer_intr(struct nvkm_fault_buffer *buffer, bool enable)
|
||||
{
|
||||
struct nvkm_device *device = buffer->fault->subdev.device;
|
||||
nvkm_mc_intr_mask(device, NVKM_SUBDEV_FAULT, enable);
|
||||
nvkm_mc_intr_mask(device, NVKM_SUBDEV_FAULT, 0, enable);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -37,7 +37,7 @@ tu102_fault_buffer_intr(struct nvkm_fault_buffer *buffer, bool enable)
|
|||
*/
|
||||
struct nvkm_device *device = buffer->fault->subdev.device;
|
||||
|
||||
nvkm_mc_intr_mask(device, NVKM_SUBDEV_FAULT, enable);
|
||||
nvkm_mc_intr_mask(device, NVKM_SUBDEV_FAULT, 0, enable);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -35,14 +35,14 @@ nvkm_mc_unk260(struct nvkm_device *device, u32 data)
|
|||
}
|
||||
|
||||
void
|
||||
nvkm_mc_intr_mask(struct nvkm_device *device, enum nvkm_devidx devidx, bool en)
|
||||
nvkm_mc_intr_mask(struct nvkm_device *device, enum nvkm_subdev_type type, int inst, bool en)
|
||||
{
|
||||
struct nvkm_mc *mc = device->mc;
|
||||
const struct nvkm_mc_map *map;
|
||||
if (likely(mc) && mc->func->intr_mask) {
|
||||
u32 mask = nvkm_top_intr_mask(device, devidx);
|
||||
u32 mask = nvkm_top_intr_mask(device, type, inst);
|
||||
for (map = mc->func->intr; !mask && map->stat; map++) {
|
||||
if (map->type + map->inst == devidx)
|
||||
if (map->type == type && map->inst == inst)
|
||||
mask = map->stat;
|
||||
}
|
||||
mc->func->intr_mask(mc, mask, en ? mask : 0);
|
||||
|
|
|
@ -75,14 +75,14 @@ nvkm_top_reset(struct nvkm_device *device, enum nvkm_subdev_type type, int inst)
|
|||
}
|
||||
|
||||
u32
|
||||
nvkm_top_intr_mask(struct nvkm_device *device, enum nvkm_devidx devidx)
|
||||
nvkm_top_intr_mask(struct nvkm_device *device, enum nvkm_subdev_type type, int inst)
|
||||
{
|
||||
struct nvkm_top *top = device->top;
|
||||
struct nvkm_top_device *info;
|
||||
|
||||
if (top) {
|
||||
list_for_each_entry(info, &top->device, head) {
|
||||
if (info->index == devidx && info->intr >= 0)
|
||||
if (info->type == type && info->inst == inst && info->intr >= 0)
|
||||
return BIT(info->intr);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue