Commit 0bd4e9f7 authored by Ben Skeggs's avatar Ben Skeggs Committed by Lyude Paul

drm/nouveau/disp: move dp aux pwr method to HAL

- preparation for GSP-RM
Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
Reviewed-by: default avatarLyude Paul <lyude@redhat.com>
Acked-by: default avatarDanilo Krummrich <me@dakr.org>
Signed-off-by: default avatarLyude Paul <lyude@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230919220442.202488-27-lyude@redhat.com
parent e9c9b5b9
...@@ -41,6 +41,14 @@ ...@@ -41,6 +41,14 @@
*/ */
#define AMPERE_IED_HACK(disp) ((disp)->engine.subdev.device->card_type >= GA100) #define AMPERE_IED_HACK(disp) ((disp)->engine.subdev.device->card_type >= GA100)
static int
nvkm_dp_aux_pwr(struct nvkm_outp *outp, bool pu)
{
outp->dp.enabled = pu;
nvkm_dp_enable(outp, outp->dp.enabled);
return 0;
}
struct lt_state { struct lt_state {
struct nvkm_outp *outp; struct nvkm_outp *outp;
...@@ -814,6 +822,7 @@ nvkm_dp_func = { ...@@ -814,6 +822,7 @@ nvkm_dp_func = {
.disable = nvkm_dp_disable, .disable = nvkm_dp_disable,
.bl.get = nvkm_outp_bl_get, .bl.get = nvkm_outp_bl_get,
.bl.set = nvkm_outp_bl_set, .bl.set = nvkm_outp_bl_set,
.dp.aux_pwr = nvkm_dp_aux_pwr,
}; };
int int
......
...@@ -104,6 +104,10 @@ struct nvkm_outp_func { ...@@ -104,6 +104,10 @@ struct nvkm_outp_func {
int (*get)(struct nvkm_outp *); int (*get)(struct nvkm_outp *);
int (*set)(struct nvkm_outp *, int level); int (*set)(struct nvkm_outp *, int level);
} bl; } bl;
struct {
int (*aux_pwr)(struct nvkm_outp *, bool pu);
} dp;
}; };
#define OUTP_MSG(o,l,f,a...) do { \ #define OUTP_MSG(o,l,f,a...) do { \
......
...@@ -75,10 +75,10 @@ nvkm_uoutp_mthd_dp_aux_pwr(struct nvkm_outp *outp, void *argv, u32 argc) ...@@ -75,10 +75,10 @@ nvkm_uoutp_mthd_dp_aux_pwr(struct nvkm_outp *outp, void *argv, u32 argc)
if (argc != sizeof(args->v0) || args->v0.version != 0) if (argc != sizeof(args->v0) || args->v0.version != 0)
return -ENOSYS; return -ENOSYS;
if (!outp->func->dp.aux_pwr)
return -EINVAL;
outp->dp.enabled = !!args->v0.state; return outp->func->dp.aux_pwr(outp, !!args->v0.state);
nvkm_dp_enable(outp, outp->dp.enabled);
return 0;
} }
static int static int
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment