diff options
author | michael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-04-23 01:31:01 +0000 |
---|---|---|
committer | michael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-04-23 01:31:01 +0000 |
commit | f989059977ef4b58985ee04b0b03868623144585 (patch) | |
tree | f236c264c6bd5bbbc9120c847a67e624abbfdc9a /vidix/drivers/mach64_vid.c | |
parent | 1c3d3ba81a575606cb20237a6a81e4765a46d2df (diff) |
reading pll in 32-bit instead of 8-bit +1, +2
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@5793 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'vidix/drivers/mach64_vid.c')
-rw-r--r-- | vidix/drivers/mach64_vid.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/vidix/drivers/mach64_vid.c b/vidix/drivers/mach64_vid.c index eb80e0ca30..a91a753845 100644 --- a/vidix/drivers/mach64_vid.c +++ b/vidix/drivers/mach64_vid.c @@ -147,20 +147,18 @@ static __inline__ uint32_t INPLL(uint32_t addr) uint32_t res; uint32_t in; - /* preserve unknown bits */ - in= INREG8(CLOCK_CNTL + 1); - if(__verbose>0)printf("[mach64] pll: %X\n", in); - in &= ~((PLL_WR_EN | PLL_ADDR)>>8); //clean some stuff + in= INREG(CLOCK_CNTL); + in &= ~((PLL_WR_EN | PLL_ADDR)); //clean some stuff + OUTREG(CLOCK_CNTL, in | (addr<<10)); - /* write addr byte */ - OUTREG8(CLOCK_CNTL + 1, in | (addr << 2)); /* read the register value */ - res = INREG8(CLOCK_CNTL + 2); + res = (INREG(CLOCK_CNTL)>>16)&0xFF; return res; } static __inline__ void OUTPLL(uint32_t addr,uint32_t val) { +//FIXME buggy but its not used /* write addr byte */ OUTREG8(CLOCK_CNTL + 1, (addr << 2) | PLL_WR_EN); /* write the register value */ @@ -737,6 +735,14 @@ static int mach64_vid_init_video( vidix_playback_t *config ) dest_h = config->dest.h; besr.fourcc = config->fourcc; ecp = (INPLL(PLL_VCLK_CNTL) & PLL_ECP_DIV) >> 4; +#if 0 +{ +int i; +for(i=0; i<32; i++){ + printf("%X ", INPLL(i)); +} +} +#endif if(__verbose>0) printf("[mach64] ecp: %d\n", ecp); v_inc = src_h * mach64_get_vert_stretch(); |