drm/gk104/clk: only touch divider for mode we'll be using
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
		
					parent
					
						
							
								bc1dfff04a
							
						
					
				
			
			
				commit
				
					
						1968a1e904
					
				
			
		
					 1 changed files with 5 additions and 3 deletions
				
			
		| 
						 | 
					@ -307,7 +307,6 @@ calc_clk(struct nve0_clock_priv *priv,
 | 
				
			||||||
		info->dsrc = src0;
 | 
							info->dsrc = src0;
 | 
				
			||||||
		if (div0) {
 | 
							if (div0) {
 | 
				
			||||||
			info->ddiv |= 0x80000000;
 | 
								info->ddiv |= 0x80000000;
 | 
				
			||||||
			info->ddiv |= div0 << 8;
 | 
					 | 
				
			||||||
			info->ddiv |= div0;
 | 
								info->ddiv |= div0;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		if (div1D) {
 | 
							if (div1D) {
 | 
				
			||||||
| 
						 | 
					@ -352,7 +351,7 @@ nve0_clock_prog_0(struct nve0_clock_priv *priv, int clk)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	struct nve0_clock_info *info = &priv->eng[clk];
 | 
						struct nve0_clock_info *info = &priv->eng[clk];
 | 
				
			||||||
	if (!info->ssel) {
 | 
						if (!info->ssel) {
 | 
				
			||||||
		nv_mask(priv, 0x1371d0 + (clk * 0x04), 0x80003f3f, info->ddiv);
 | 
							nv_mask(priv, 0x1371d0 + (clk * 0x04), 0x8000003f, info->ddiv);
 | 
				
			||||||
		nv_wr32(priv, 0x137160 + (clk * 0x04), info->dsrc);
 | 
							nv_wr32(priv, 0x137160 + (clk * 0x04), info->dsrc);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -389,7 +388,10 @@ static void
 | 
				
			||||||
nve0_clock_prog_3(struct nve0_clock_priv *priv, int clk)
 | 
					nve0_clock_prog_3(struct nve0_clock_priv *priv, int clk)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	struct nve0_clock_info *info = &priv->eng[clk];
 | 
						struct nve0_clock_info *info = &priv->eng[clk];
 | 
				
			||||||
	nv_mask(priv, 0x137250 + (clk * 0x04), 0x00003f3f, info->mdiv);
 | 
						if (info->ssel)
 | 
				
			||||||
 | 
							nv_mask(priv, 0x137250 + (clk * 0x04), 0x00003f00, info->mdiv);
 | 
				
			||||||
 | 
						else
 | 
				
			||||||
 | 
							nv_mask(priv, 0x137250 + (clk * 0x04), 0x0000003f, info->mdiv);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void
 | 
					static void
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue