mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 02:30:34 +02:00 
			
		
		
		
	drm/amdgpu: define and add extra dword for jpeg ring
Define extra dword for jpeg ring. Jpeg ring will allocate extra dword to store the patch commands for fixing the known issue. v2: dropping extra_dw for rings other than jpeg. Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
		
							parent
							
								
									8a998052f2
								
							
						
					
					
						commit
						c8c1a1d2ef
					
				
					 3 changed files with 3 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -304,7 +304,7 @@ int amdgpu_ring_init(struct amdgpu_device *adev, struct amdgpu_ring *ring,
 | 
			
		|||
		0xffffffffffffffff : ring->buf_mask;
 | 
			
		||||
	/* Allocate ring buffer */
 | 
			
		||||
	if (ring->ring_obj == NULL) {
 | 
			
		||||
		r = amdgpu_bo_create_kernel(adev, ring->ring_size, PAGE_SIZE,
 | 
			
		||||
		r = amdgpu_bo_create_kernel(adev, ring->ring_size + ring->funcs->extra_dw, PAGE_SIZE,
 | 
			
		||||
					    AMDGPU_GEM_DOMAIN_GTT,
 | 
			
		||||
					    &ring->ring_obj,
 | 
			
		||||
					    &ring->gpu_addr,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -113,6 +113,7 @@ struct amdgpu_ring_funcs {
 | 
			
		|||
	u32			nop;
 | 
			
		||||
	bool			support_64bit_ptrs;
 | 
			
		||||
	unsigned		vmhub;
 | 
			
		||||
	unsigned		extra_dw;
 | 
			
		||||
 | 
			
		||||
	/* ring read/write ptr handling */
 | 
			
		||||
	u64 (*get_rptr)(struct amdgpu_ring *ring);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1690,6 +1690,7 @@ static const struct amdgpu_ring_funcs vcn_v1_0_jpeg_ring_vm_funcs = {
 | 
			
		|||
	.nop = PACKET0(0x81ff, 0),
 | 
			
		||||
	.support_64bit_ptrs = false,
 | 
			
		||||
	.vmhub = AMDGPU_MMHUB,
 | 
			
		||||
	.extra_dw = 64,
 | 
			
		||||
	.get_rptr = vcn_v1_0_jpeg_ring_get_rptr,
 | 
			
		||||
	.get_wptr = vcn_v1_0_jpeg_ring_get_wptr,
 | 
			
		||||
	.set_wptr = vcn_v1_0_jpeg_ring_set_wptr,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue