@@ -7415,6 +7415,34 @@ static void gfx_v9_0_ring_emit_cleaner_shader(struct amdgpu_ring *ring)
7415
7415
amdgpu_ring_write (ring , 0 ); /* RESERVED field, programmed to zero */
7416
7416
}
7417
7417
7418
+ static void gfx_v9_0_ring_begin_use_compute (struct amdgpu_ring * ring )
7419
+ {
7420
+ struct amdgpu_device * adev = ring -> adev ;
7421
+
7422
+ amdgpu_gfx_enforce_isolation_ring_begin_use (ring );
7423
+
7424
+ /* Raven and PCO APUs seem to have stability issues
7425
+ * with compute and gfxoff and gfx pg. Disable gfx pg during
7426
+ * submission and allow again afterwards.
7427
+ */
7428
+ if (amdgpu_ip_version (adev , GC_HWIP , 0 ) == IP_VERSION (9 , 1 , 0 ))
7429
+ gfx_v9_0_set_powergating_state (adev , AMD_PG_STATE_UNGATE );
7430
+ }
7431
+
7432
+ static void gfx_v9_0_ring_end_use_compute (struct amdgpu_ring * ring )
7433
+ {
7434
+ struct amdgpu_device * adev = ring -> adev ;
7435
+
7436
+ /* Raven and PCO APUs seem to have stability issues
7437
+ * with compute and gfxoff and gfx pg. Disable gfx pg during
7438
+ * submission and allow again afterwards.
7439
+ */
7440
+ if (amdgpu_ip_version (adev , GC_HWIP , 0 ) == IP_VERSION (9 , 1 , 0 ))
7441
+ gfx_v9_0_set_powergating_state (adev , AMD_PG_STATE_GATE );
7442
+
7443
+ amdgpu_gfx_enforce_isolation_ring_end_use (ring );
7444
+ }
7445
+
7418
7446
static const struct amd_ip_funcs gfx_v9_0_ip_funcs = {
7419
7447
.name = "gfx_v9_0" ,
7420
7448
.early_init = gfx_v9_0_early_init ,
@@ -7591,8 +7619,8 @@ static const struct amdgpu_ring_funcs gfx_v9_0_ring_funcs_compute = {
7591
7619
.emit_wave_limit = gfx_v9_0_emit_wave_limit ,
7592
7620
.reset = gfx_v9_0_reset_kcq ,
7593
7621
.emit_cleaner_shader = gfx_v9_0_ring_emit_cleaner_shader ,
7594
- .begin_use = amdgpu_gfx_enforce_isolation_ring_begin_use ,
7595
- .end_use = amdgpu_gfx_enforce_isolation_ring_end_use ,
7622
+ .begin_use = gfx_v9_0_ring_begin_use_compute ,
7623
+ .end_use = gfx_v9_0_ring_end_use_compute ,
7596
7624
};
7597
7625
7598
7626
static const struct amdgpu_ring_funcs gfx_v9_0_ring_funcs_kiq = {
0 commit comments