mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-18 16:44:27 +08:00
drm/nouveau/disp: rename internal output acquire/release functions
These will be made static later in the patch series, after the code that uses them has been cleaned up in preparation for GSP-RM support. 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-10-lyude@redhat.com
This commit is contained in:
parent
0cd7e07181
commit
8a7783c791
@ -89,7 +89,7 @@ nvkm_outp_xlat(struct nvkm_outp *outp, enum nvkm_ior_type *type)
|
||||
}
|
||||
|
||||
void
|
||||
nvkm_outp_release(struct nvkm_outp *outp, u8 user)
|
||||
nvkm_outp_release_or(struct nvkm_outp *outp, u8 user)
|
||||
{
|
||||
struct nvkm_ior *ior = outp->ior;
|
||||
OUTP_TRACE(outp, "release %02x &= %02x %p", outp->acquired, ~user, ior);
|
||||
@ -142,7 +142,7 @@ nvkm_outp_acquire_hda(struct nvkm_outp *outp, enum nvkm_ior_type type,
|
||||
}
|
||||
|
||||
int
|
||||
nvkm_outp_acquire(struct nvkm_outp *outp, u8 user, bool hda)
|
||||
nvkm_outp_acquire_or(struct nvkm_outp *outp, u8 user, bool hda)
|
||||
{
|
||||
struct nvkm_ior *ior = outp->ior;
|
||||
enum nvkm_ior_proto proto;
|
||||
@ -234,6 +234,12 @@ nvkm_outp_detect(struct nvkm_outp *outp)
|
||||
return ret;
|
||||
}
|
||||
|
||||
void
|
||||
nvkm_outp_release(struct nvkm_outp *outp)
|
||||
{
|
||||
nvkm_outp_release_or(outp, NVKM_OUTP_USER);
|
||||
}
|
||||
|
||||
void
|
||||
nvkm_outp_fini(struct nvkm_outp *outp)
|
||||
{
|
||||
|
@ -77,8 +77,9 @@ void nvkm_outp_fini(struct nvkm_outp *);
|
||||
|
||||
int nvkm_outp_detect(struct nvkm_outp *);
|
||||
|
||||
int nvkm_outp_acquire(struct nvkm_outp *, u8 user, bool hda);
|
||||
void nvkm_outp_release(struct nvkm_outp *, u8 user);
|
||||
int nvkm_outp_acquire_or(struct nvkm_outp *, u8 user, bool hda);
|
||||
void nvkm_outp_release(struct nvkm_outp *);
|
||||
void nvkm_outp_release_or(struct nvkm_outp *, u8 user);
|
||||
void nvkm_outp_route(struct nvkm_disp *);
|
||||
|
||||
struct nvkm_outp_func {
|
||||
|
@ -141,7 +141,7 @@ nvkm_uoutp_mthd_release(struct nvkm_outp *outp, void *argv, u32 argc)
|
||||
ior->func->hdmi->ctrl(ior, head->id, false, 0, 0);
|
||||
}
|
||||
|
||||
nvkm_outp_release(outp, NVKM_OUTP_USER);
|
||||
nvkm_outp_release(outp);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -151,7 +151,7 @@ nvkm_uoutp_mthd_acquire_dp(struct nvkm_outp *outp, u8 dpcd[DP_RECEIVER_CAP_SIZE]
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = nvkm_outp_acquire(outp, NVKM_OUTP_USER, hda);
|
||||
ret = nvkm_outp_acquire_or(outp, NVKM_OUTP_USER, hda);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
@ -172,7 +172,7 @@ nvkm_uoutp_mthd_acquire_tmds(struct nvkm_outp *outp, u8 head, u8 hdmi, u8 hdmi_m
|
||||
if (!(outp->asy.head = nvkm_head_find(outp->disp, head)))
|
||||
return -EINVAL;
|
||||
|
||||
ret = nvkm_outp_acquire(outp, NVKM_OUTP_USER, hdmi && hdmi_hda);
|
||||
ret = nvkm_outp_acquire_or(outp, NVKM_OUTP_USER, hdmi && hdmi_hda);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
@ -182,7 +182,7 @@ nvkm_uoutp_mthd_acquire_tmds(struct nvkm_outp *outp, u8 head, u8 hdmi, u8 hdmi_m
|
||||
if (!ior->func->hdmi ||
|
||||
hdmi_max_ac_packet > 0x1f || hdmi_rekey > 0x7f ||
|
||||
(hdmi_scdc && !ior->func->hdmi->scdc)) {
|
||||
nvkm_outp_release(outp, NVKM_OUTP_USER);
|
||||
nvkm_outp_release_or(outp, NVKM_OUTP_USER);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@ -203,7 +203,7 @@ nvkm_uoutp_mthd_acquire_lvds(struct nvkm_outp *outp, bool dual, bool bpc8)
|
||||
outp->lvds.dual = dual;
|
||||
outp->lvds.bpc8 = bpc8;
|
||||
|
||||
return nvkm_outp_acquire(outp, NVKM_OUTP_USER, false);
|
||||
return nvkm_outp_acquire_or(outp, NVKM_OUTP_USER, false);
|
||||
}
|
||||
|
||||
static int
|
||||
@ -219,7 +219,7 @@ nvkm_uoutp_mthd_acquire(struct nvkm_outp *outp, void *argv, u32 argc)
|
||||
|
||||
switch (args->v0.proto) {
|
||||
case NVIF_OUTP_ACQUIRE_V0_RGB_CRT:
|
||||
ret = nvkm_outp_acquire(outp, NVKM_OUTP_USER, false);
|
||||
ret = nvkm_outp_acquire_or(outp, NVKM_OUTP_USER, false);
|
||||
break;
|
||||
case NVIF_OUTP_ACQUIRE_V0_TMDS:
|
||||
ret = nvkm_uoutp_mthd_acquire_tmds(outp, args->v0.tmds.head,
|
||||
@ -261,7 +261,7 @@ nvkm_uoutp_mthd_load_detect(struct nvkm_outp *outp, void *argv, u32 argc)
|
||||
if (argc != sizeof(args->v0) || args->v0.version != 0)
|
||||
return -ENOSYS;
|
||||
|
||||
ret = nvkm_outp_acquire(outp, NVKM_OUTP_PRIV, false);
|
||||
ret = nvkm_outp_acquire_or(outp, NVKM_OUTP_PRIV, false);
|
||||
if (ret == 0) {
|
||||
if (outp->ior->func->sense) {
|
||||
ret = outp->ior->func->sense(outp->ior, args->v0.data);
|
||||
@ -269,7 +269,7 @@ nvkm_uoutp_mthd_load_detect(struct nvkm_outp *outp, void *argv, u32 argc)
|
||||
} else {
|
||||
ret = -EINVAL;
|
||||
}
|
||||
nvkm_outp_release(outp, NVKM_OUTP_PRIV);
|
||||
nvkm_outp_release_or(outp, NVKM_OUTP_PRIV);
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
Loading…
Reference in New Issue
Block a user