You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
drm/nouveau/core: remove pmc_enable argument from subdev ctor
These are now specified directly in the MC subdev. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
@@ -38,11 +38,9 @@ struct nvkm_engine_func {
|
||||
};
|
||||
|
||||
int nvkm_engine_ctor(const struct nvkm_engine_func *, struct nvkm_device *,
|
||||
int index, u32 pmc_enable, bool enable,
|
||||
struct nvkm_engine *);
|
||||
int index, bool enable, struct nvkm_engine *);
|
||||
int nvkm_engine_new_(const struct nvkm_engine_func *, struct nvkm_device *,
|
||||
int index, u32 pmc_enable, bool enable,
|
||||
struct nvkm_engine **);
|
||||
int index, bool enable, struct nvkm_engine **);
|
||||
struct nvkm_engine *nvkm_engine_ref(struct nvkm_engine *);
|
||||
void nvkm_engine_unref(struct nvkm_engine **);
|
||||
void nvkm_engine_tile(struct nvkm_engine *, int region);
|
||||
|
||||
@@ -6,7 +6,6 @@ struct nvkm_subdev {
|
||||
const struct nvkm_subdev_func *func;
|
||||
struct nvkm_device *device;
|
||||
enum nvkm_devidx index;
|
||||
u32 pmc_enable;
|
||||
struct mutex mutex;
|
||||
u32 debug;
|
||||
|
||||
@@ -24,7 +23,7 @@ struct nvkm_subdev_func {
|
||||
|
||||
extern const char *nvkm_subdev_name[NVKM_SUBDEV_NR];
|
||||
void nvkm_subdev_ctor(const struct nvkm_subdev_func *, struct nvkm_device *,
|
||||
int index, u32 pmc_enable, struct nvkm_subdev *);
|
||||
int index, struct nvkm_subdev *);
|
||||
void nvkm_subdev_del(struct nvkm_subdev **);
|
||||
int nvkm_subdev_preinit(struct nvkm_subdev *);
|
||||
int nvkm_subdev_init(struct nvkm_subdev *);
|
||||
|
||||
@@ -40,7 +40,6 @@ struct nvkm_falcon_func {
|
||||
u32 *data;
|
||||
u32 size;
|
||||
} data;
|
||||
u32 pmc_enable;
|
||||
void (*init)(struct nvkm_falcon *);
|
||||
void (*intr)(struct nvkm_falcon *, struct nvkm_fifo_chan *);
|
||||
struct nvkm_sclass sclass[];
|
||||
|
||||
@@ -15,7 +15,6 @@ int nvkm_xtensa_new_(const struct nvkm_xtensa_func *, struct nvkm_device *,
|
||||
int index, bool enable, u32 addr, struct nvkm_engine **);
|
||||
|
||||
struct nvkm_xtensa_func {
|
||||
u32 pmc_enable;
|
||||
u32 fifo_val;
|
||||
u32 unkd28;
|
||||
struct nvkm_sclass sclass[];
|
||||
|
||||
@@ -137,11 +137,10 @@ nvkm_engine_func = {
|
||||
|
||||
int
|
||||
nvkm_engine_ctor(const struct nvkm_engine_func *func,
|
||||
struct nvkm_device *device, int index, u32 pmc_enable,
|
||||
bool enable, struct nvkm_engine *engine)
|
||||
struct nvkm_device *device, int index, bool enable,
|
||||
struct nvkm_engine *engine)
|
||||
{
|
||||
nvkm_subdev_ctor(&nvkm_engine_func, device, index,
|
||||
pmc_enable, &engine->subdev);
|
||||
nvkm_subdev_ctor(&nvkm_engine_func, device, index, &engine->subdev);
|
||||
engine->func = func;
|
||||
|
||||
if (!nvkm_boolopt(device->cfgopt, nvkm_subdev_name[index], enable)) {
|
||||
@@ -155,11 +154,10 @@ nvkm_engine_ctor(const struct nvkm_engine_func *func,
|
||||
|
||||
int
|
||||
nvkm_engine_new_(const struct nvkm_engine_func *func,
|
||||
struct nvkm_device *device, int index, u32 pmc_enable,
|
||||
bool enable, struct nvkm_engine **pengine)
|
||||
struct nvkm_device *device, int index, bool enable,
|
||||
struct nvkm_engine **pengine)
|
||||
{
|
||||
if (!(*pengine = kzalloc(sizeof(**pengine), GFP_KERNEL)))
|
||||
return -ENOMEM;
|
||||
return nvkm_engine_ctor(func, device, index, pmc_enable,
|
||||
enable, *pengine);
|
||||
return nvkm_engine_ctor(func, device, index, enable, *pengine);
|
||||
}
|
||||
|
||||
@@ -190,14 +190,13 @@ nvkm_subdev_del(struct nvkm_subdev **psubdev)
|
||||
|
||||
void
|
||||
nvkm_subdev_ctor(const struct nvkm_subdev_func *func,
|
||||
struct nvkm_device *device, int index, u32 pmc_enable,
|
||||
struct nvkm_device *device, int index,
|
||||
struct nvkm_subdev *subdev)
|
||||
{
|
||||
const char *name = nvkm_subdev_name[index];
|
||||
subdev->func = func;
|
||||
subdev->device = device;
|
||||
subdev->index = index;
|
||||
subdev->pmc_enable = pmc_enable;
|
||||
|
||||
__mutex_init(&subdev->mutex, name, &nvkm_subdev_lock_class[index]);
|
||||
subdev->debug = nvkm_dbgopt(device->dbgopt, name);
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
|
||||
static const struct nvkm_xtensa_func
|
||||
g84_bsp = {
|
||||
.pmc_enable = 0x04008000,
|
||||
.fifo_val = 0x1111,
|
||||
.unkd28 = 0x90044,
|
||||
.sclass = {
|
||||
|
||||
@@ -40,7 +40,6 @@ gf100_ce0 = {
|
||||
.code.size = sizeof(gf100_ce_code),
|
||||
.data.data = gf100_ce_data,
|
||||
.data.size = sizeof(gf100_ce_data),
|
||||
.pmc_enable = 0x00000040,
|
||||
.init = gf100_ce_init,
|
||||
.intr = gt215_ce_intr,
|
||||
.sclass = {
|
||||
@@ -55,7 +54,6 @@ gf100_ce1 = {
|
||||
.code.size = sizeof(gf100_ce_code),
|
||||
.data.data = gf100_ce_data,
|
||||
.data.size = sizeof(gf100_ce_data),
|
||||
.pmc_enable = 0x00000080,
|
||||
.init = gf100_ce_init,
|
||||
.intr = gt215_ce_intr,
|
||||
.sclass = {
|
||||
|
||||
@@ -97,17 +97,5 @@ int
|
||||
gk104_ce_new(struct nvkm_device *device, int index,
|
||||
struct nvkm_engine **pengine)
|
||||
{
|
||||
if (index == NVKM_ENGINE_CE0) {
|
||||
return nvkm_engine_new_(&gk104_ce, device, index,
|
||||
0x00000040, true, pengine);
|
||||
} else
|
||||
if (index == NVKM_ENGINE_CE1) {
|
||||
return nvkm_engine_new_(&gk104_ce, device, index,
|
||||
0x00000080, true, pengine);
|
||||
} else
|
||||
if (index == NVKM_ENGINE_CE2) {
|
||||
return nvkm_engine_new_(&gk104_ce, device, index,
|
||||
0x00200000, true, pengine);
|
||||
}
|
||||
return -ENODEV;
|
||||
return nvkm_engine_new_(&gk104_ce, device, index, true, pengine);
|
||||
}
|
||||
|
||||
@@ -39,17 +39,5 @@ int
|
||||
gm107_ce_new(struct nvkm_device *device, int index,
|
||||
struct nvkm_engine **pengine)
|
||||
{
|
||||
if (index == NVKM_ENGINE_CE0) {
|
||||
return nvkm_engine_new_(&gm107_ce, device, index,
|
||||
0x00000040, true, pengine);
|
||||
} else
|
||||
if (index == NVKM_ENGINE_CE1) {
|
||||
return nvkm_engine_new_(&gm107_ce, device, index,
|
||||
0x00000080, true, pengine);
|
||||
} else
|
||||
if (index == NVKM_ENGINE_CE2) {
|
||||
return nvkm_engine_new_(&gm107_ce, device, index,
|
||||
0x00200000, true, pengine);
|
||||
}
|
||||
return -ENODEV;
|
||||
return nvkm_engine_new_(&gm107_ce, device, index, true, pengine);
|
||||
}
|
||||
|
||||
@@ -38,17 +38,5 @@ int
|
||||
gm200_ce_new(struct nvkm_device *device, int index,
|
||||
struct nvkm_engine **pengine)
|
||||
{
|
||||
if (index == NVKM_ENGINE_CE0) {
|
||||
return nvkm_engine_new_(&gm200_ce, device, index,
|
||||
0x00000040, true, pengine);
|
||||
} else
|
||||
if (index == NVKM_ENGINE_CE1) {
|
||||
return nvkm_engine_new_(&gm200_ce, device, index,
|
||||
0x00000080, true, pengine);
|
||||
} else
|
||||
if (index == NVKM_ENGINE_CE2) {
|
||||
return nvkm_engine_new_(&gm200_ce, device, index,
|
||||
0x00200000, true, pengine);
|
||||
}
|
||||
return -ENODEV;
|
||||
return nvkm_engine_new_(&gm200_ce, device, index, true, pengine);
|
||||
}
|
||||
|
||||
@@ -67,7 +67,6 @@ gt215_ce = {
|
||||
.code.size = sizeof(gt215_ce_code),
|
||||
.data.data = gt215_ce_data,
|
||||
.data.size = sizeof(gt215_ce_data),
|
||||
.pmc_enable = 0x00802000,
|
||||
.intr = gt215_ce_intr,
|
||||
.sclass = {
|
||||
{ -1, -1, GT212_DMA },
|
||||
|
||||
@@ -130,6 +130,5 @@ int
|
||||
g84_cipher_new(struct nvkm_device *device, int index,
|
||||
struct nvkm_engine **pengine)
|
||||
{
|
||||
return nvkm_engine_new_(&g84_cipher, device, index,
|
||||
0x00004000, true, pengine);
|
||||
return nvkm_engine_new_(&g84_cipher, device, index, true, pengine);
|
||||
}
|
||||
|
||||
@@ -298,8 +298,7 @@ nvkm_disp_ctor(const struct nvkm_disp_func *func, struct nvkm_device *device,
|
||||
disp->func = func;
|
||||
disp->head.nr = heads;
|
||||
|
||||
ret = nvkm_engine_ctor(&nvkm_disp, device, index, 0,
|
||||
true, &disp->engine);
|
||||
ret = nvkm_engine_ctor(&nvkm_disp, device, index, true, &disp->engine);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
|
||||
@@ -152,6 +152,5 @@ nvkm_dma_new_(const struct nvkm_dma_func *func, struct nvkm_device *device,
|
||||
return -ENOMEM;
|
||||
dma->func = func;
|
||||
|
||||
return nvkm_engine_ctor(&nvkm_dma, device, index,
|
||||
0, true, &dma->engine);
|
||||
return nvkm_engine_ctor(&nvkm_dma, device, index, true, &dma->engine);
|
||||
}
|
||||
|
||||
@@ -348,6 +348,6 @@ nvkm_falcon_new_(const struct nvkm_falcon_func *func,
|
||||
falcon->data.size = func->data.size;
|
||||
*pengine = &falcon->engine;
|
||||
|
||||
return nvkm_engine_ctor(&nvkm_falcon, device, index, func->pmc_enable,
|
||||
return nvkm_engine_ctor(&nvkm_falcon, device, index,
|
||||
enable, &falcon->engine);
|
||||
}
|
||||
|
||||
@@ -261,8 +261,7 @@ nvkm_fifo_ctor(const struct nvkm_fifo_func *func, struct nvkm_device *device,
|
||||
fifo->nr = nr;
|
||||
bitmap_clear(fifo->mask, 0, fifo->nr);
|
||||
|
||||
ret = nvkm_engine_ctor(&nvkm_fifo, device, index, 0x00000100,
|
||||
true, &fifo->engine);
|
||||
ret = nvkm_engine_ctor(&nvkm_fifo, device, index, true, &fifo->engine);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
|
||||
@@ -128,9 +128,8 @@ nvkm_gr = {
|
||||
|
||||
int
|
||||
nvkm_gr_ctor(const struct nvkm_gr_func *func, struct nvkm_device *device,
|
||||
int index, u32 pmc_enable, bool enable, struct nvkm_gr *gr)
|
||||
int index, bool enable, struct nvkm_gr *gr)
|
||||
{
|
||||
gr->func = func;
|
||||
return nvkm_engine_ctor(&nvkm_gr, device, index, pmc_enable,
|
||||
enable, &gr->engine);
|
||||
return nvkm_engine_ctor(&nvkm_gr, device, index, enable, &gr->engine);
|
||||
}
|
||||
|
||||
@@ -1776,7 +1776,7 @@ gf100_gr_ctor(const struct gf100_gr_func *func, struct nvkm_device *device,
|
||||
gr->firmware = nvkm_boolopt(device->cfgopt, "NvGrUseFW",
|
||||
func->fecs.ucode == NULL);
|
||||
|
||||
ret = nvkm_gr_ctor(&gf100_gr_, device, index, 0x08001000,
|
||||
ret = nvkm_gr_ctor(&gf100_gr_, device, index,
|
||||
gr->firmware || func->fecs.ucode != NULL,
|
||||
&gr->base);
|
||||
if (ret)
|
||||
|
||||
@@ -1422,6 +1422,5 @@ nv04_gr_new(struct nvkm_device *device, int index, struct nvkm_gr **pgr)
|
||||
spin_lock_init(&gr->lock);
|
||||
*pgr = &gr->base;
|
||||
|
||||
return nvkm_gr_ctor(&nv04_gr, device, index, 0x00001000,
|
||||
true, &gr->base);
|
||||
return nvkm_gr_ctor(&nv04_gr, device, index, true, &gr->base);
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user