Skip to contentSkip to conversation

drm/amdgpu: Initialize pipe priority order on graphic initialization

PATCH In review ozeng 3 participants 3 messages Feb 11, 2017 – Feb 13, 2017 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

ozeng

author
#0 lore raw

PATCH 1/1 drm/amdgpu: Initialize pipe priority order on graphic initialization

Initialized PIPE_ORDER_TS0/1/2/3 field of SPI_ARB_PRIORITY register to 2. This set the pipe priority order to:
02 - HP3D, CS_H, GFX, CS_M, CS_L

Change-Id I1e89a2fdcf45a99808f0f5b3cbd83ae537174023
---
 drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 8 ++++++++
 drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 8 ++++++++
 2 files changed, 16 insertions(+)
drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c +8 -0
index 8dcb929..e9d6344 100644
@@ -1983,6 +1983,14 @@ static void gfx_v7_0_gpu_init(struct amdgpu_device *adev)
 	WREG32(mmPA_CL_ENHANCE, PA_CL_ENHANCE__CLIP_VTX_REORDER_ENA_MASK |
 			(3 << PA_CL_ENHANCE__NUM_CLIP_SEQ__SHIFT));
 	WREG32(mmPA_SC_ENHANCE, PA_SC_ENHANCE__ENABLE_PA_SC_OUT_OF_ORDER_MASK);
+
+	tmp = RREG32(mmSPI_ARB_PRIORITY);
+	tmp = REG_SET_FIELD(tmp, SPI_ARB_PRIORITY, PIPE_ORDER_TS0, 2);
+	tmp = REG_SET_FIELD(tmp, SPI_ARB_PRIORITY, PIPE_ORDER_TS1, 2);
+	tmp = REG_SET_FIELD(tmp, SPI_ARB_PRIORITY, PIPE_ORDER_TS2, 2);
+	tmp = REG_SET_FIELD(tmp, SPI_ARB_PRIORITY, PIPE_ORDER_TS3, 2);
+	WREG32(mmSPI_ARB_PRIORITY, tmp);
+
 	mutex_unlock(&adev->grbm_idx_mutex);
 
 	udelay(50);
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +8 -0
index 9542fed..772c42b 100644
@@ -3905,6 +3905,14 @@ static void gfx_v8_0_gpu_init(struct amdgpu_device *adev)
 			PA_SC_FIFO_SIZE__SC_HIZ_TILE_FIFO_SIZE__SHIFT) |
 		   (adev->gfx.config.sc_earlyz_tile_fifo_size <<
 			PA_SC_FIFO_SIZE__SC_EARLYZ_TILE_FIFO_SIZE__SHIFT));
+
+	tmp = RREG32(mmSPI_ARB_PRIORITY);
+	tmp = REG_SET_FIELD(tmp, SPI_ARB_PRIORITY, PIPE_ORDER_TS0, 2);
+	tmp = REG_SET_FIELD(tmp, SPI_ARB_PRIORITY, PIPE_ORDER_TS1, 2);
+	tmp = REG_SET_FIELD(tmp, SPI_ARB_PRIORITY, PIPE_ORDER_TS2, 2);
+	tmp = REG_SET_FIELD(tmp, SPI_ARB_PRIORITY, PIPE_ORDER_TS3, 2);
+	WREG32(mmSPI_ARB_PRIORITY, tmp);
+
 	mutex_unlock(&adev->grbm_idx_mutex);
 
 }
Signature · 6 lines
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 1486772826-4828-1-git-send-email-oak.zeng-5C7GfCeVMHo@public.gmane.org

Reviewed-by
#2 lore raw

Am 11.02.2017 um 01:27 schrieb ozeng:

Quoted 6 lines

Initialized PIPE_ORDER_TS0/1/2/3 field of SPI_ARB_PRIORITY register to 2. This set the pipe priority order to:
02 - HP3D, CS_H, GFX, CS_M, CS_L

Change-Id I1e89a2fdcf45a99808f0f5b3cbd83ae537174023
Quoted 33 lines
---
  drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 8 ++++++++
  drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 8 ++++++++
  2 files changed, 16 insertions(+)
drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c +8 -0
index 8dcb929..e9d6344 100644
@@ -1983,6 +1983,14 @@ static void gfx_v7_0_gpu_init(struct amdgpu_device *adev)
  	WREG32(mmPA_CL_ENHANCE, PA_CL_ENHANCE__CLIP_VTX_REORDER_ENA_MASK |
  			(3 << PA_CL_ENHANCE__NUM_CLIP_SEQ__SHIFT));
  	WREG32(mmPA_SC_ENHANCE, PA_SC_ENHANCE__ENABLE_PA_SC_OUT_OF_ORDER_MASK);
+
+	tmp = RREG32(mmSPI_ARB_PRIORITY);
+	tmp = REG_SET_FIELD(tmp, SPI_ARB_PRIORITY, PIPE_ORDER_TS0, 2);
+	tmp = REG_SET_FIELD(tmp, SPI_ARB_PRIORITY, PIPE_ORDER_TS1, 2);
+	tmp = REG_SET_FIELD(tmp, SPI_ARB_PRIORITY, PIPE_ORDER_TS2, 2);
+	tmp = REG_SET_FIELD(tmp, SPI_ARB_PRIORITY, PIPE_ORDER_TS3, 2);
+	WREG32(mmSPI_ARB_PRIORITY, tmp);
+
  	mutex_unlock(&adev->grbm_idx_mutex);
 
  	udelay(50);
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +1 -0
index 9542fed..772c42b 100644
@@ -3905,6 +3905,14 @@ static void gfx_v8_0_gpu_init(struct amdgpu_device *adev)
  			PA_SC_FIFO_SIZE__SC_HIZ_TILE_FIFO_SIZE__SHIFT) |
  		   (adev->gfx.config.sc_earlyz_tile_fifo_size <<
  			PA_SC_FIFO_SIZE__SC_EARLYZ_TILE_FIFO_SIZE__SHIFT));
+

drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c static void gfx_v8_0_gpu_init(struct amdgpu_device *adev) · line 3918

Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +7 -0
+	tmp = RREG32(mmSPI_ARB_PRIORITY);
+	tmp = REG_SET_FIELD(tmp, SPI_ARB_PRIORITY, PIPE_ORDER_TS0, 2);
+	tmp = REG_SET_FIELD(tmp, SPI_ARB_PRIORITY, PIPE_ORDER_TS1, 2);
+	tmp = REG_SET_FIELD(tmp, SPI_ARB_PRIORITY, PIPE_ORDER_TS2, 2);
+	tmp = REG_SET_FIELD(tmp, SPI_ARB_PRIORITY, PIPE_ORDER_TS3, 2);
+	WREG32(mmSPI_ARB_PRIORITY, tmp);
+
  	mutex_unlock(&adev->grbm_idx_mutex);
 
  }

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reviewed-by
#3 lore raw
In reply to a message not in the archive
Quoted 6 lines · ozeng

Initialized PIPE_ORDER_TS0/1/2/3 field of SPI_ARB_PRIORITY register to 2. This set the pipe priority order to:
02 - HP3D, CS_H, GFX, CS_M, CS_L

Change-Id I1e89a2fdcf45a99808f0f5b3cbd83ae537174023
Quoted 46 lines
---
 drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 8 ++++++++
 drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 8 ++++++++
 2 files changed, 16 insertions(+)
drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c +8 -0
index 8dcb929..e9d6344 100644
@@ -1983,6 +1983,14 @@ static void gfx_v7_0_gpu_init(struct amdgpu_device *adev)
        WREG32(mmPA_CL_ENHANCE, PA_CL_ENHANCE__CLIP_VTX_REORDER_ENA_MASK |
                        (3 << PA_CL_ENHANCE__NUM_CLIP_SEQ__SHIFT));
        WREG32(mmPA_SC_ENHANCE, PA_SC_ENHANCE__ENABLE_PA_SC_OUT_OF_ORDER_MASK);
+
+       tmp = RREG32(mmSPI_ARB_PRIORITY);
+       tmp = REG_SET_FIELD(tmp, SPI_ARB_PRIORITY, PIPE_ORDER_TS0, 2);
+       tmp = REG_SET_FIELD(tmp, SPI_ARB_PRIORITY, PIPE_ORDER_TS1, 2);
+       tmp = REG_SET_FIELD(tmp, SPI_ARB_PRIORITY, PIPE_ORDER_TS2, 2);
+       tmp = REG_SET_FIELD(tmp, SPI_ARB_PRIORITY, PIPE_ORDER_TS3, 2);
+       WREG32(mmSPI_ARB_PRIORITY, tmp);
+
        mutex_unlock(&adev->grbm_idx_mutex);
 
        udelay(50);
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +8 -1
index 9542fed..772c42b 100644
@@ -3905,6 +3905,14 @@ static void gfx_v8_0_gpu_init(struct amdgpu_device *adev)
                        PA_SC_FIFO_SIZE__SC_HIZ_TILE_FIFO_SIZE__SHIFT) |
                   (adev->gfx.config.sc_earlyz_tile_fifo_size <<
                        PA_SC_FIFO_SIZE__SC_EARLYZ_TILE_FIFO_SIZE__SHIFT));
+
+       tmp = RREG32(mmSPI_ARB_PRIORITY);
+       tmp = REG_SET_FIELD(tmp, SPI_ARB_PRIORITY, PIPE_ORDER_TS0, 2);
+       tmp = REG_SET_FIELD(tmp, SPI_ARB_PRIORITY, PIPE_ORDER_TS1, 2);
+       tmp = REG_SET_FIELD(tmp, SPI_ARB_PRIORITY, PIPE_ORDER_TS2, 2);
+       tmp = REG_SET_FIELD(tmp, SPI_ARB_PRIORITY, PIPE_ORDER_TS3, 2);
+       WREG32(mmSPI_ARB_PRIORITY, tmp);
+
        mutex_unlock(&adev->grbm_idx_mutex);
 
 }
--

2.7.4

Quoted 4 lines

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx