summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gp10b.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2020-01-14 23:34:21 +0300
committerBen Skeggs <bskeggs@redhat.com>2020-01-15 03:50:26 +0300
commit989863d7cbe58180cf0e69fd5ed72279c7fac901 (patch)
tree01e96ef67b2b1f96cea92c9da8cf14e8491d4373 /drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gp10b.c
parente905736c6d7328ce2d34640741f4b7e75c64a737 (diff)
downloadlinux-989863d7cbe58180cf0e69fd5ed72279c7fac901.tar.xz
drm/nouveau/pmu: select implementation based on available firmware
This will allow for further customisation of the subdev depending on what firmware is available. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gp10b.c')
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gp10b.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gp10b.c b/drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gp10b.c
index d028f50090ae..2440e230f398 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gp10b.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gp10b.c
@@ -20,6 +20,11 @@
* DEALINGS IN THE SOFTWARE.
*/
#include "priv.h"
+#include <subdev/acr.h>
+
+static const struct nvkm_acr_lsf_func
+gp10b_pmu_acr = {
+};
static const struct nvkm_pmu_func
gp10b_pmu = {
@@ -28,8 +33,20 @@ gp10b_pmu = {
.recv = gm20b_pmu_recv,
};
+#if IS_ENABLED(CONFIG_ARCH_TEGRA_210_SOC)
+MODULE_FIRMWARE("nvidia/gp10b/pmu/desc.bin");
+MODULE_FIRMWARE("nvidia/gp10b/pmu/image.bin");
+MODULE_FIRMWARE("nvidia/gp10b/pmu/sig.bin");
+#endif
+
+static const struct nvkm_pmu_fwif
+gp10b_pmu_fwif[] = {
+ { 0, gm20b_pmu_load, &gp10b_pmu, &gp10b_pmu_acr },
+ {}
+};
+
int
gp10b_pmu_new(struct nvkm_device *device, int index, struct nvkm_pmu **ppmu)
{
- return nvkm_pmu_new_(&gp10b_pmu, device, index, ppmu);
+ return nvkm_pmu_new_(gp10b_pmu_fwif, device, index, ppmu);
}