-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
drm/nouveau/acr: add stub implementation for all GPUs currently suppo…
…rted by SECBOOT PMU, SEC2 and GR will be modified to register their falcons with ACR before the main commit switching everything over. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
- Loading branch information
Ben Skeggs
committed
Jan 15, 2020
1 parent
31bef57
commit 67e7c6c
Showing
15 changed files
with
371 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,7 @@ | ||
# SPDX-License-Identifier: MIT | ||
nvkm-y += nvkm/subdev/acr/base.o | ||
nvkm-y += nvkm/subdev/acr/gm200.o | ||
nvkm-y += nvkm/subdev/acr/gm20b.o | ||
nvkm-y += nvkm/subdev/acr/gp102.o | ||
nvkm-y += nvkm/subdev/acr/gp108.o | ||
nvkm-y += nvkm/subdev/acr/gp10b.o |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
/* | ||
* Copyright 2019 Red Hat Inc. | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a | ||
* copy of this software and associated documentation files (the "Software"), | ||
* to deal in the Software without restriction, including without limitation | ||
* the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
* and/or sell copies of the Software, and to permit persons to whom the | ||
* Software is furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in | ||
* all copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
* THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
* OTHER DEALINGS IN THE SOFTWARE. | ||
*/ | ||
#include "priv.h" | ||
|
||
#include <core/firmware.h> | ||
|
||
static void * | ||
nvkm_acr_dtor(struct nvkm_subdev *subdev) | ||
{ | ||
struct nvkm_acr *acr = nvkm_acr(subdev); | ||
return acr; | ||
} | ||
|
||
static const struct nvkm_subdev_func | ||
nvkm_acr = { | ||
.dtor = nvkm_acr_dtor, | ||
}; | ||
|
||
int | ||
nvkm_acr_new_(const struct nvkm_acr_fwif *fwif, struct nvkm_device *device, | ||
int index, struct nvkm_acr **pacr) | ||
{ | ||
struct nvkm_acr *acr; | ||
|
||
if (!(acr = *pacr = kzalloc(sizeof(*acr), GFP_KERNEL))) | ||
return -ENOMEM; | ||
nvkm_subdev_ctor(&nvkm_acr, device, index, &acr->subdev); | ||
|
||
fwif = nvkm_firmware_load(&acr->subdev, fwif, "Acr", acr); | ||
if (IS_ERR(fwif)) | ||
return PTR_ERR(fwif); | ||
|
||
acr->func = fwif->func; | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
/* | ||
* Copyright 2019 Red Hat Inc. | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a | ||
* copy of this software and associated documentation files (the "Software"), | ||
* to deal in the Software without restriction, including without limitation | ||
* the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
* and/or sell copies of the Software, and to permit persons to whom the | ||
* Software is furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in | ||
* all copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
* THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
* OTHER DEALINGS IN THE SOFTWARE. | ||
*/ | ||
#include "priv.h" | ||
|
||
MODULE_FIRMWARE("nvidia/gm200/acr/ucode_unload.bin"); | ||
MODULE_FIRMWARE("nvidia/gm204/acr/ucode_unload.bin"); | ||
MODULE_FIRMWARE("nvidia/gm206/acr/ucode_unload.bin"); | ||
MODULE_FIRMWARE("nvidia/gp100/acr/ucode_unload.bin"); | ||
|
||
MODULE_FIRMWARE("nvidia/gm200/acr/bl.bin"); | ||
MODULE_FIRMWARE("nvidia/gm200/acr/ucode_load.bin"); | ||
|
||
MODULE_FIRMWARE("nvidia/gm204/acr/bl.bin"); | ||
MODULE_FIRMWARE("nvidia/gm204/acr/ucode_load.bin"); | ||
|
||
MODULE_FIRMWARE("nvidia/gm206/acr/bl.bin"); | ||
MODULE_FIRMWARE("nvidia/gm206/acr/ucode_load.bin"); | ||
|
||
MODULE_FIRMWARE("nvidia/gp100/acr/bl.bin"); | ||
MODULE_FIRMWARE("nvidia/gp100/acr/ucode_load.bin"); | ||
|
||
static const struct nvkm_acr_func | ||
gm200_acr = { | ||
}; | ||
|
||
static int | ||
gm200_acr_load(struct nvkm_acr *acr, int ver, const struct nvkm_acr_fwif *fwif) | ||
{ | ||
return 0; | ||
} | ||
|
||
static const struct nvkm_acr_fwif | ||
gm200_acr_fwif[] = { | ||
{ 0, gm200_acr_load, &gm200_acr }, | ||
{} | ||
}; | ||
|
||
int | ||
gm200_acr_new(struct nvkm_device *device, int index, struct nvkm_acr **pacr) | ||
{ | ||
return nvkm_acr_new_(gm200_acr_fwif, device, index, pacr); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/* | ||
* Copyright 2019 Red Hat Inc. | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a | ||
* copy of this software and associated documentation files (the "Software"), | ||
* to deal in the Software without restriction, including without limitation | ||
* the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
* and/or sell copies of the Software, and to permit persons to whom the | ||
* Software is furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in | ||
* all copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
* THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
* OTHER DEALINGS IN THE SOFTWARE. | ||
*/ | ||
#include "priv.h" | ||
|
||
#if IS_ENABLED(CONFIG_ARCH_TEGRA_210_SOC) | ||
MODULE_FIRMWARE("nvidia/gm20b/acr/bl.bin"); | ||
MODULE_FIRMWARE("nvidia/gm20b/acr/ucode_load.bin"); | ||
#endif | ||
|
||
static const struct nvkm_acr_func | ||
gm20b_acr = { | ||
}; | ||
|
||
int | ||
gm20b_acr_load(struct nvkm_acr *acr, int ver, const struct nvkm_acr_fwif *fwif) | ||
{ | ||
return 0; | ||
} | ||
|
||
static const struct nvkm_acr_fwif | ||
gm20b_acr_fwif[] = { | ||
{ 0, gm20b_acr_load, &gm20b_acr }, | ||
{} | ||
}; | ||
|
||
int | ||
gm20b_acr_new(struct nvkm_device *device, int index, struct nvkm_acr **pacr) | ||
{ | ||
return nvkm_acr_new_(gm20b_acr_fwif, device, index, pacr); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
/* | ||
* Copyright 2019 Red Hat Inc. | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a | ||
* copy of this software and associated documentation files (the "Software"), | ||
* to deal in the Software without restriction, including without limitation | ||
* the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
* and/or sell copies of the Software, and to permit persons to whom the | ||
* Software is furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in | ||
* all copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
* THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
* OTHER DEALINGS IN THE SOFTWARE. | ||
*/ | ||
#include "priv.h" | ||
|
||
MODULE_FIRMWARE("nvidia/gp102/acr/unload_bl.bin"); | ||
MODULE_FIRMWARE("nvidia/gp102/acr/ucode_unload.bin"); | ||
|
||
MODULE_FIRMWARE("nvidia/gp104/acr/unload_bl.bin"); | ||
MODULE_FIRMWARE("nvidia/gp104/acr/ucode_unload.bin"); | ||
|
||
MODULE_FIRMWARE("nvidia/gp106/acr/unload_bl.bin"); | ||
MODULE_FIRMWARE("nvidia/gp106/acr/ucode_unload.bin"); | ||
|
||
MODULE_FIRMWARE("nvidia/gp107/acr/unload_bl.bin"); | ||
MODULE_FIRMWARE("nvidia/gp107/acr/ucode_unload.bin"); | ||
|
||
MODULE_FIRMWARE("nvidia/gp102/acr/bl.bin"); | ||
MODULE_FIRMWARE("nvidia/gp102/acr/ucode_load.bin"); | ||
|
||
MODULE_FIRMWARE("nvidia/gp104/acr/bl.bin"); | ||
MODULE_FIRMWARE("nvidia/gp104/acr/ucode_load.bin"); | ||
|
||
MODULE_FIRMWARE("nvidia/gp106/acr/bl.bin"); | ||
MODULE_FIRMWARE("nvidia/gp106/acr/ucode_load.bin"); | ||
|
||
MODULE_FIRMWARE("nvidia/gp107/acr/bl.bin"); | ||
MODULE_FIRMWARE("nvidia/gp107/acr/ucode_load.bin"); | ||
|
||
static const struct nvkm_acr_func | ||
gp102_acr = { | ||
}; | ||
|
||
int | ||
gp102_acr_load(struct nvkm_acr *acr, int ver, const struct nvkm_acr_fwif *fwif) | ||
{ | ||
return 0; | ||
} | ||
|
||
static const struct nvkm_acr_fwif | ||
gp102_acr_fwif[] = { | ||
{ 0, gp102_acr_load, &gp102_acr }, | ||
{} | ||
}; | ||
|
||
int | ||
gp102_acr_new(struct nvkm_device *device, int index, struct nvkm_acr **pacr) | ||
{ | ||
return nvkm_acr_new_(gp102_acr_fwif, device, index, pacr); | ||
} |
Oops, something went wrong.