Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b62880f7 authored by Alexandre Courbot's avatar Alexandre Courbot Committed by Ben Skeggs
Browse files

drm/nouveau/core: add SEC2 engine



SEC2 is the name given by NVIDIA to the SEC engine post-Fermi (reasons
unknown). Even though it shares the same address range as SEC, its usage
is quite different and this justifies a new engine. Add this engine and
make TOP use it all post-TOP devices should use this implementation and
not the older SEC.

Also quickly add the short gp102 implementation which will be used for
falcon booting purposes.

Signed-off-by: default avatarAlexandre Courbot <acourbot@nvidia.com>
Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent 16307b5d
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -59,6 +59,7 @@ enum nvkm_devidx {
	NVKM_ENGINE_NVDEC,
	NVKM_ENGINE_PM,
	NVKM_ENGINE_SEC,
	NVKM_ENGINE_SEC2,
	NVKM_ENGINE_SW,
	NVKM_ENGINE_VIC,
	NVKM_ENGINE_VP,
@@ -158,6 +159,7 @@ struct nvkm_device {
	struct nvkm_nvdec *nvdec;
	struct nvkm_pm *pm;
	struct nvkm_engine *sec;
	struct nvkm_sec2 *sec2;
	struct nvkm_sw *sw;
	struct nvkm_engine *vic;
	struct nvkm_engine *vp;
@@ -228,6 +230,7 @@ struct nvkm_device_chip {
	int (*nvdec   )(struct nvkm_device *, int idx, struct nvkm_nvdec **);
	int (*pm      )(struct nvkm_device *, int idx, struct nvkm_pm **);
	int (*sec     )(struct nvkm_device *, int idx, struct nvkm_engine **);
	int (*sec2    )(struct nvkm_device *, int idx, struct nvkm_sec2 **);
	int (*sw      )(struct nvkm_device *, int idx, struct nvkm_sw **);
	int (*vic     )(struct nvkm_device *, int idx, struct nvkm_engine **);
	int (*vp      )(struct nvkm_device *, int idx, struct nvkm_engine **);
+13 −0
Original line number Diff line number Diff line
#ifndef __NVKM_SEC2_H__
#define __NVKM_SEC2_H__
#include <core/engine.h>

struct nvkm_sec2 {
	struct nvkm_engine engine;
	struct nvkm_falcon *falcon;
	struct nvkm_msgqueue *queue;
	struct work_struct work;
};

int gp102_sec2_new(struct nvkm_device *, int, struct nvkm_sec2 **);
#endif
+1 −0
Original line number Diff line number Diff line
@@ -78,6 +78,7 @@ nvkm_subdev_name[NVKM_SUBDEV_NR] = {
	[NVKM_ENGINE_NVDEC   ] = "nvdec",
	[NVKM_ENGINE_PM      ] = "pm",
	[NVKM_ENGINE_SEC     ] = "sec",
	[NVKM_ENGINE_SEC2    ] = "sec2",
	[NVKM_ENGINE_SW      ] = "sw",
	[NVKM_ENGINE_VIC     ] = "vic",
	[NVKM_ENGINE_VP      ] = "vp",
+1 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ include $(src)/nvkm/engine/nvenc/Kbuild
include $(src)/nvkm/engine/nvdec/Kbuild
include $(src)/nvkm/engine/pm/Kbuild
include $(src)/nvkm/engine/sec/Kbuild
include $(src)/nvkm/engine/sec2/Kbuild
include $(src)/nvkm/engine/sw/Kbuild
include $(src)/nvkm/engine/vic/Kbuild
include $(src)/nvkm/engine/vp/Kbuild
+2 −0
Original line number Diff line number Diff line
@@ -2365,6 +2365,7 @@ nvkm_device_engine(struct nvkm_device *device, int index)
	_(NVDEC  , device->nvdec   , &device->nvdec->engine);
	_(PM     , device->pm      , &device->pm->engine);
	_(SEC    , device->sec     ,  device->sec);
	_(SEC2   , device->sec2    , &device->sec2->engine);
	_(SW     , device->sw      , &device->sw->engine);
	_(VIC    , device->vic     ,  device->vic);
	_(VP     , device->vp      ,  device->vp);
@@ -2812,6 +2813,7 @@ nvkm_device_ctor(const struct nvkm_device_func *func,
		_(NVKM_ENGINE_NVDEC   ,    nvdec);
		_(NVKM_ENGINE_PM      ,       pm);
		_(NVKM_ENGINE_SEC     ,      sec);
		_(NVKM_ENGINE_SEC2    ,     sec2);
		_(NVKM_ENGINE_SW      ,       sw);
		_(NVKM_ENGINE_VIC     ,      vic);
		_(NVKM_ENGINE_VP      ,       vp);
Loading