mirror of https://gitee.com/openkylin/linux.git
Merge branch 'linux-4.5' of git://github.com/skeggsb/linux into drm-fixes
single for for eDP panel issues on Lenovo P50 * 'linux-4.5' of git://github.com/skeggsb/linux: drm/nouveau/disp/dp: ensure sink is powered up before attempting link training
This commit is contained in:
commit
3772e72720
|
@ -328,6 +328,7 @@ nvkm_dp_train(struct work_struct *w)
|
||||||
.outp = outp,
|
.outp = outp,
|
||||||
}, *dp = &_dp;
|
}, *dp = &_dp;
|
||||||
u32 datarate = 0;
|
u32 datarate = 0;
|
||||||
|
u8 pwr;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (!outp->base.info.location && disp->func->sor.magic)
|
if (!outp->base.info.location && disp->func->sor.magic)
|
||||||
|
@ -355,6 +356,15 @@ nvkm_dp_train(struct work_struct *w)
|
||||||
/* disable link interrupt handling during link training */
|
/* disable link interrupt handling during link training */
|
||||||
nvkm_notify_put(&outp->irq);
|
nvkm_notify_put(&outp->irq);
|
||||||
|
|
||||||
|
/* ensure sink is not in a low-power state */
|
||||||
|
if (!nvkm_rdaux(outp->aux, DPCD_SC00, &pwr, 1)) {
|
||||||
|
if ((pwr & DPCD_SC00_SET_POWER) != DPCD_SC00_SET_POWER_D0) {
|
||||||
|
pwr &= ~DPCD_SC00_SET_POWER;
|
||||||
|
pwr |= DPCD_SC00_SET_POWER_D0;
|
||||||
|
nvkm_wraux(outp->aux, DPCD_SC00, &pwr, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* enable down-spreading and execute pre-train script from vbios */
|
/* enable down-spreading and execute pre-train script from vbios */
|
||||||
dp_link_train_init(dp, outp->dpcd[3] & 0x01);
|
dp_link_train_init(dp, outp->dpcd[3] & 0x01);
|
||||||
|
|
||||||
|
|
|
@ -71,5 +71,11 @@
|
||||||
#define DPCD_LS0C_LANE1_POST_CURSOR2 0x0c
|
#define DPCD_LS0C_LANE1_POST_CURSOR2 0x0c
|
||||||
#define DPCD_LS0C_LANE0_POST_CURSOR2 0x03
|
#define DPCD_LS0C_LANE0_POST_CURSOR2 0x03
|
||||||
|
|
||||||
|
/* DPCD Sink Control */
|
||||||
|
#define DPCD_SC00 0x00600
|
||||||
|
#define DPCD_SC00_SET_POWER 0x03
|
||||||
|
#define DPCD_SC00_SET_POWER_D0 0x01
|
||||||
|
#define DPCD_SC00_SET_POWER_D3 0x03
|
||||||
|
|
||||||
void nvkm_dp_train(struct work_struct *);
|
void nvkm_dp_train(struct work_struct *);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue