mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
drm/nouveau/pmu/gm20b: add msgqueue support
gm20b PMU firmware is driven by a msgqueue, so connect relevant PMU hooks to their msgqueue counterparts. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
parent
fc12745717
commit
937deb06d0
@ -20,15 +20,30 @@
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <engine/falcon.h>
|
||||
#include <core/msgqueue.h>
|
||||
#include "priv.h"
|
||||
|
||||
static void
|
||||
gm20b_pmu_recv(struct nvkm_pmu *pmu)
|
||||
{
|
||||
nvkm_msgqueue_recv(pmu->queue);
|
||||
}
|
||||
|
||||
static const struct nvkm_pmu_func
|
||||
gm20b_pmu = {
|
||||
.reset = gt215_pmu_reset,
|
||||
.intr = gt215_pmu_intr,
|
||||
.recv = gm20b_pmu_recv,
|
||||
};
|
||||
|
||||
int
|
||||
gm20b_pmu_new(struct nvkm_device *device, int index, struct nvkm_pmu **ppmu)
|
||||
{
|
||||
return nvkm_pmu_new_(&gm20b_pmu, device, index, ppmu);
|
||||
int ret;
|
||||
|
||||
ret = nvkm_pmu_new_(&gm20b_pmu, device, index, ppmu);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user