aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nvif
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2022-06-01 20:46:31 +1000
committerDave Airlie <airlied@redhat.com>2022-07-27 09:05:49 +1000
commitdfc4005f8c172eea359f9db08c3b2b0ff0153699 (patch)
treeab50f1d71db28fe8de42155025606ba209fcba36 /drivers/gpu/drm/nouveau/nvif
parentdrm/nouveau/disp: add output class (diff)
downloadlinux-dev-dfc4005f8c172eea359f9db08c3b2b0ff0153699.tar.xz
linux-dev-dfc4005f8c172eea359f9db08c3b2b0ff0153699.zip
drm/nouveau/disp: move DAC load detection method
Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvif')
-rw-r--r--drivers/gpu/drm/nouveau/nvif/outp.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nvif/outp.c b/drivers/gpu/drm/nouveau/nvif/outp.c
index 5a231bf7db96..7bfe91a8d6f9 100644
--- a/drivers/gpu/drm/nouveau/nvif/outp.c
+++ b/drivers/gpu/drm/nouveau/nvif/outp.c
@@ -26,6 +26,20 @@
#include <nvif/class.h>
#include <nvif/if0012.h>
+int
+nvif_outp_load_detect(struct nvif_outp *outp, u32 loadval)
+{
+ struct nvif_outp_load_detect_v0 args;
+ int ret;
+
+ args.version = 0;
+ args.data = loadval;
+
+ ret = nvif_mthd(&outp->object, NVIF_OUTP_V0_LOAD_DETECT, &args, sizeof(args));
+ NVIF_ERRON(ret, &outp->object, "[LOAD_DETECT data:%08x] load:%02x", args.data, args.load);
+ return ret < 0 ? ret : args.load;
+}
+
void
nvif_outp_dtor(struct nvif_outp *outp)
{