igfx: fix FDI link training on ironlake
Ironlake uses bits 29:28 in the RX control register to select the training pattern.
This commit is contained in:
parent
9c02337fc3
commit
79c7e4514d
1 changed files with 19 additions and 8 deletions
|
@ -1465,12 +1465,17 @@ enablepipe(Igfx *igfx, int x)
|
||||||
/* unmask bit lock and symbol lock bits */
|
/* unmask bit lock and symbol lock bits */
|
||||||
csr(igfx, p->fdi->rximr.a, 3<<8, 0);
|
csr(igfx, p->fdi->rximr.a, 3<<8, 0);
|
||||||
|
|
||||||
p->fdi->txctl.v &= ~(3<<28); /* link train pattern1 */
|
/* enable fdi */
|
||||||
p->fdi->txctl.v |= 1<<31; /* enable */
|
p->fdi->txctl.v |= 1<<31;
|
||||||
loadreg(igfx, p->fdi->txctl);
|
p->fdi->rxctl.v |= 1<<31;
|
||||||
|
|
||||||
p->fdi->rxctl.v &= ~(3<<8); /* link train pattern1 */
|
/* switch to link train pattern1 */
|
||||||
p->fdi->rxctl.v |= 1<<31; /* enable */
|
p->fdi->txctl.v &= ~(3<<28);
|
||||||
|
loadreg(igfx, p->fdi->txctl);
|
||||||
|
if(igfx->type == TypeILK)
|
||||||
|
p->fdi->rxctl.v &= ~(3<<28);
|
||||||
|
else
|
||||||
|
p->fdi->rxctl.v &= ~(3<<8);
|
||||||
loadreg(igfx, p->fdi->rxctl);
|
loadreg(igfx, p->fdi->rxctl);
|
||||||
|
|
||||||
/* wait for bit lock */
|
/* wait for bit lock */
|
||||||
|
@ -1480,10 +1485,13 @@ enablepipe(Igfx *igfx, int x)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
csr(igfx, p->fdi->rxiir.a, 0, 1<<8);
|
csr(igfx, p->fdi->rxiir.a, 0, 1<<8);
|
||||||
|
|
||||||
/* switch to link train pattern2 */
|
/* switch to link train pattern2 */
|
||||||
csr(igfx, p->fdi->txctl.a, 3<<28, 1<<28);
|
csr(igfx, p->fdi->txctl.a, 3<<28, 1<<28);
|
||||||
csr(igfx, p->fdi->rxctl.a, 3<<8, 1<<8);
|
if(igfx->type == TypeILK)
|
||||||
|
csr(igfx, p->fdi->rxctl.a, 3<<28, 1<<28);
|
||||||
|
else
|
||||||
|
csr(igfx, p->fdi->rxctl.a, 3<<8, 1<<8);
|
||||||
|
|
||||||
/* wait for symbol lock */
|
/* wait for symbol lock */
|
||||||
for(i=0; i<10; i++){
|
for(i=0; i<10; i++){
|
||||||
|
@ -1495,7 +1503,10 @@ enablepipe(Igfx *igfx, int x)
|
||||||
|
|
||||||
/* switch to link train normal */
|
/* switch to link train normal */
|
||||||
csr(igfx, p->fdi->txctl.a, 0, 3<<28);
|
csr(igfx, p->fdi->txctl.a, 0, 3<<28);
|
||||||
csr(igfx, p->fdi->rxctl.a, 0, 3<<8);
|
if(igfx->type == TypeILK)
|
||||||
|
csr(igfx, p->fdi->rxctl.a, 0, 3<<28);
|
||||||
|
else
|
||||||
|
csr(igfx, p->fdi->rxctl.a, 0, 3<<8);
|
||||||
|
|
||||||
/* wait idle pattern time */
|
/* wait idle pattern time */
|
||||||
sleep(5);
|
sleep(5);
|
||||||
|
|
Loading…
Reference in a new issue