diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2023-09-20 00:56:22 +0300 |
---|---|---|
committer | Lyude Paul <lyude@redhat.com> | 2023-09-20 01:22:11 +0300 |
commit | bd7a61bcbb50bfca1b9a585f17d5590dbb521b78 (patch) | |
tree | ee22bd210445deeeb5a68bf8089d54ffc8ea4d0f /drivers/gpu/drm/nouveau/nvif | |
parent | 0bd4e9f7dcd17003b7274b0608bf6575c6a07b88 (diff) | |
download | linux-bd7a61bcbb50bfca1b9a585f17d5590dbb521b78.tar.xz |
drm/nouveau/disp: add dp aux xfer method
- preparation for GSP-RM
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Acked-by: Danilo Krummrich <me@dakr.org>
Signed-off-by: Lyude Paul <lyude@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230919220442.202488-28-lyude@redhat.com
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvif')
-rw-r--r-- | drivers/gpu/drm/nouveau/nvif/outp.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nvif/outp.c b/drivers/gpu/drm/nouveau/nvif/outp.c index dbb0986f0555..df6e89379982 100644 --- a/drivers/gpu/drm/nouveau/nvif/outp.c +++ b/drivers/gpu/drm/nouveau/nvif/outp.c @@ -77,6 +77,30 @@ nvif_outp_acquire_dp(struct nvif_outp *outp, u8 dpcd[DP_RECEIVER_CAP_SIZE], } int +nvif_outp_dp_aux_xfer(struct nvif_outp *outp, u8 type, u8 *psize, u32 addr, u8 *data) +{ + struct nvif_outp_dp_aux_xfer_v0 args; + u8 size = *psize; + int ret; + + args.version = 0; + args.type = type; + args.size = size; + args.addr = addr; + memcpy(args.data, data, size); + ret = nvif_object_mthd(&outp->object, NVIF_OUTP_V0_DP_AUX_XFER, &args, sizeof(args)); + NVIF_DEBUG(&outp->object, "[DP_AUX_XFER type:%d size:%d addr:%05x] %d size:%d (ret: %d)", + args.type, size, args.addr, ret, args.size, ret); + if (ret < 0) + return ret; + + *psize = args.size; + + memcpy(data, args.data, size); + return ret; +} + +int nvif_outp_dp_aux_pwr(struct nvif_outp *outp, bool enable) { struct nvif_outp_dp_aux_pwr_v0 args; |