On Mon, Dec 8, 2025 at 2:34 AM Lijo Lazar <[email protected]> wrote: > > It's not required to use generic void *, change to struct amdgpu_device *. > > Signed-off-by: Lijo Lazar <[email protected]>
Series is: Reviewed-by: Alex Deucher <[email protected]> > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_ip.c | 10 ++++------ > drivers/gpu/drm/amd/amdgpu/amdgpu_ip.h | 4 ++-- > 2 files changed, 6 insertions(+), 8 deletions(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ip.c > b/drivers/gpu/drm/amd/amdgpu/amdgpu_ip.c > index 677f730e2654..6aa54156bbc9 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ip.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ip.c > @@ -254,7 +254,7 @@ int amdgpu_device_ip_block_add( > /** > * amdgpu_device_ip_set_clockgating_state - set the CG state > * > - * @dev: amdgpu_device pointer > + * @adev: amdgpu_device pointer > * @block_type: Type of hardware IP (SMU, GFX, UVD, etc.) > * @state: clockgating state (gate or ungate) > * > @@ -262,11 +262,10 @@ int amdgpu_device_ip_block_add( > * the hardware IP specified. > * Returns the error code from the last instance. > */ > -int amdgpu_device_ip_set_clockgating_state(void *dev, > +int amdgpu_device_ip_set_clockgating_state(struct amdgpu_device *adev, > enum amd_ip_block_type block_type, > enum amd_clockgating_state state) > { > - struct amdgpu_device *adev = dev; > int i, r = 0; > > for (i = 0; i < adev->num_ip_blocks; i++) { > @@ -289,7 +288,7 @@ int amdgpu_device_ip_set_clockgating_state(void *dev, > /** > * amdgpu_device_ip_set_powergating_state - set the PG state > * > - * @dev: amdgpu_device pointer > + * @adev: amdgpu_device pointer > * @block_type: Type of hardware IP (SMU, GFX, UVD, etc.) > * @state: powergating state (gate or ungate) > * > @@ -297,11 +296,10 @@ int amdgpu_device_ip_set_clockgating_state(void *dev, > * the hardware IP specified. > * Returns the error code from the last instance. > */ > -int amdgpu_device_ip_set_powergating_state(void *dev, > +int amdgpu_device_ip_set_powergating_state(struct amdgpu_device *adev, > enum amd_ip_block_type block_type, > enum amd_powergating_state state) > { > - struct amdgpu_device *adev = dev; > int i, r = 0; > > for (i = 0; i < adev->num_ip_blocks; i++) { > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ip.h > b/drivers/gpu/drm/amd/amdgpu/amdgpu_ip.h > index 77d1c642953c..1d0df6d93957 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ip.h > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ip.h > @@ -136,10 +136,10 @@ int amdgpu_device_ip_block_add( > struct amdgpu_device *adev, > const struct amdgpu_ip_block_version *ip_block_version); > > -int amdgpu_device_ip_set_clockgating_state(void *dev, > +int amdgpu_device_ip_set_clockgating_state(struct amdgpu_device *adev, > enum amd_ip_block_type block_type, > enum amd_clockgating_state state); > -int amdgpu_device_ip_set_powergating_state(void *dev, > +int amdgpu_device_ip_set_powergating_state(struct amdgpu_device *adev, > enum amd_ip_block_type block_type, > enum amd_powergating_state state); > void amdgpu_device_ip_get_clockgating_state(struct amdgpu_device *adev, > -- > 2.49.0 >
