mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-05 18:14:07 +08:00
drm/nouveau/kms/nv50-: Remove (nv_encoder->crtc) checks in ->disable callbacks
Noticed these in both the disable (which we'll be getting rid of in a moment) and the atomic disable callbacks: both callback types check whether or not there's actually a CRTC assigned to the given encoder. However, as ->atomic_disable and ->disable will never be called without a CRTC assigned to the given encoder there's no point in this check. So just remove it. Signed-off-by: Lyude Paul <lyude@redhat.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
parent
f2fcb0692d
commit
f575f2bdb6
@ -474,7 +474,7 @@ nv50_dac_disable(struct drm_encoder *encoder, struct drm_atomic_state *state)
|
|||||||
struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder);
|
struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder);
|
||||||
struct nv50_core *core = nv50_disp(encoder->dev)->core;
|
struct nv50_core *core = nv50_disp(encoder->dev)->core;
|
||||||
const u32 ctrl = NVDEF(NV507D, DAC_SET_CONTROL, OWNER, NONE);
|
const u32 ctrl = NVDEF(NV507D, DAC_SET_CONTROL, OWNER, NONE);
|
||||||
if (nv_encoder->crtc)
|
|
||||||
core->func->dac->ctrl(core, nv_encoder->or, ctrl, NULL);
|
core->func->dac->ctrl(core, nv_encoder->or, ctrl, NULL);
|
||||||
nv_encoder->crtc = NULL;
|
nv_encoder->crtc = NULL;
|
||||||
nv50_outp_release(nv_encoder);
|
nv50_outp_release(nv_encoder);
|
||||||
@ -1636,13 +1636,11 @@ nv50_sor_disable(struct drm_encoder *encoder,
|
|||||||
struct nouveau_crtc *nv_crtc = nouveau_crtc(nv_encoder->crtc);
|
struct nouveau_crtc *nv_crtc = nouveau_crtc(nv_encoder->crtc);
|
||||||
struct nouveau_connector *nv_connector =
|
struct nouveau_connector *nv_connector =
|
||||||
nv50_outp_get_old_connector(nv_encoder, state);
|
nv50_outp_get_old_connector(nv_encoder, state);
|
||||||
|
|
||||||
nv_encoder->crtc = NULL;
|
|
||||||
|
|
||||||
if (nv_crtc) {
|
|
||||||
struct drm_dp_aux *aux = &nv_connector->aux;
|
struct drm_dp_aux *aux = &nv_connector->aux;
|
||||||
u8 pwr;
|
u8 pwr;
|
||||||
|
|
||||||
|
nv_encoder->crtc = NULL;
|
||||||
|
|
||||||
if (nv_encoder->dcb->type == DCB_OUTPUT_DP) {
|
if (nv_encoder->dcb->type == DCB_OUTPUT_DP) {
|
||||||
int ret = drm_dp_dpcd_readb(aux, DP_SET_POWER, &pwr);
|
int ret = drm_dp_dpcd_readb(aux, DP_SET_POWER, &pwr);
|
||||||
|
|
||||||
@ -1658,7 +1656,6 @@ nv50_sor_disable(struct drm_encoder *encoder,
|
|||||||
nv50_hdmi_disable(&nv_encoder->base.base, nv_crtc);
|
nv50_hdmi_disable(&nv_encoder->base.base, nv_crtc);
|
||||||
nv50_outp_release(nv_encoder);
|
nv50_outp_release(nv_encoder);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nv50_sor_enable(struct drm_encoder *encoder, struct drm_atomic_state *state)
|
nv50_sor_enable(struct drm_encoder *encoder, struct drm_atomic_state *state)
|
||||||
@ -1894,7 +1891,7 @@ nv50_pior_disable(struct drm_encoder *encoder, struct drm_atomic_state *state)
|
|||||||
struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder);
|
struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder);
|
||||||
struct nv50_core *core = nv50_disp(encoder->dev)->core;
|
struct nv50_core *core = nv50_disp(encoder->dev)->core;
|
||||||
const u32 ctrl = NVDEF(NV507D, PIOR_SET_CONTROL, OWNER, NONE);
|
const u32 ctrl = NVDEF(NV507D, PIOR_SET_CONTROL, OWNER, NONE);
|
||||||
if (nv_encoder->crtc)
|
|
||||||
core->func->pior->ctrl(core, nv_encoder->or, ctrl, NULL);
|
core->func->pior->ctrl(core, nv_encoder->or, ctrl, NULL);
|
||||||
nv_encoder->crtc = NULL;
|
nv_encoder->crtc = NULL;
|
||||||
nv50_outp_release(nv_encoder);
|
nv50_outp_release(nv_encoder);
|
||||||
|
Loading…
Reference in New Issue
Block a user