Skip to contentSkip to conversation

drm/amdgpu/jpeg1.0: fix idle work handler

PATCH In review Alex Deucher 2 participants 2 messages Nov 22, 2024

Subsystems (2)
lore
Share & tools
lore

Alex Deucher

author maintainer
#0 lore raw

PATCH 1/1 drm/amdgpu/jpeg1.0: fix idle work handler

On VCN 1.0, VCN and JPEG use the same worker thread so cancel the vcn worker rather than jpeg. On VCN 2.0 and newer there are separate workers for each.

Fixes 93df74873703 ("drm/amdgpu/jpeg: cancel the jpeg worker")
---
 drivers/gpu/drm/amd/amdgpu/jpeg_v1_0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/jpeg_v1_0.c +1 -1
index 7319299f25ae..03b8b7cd5229 100644
@@ -604,7 +604,7 @@ static void jpeg_v1_0_set_irq_funcs(struct amdgpu_device *adev)
 static void jpeg_v1_0_ring_begin_use(struct amdgpu_ring *ring)
 {
 	struct	amdgpu_device *adev = ring->adev;
-	bool	set_clocks = !cancel_delayed_work_sync(&adev->jpeg.idle_work);
+	bool	set_clocks = !cancel_delayed_work_sync(&adev->vcn.idle_work);
 	int		cnt = 0;
 
 	mutex_lock(&adev->vcn.vcn1_jpeg1_workaround);
Signature · 1 line
2.47.0
Tested-by on v1 1/1
#1 lore raw

[AMD Official Use Only - AMD Internal Distribution Only]

Quoted 8 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: Friday, November 22, 2024 2:04 PM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: [PATCH] drm/amdgpu/jpeg1.0: fix idle work handler

Quoted 5 lines

On VCN 1.0, VCN and JPEG use the same worker thread so cancel the vcn worker rather than jpeg. On VCN 2.0 and newer there are separate workers for each.

Fixes 93df74873703 ("drm/amdgpu/jpeg: cancel the jpeg worker")
Quoted 19 lines
---
 drivers/gpu/drm/amd/amdgpu/jpeg_v1_0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/jpeg_v1_0.c +1 -2
index 7319299f25ae..03b8b7cd5229 100644
@@ -604,7 +604,7 @@ static void jpeg_v1_0_set_irq_funcs(struct amdgpu_device
 *adev)  static void jpeg_v1_0_ring_begin_use(struct amdgpu_ring *ring)  {
      struct  amdgpu_device *adev = ring->adev;
-     bool    set_clocks = !cancel_delayed_work_sync(&adev->jpeg.idle_work);
+     bool    set_clocks = !cancel_delayed_work_sync(&adev->vcn.idle_work);
      int             cnt = 0;
 
      mutex_lock(&adev->vcn.vcn1_jpeg1_workaround);
--

2.47.0