@@ -7439,6 +7439,34 @@ static void gfx_v9_0_ring_emit_cleaner_shader(struct amdgpu_ring *ring)
7439
7439
amdgpu_ring_write (ring , 0 ); /* RESERVED field, programmed to zero */
7440
7440
}
7441
7441
7442
+ static void gfx_v9_0_ring_begin_use_compute (struct amdgpu_ring * ring )
7443
+ {
7444
+ struct amdgpu_device * adev = ring -> adev ;
7445
+
7446
+ amdgpu_gfx_enforce_isolation_ring_begin_use (ring );
7447
+
7448
+ /* Raven and PCO APUs seem to have stability issues
7449
+ * with compute and gfxoff and gfx pg. Disable gfx pg during
7450
+ * submission and allow again afterwards.
7451
+ */
7452
+ if (amdgpu_ip_version (adev , GC_HWIP , 0 ) == IP_VERSION (9 , 1 , 0 ))
7453
+ gfx_v9_0_set_powergating_state (adev , AMD_PG_STATE_UNGATE );
7454
+ }
7455
+
7456
+ static void gfx_v9_0_ring_end_use_compute (struct amdgpu_ring * ring )
7457
+ {
7458
+ struct amdgpu_device * adev = ring -> adev ;
7459
+
7460
+ /* Raven and PCO APUs seem to have stability issues
7461
+ * with compute and gfxoff and gfx pg. Disable gfx pg during
7462
+ * submission and allow again afterwards.
7463
+ */
7464
+ if (amdgpu_ip_version (adev , GC_HWIP , 0 ) == IP_VERSION (9 , 1 , 0 ))
7465
+ gfx_v9_0_set_powergating_state (adev , AMD_PG_STATE_GATE );
7466
+
7467
+ amdgpu_gfx_enforce_isolation_ring_end_use (ring );
7468
+ }
7469
+
7442
7470
static const struct amd_ip_funcs gfx_v9_0_ip_funcs = {
7443
7471
.name = "gfx_v9_0" ,
7444
7472
.early_init = gfx_v9_0_early_init ,
@@ -7615,8 +7643,8 @@ static const struct amdgpu_ring_funcs gfx_v9_0_ring_funcs_compute = {
7615
7643
.emit_wave_limit = gfx_v9_0_emit_wave_limit ,
7616
7644
.reset = gfx_v9_0_reset_kcq ,
7617
7645
.emit_cleaner_shader = gfx_v9_0_ring_emit_cleaner_shader ,
7618
- .begin_use = amdgpu_gfx_enforce_isolation_ring_begin_use ,
7619
- .end_use = amdgpu_gfx_enforce_isolation_ring_end_use ,
7646
+ .begin_use = gfx_v9_0_ring_begin_use_compute ,
7647
+ .end_use = gfx_v9_0_ring_end_use_compute ,
7620
7648
};
7621
7649
7622
7650
static const struct amdgpu_ring_funcs gfx_v9_0_ring_funcs_kiq = {
0 commit comments