Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/amdgpu: Change set ip clock/power gating param

It's not required to use generic void *, change to struct amdgpu_device *.

Signed-off-by: Lijo Lazar <lijo.lazar@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Lijo Lazar and committed by
Alex Deucher
81af7f17 9498d187

+6 -8
+4 -6
drivers/gpu/drm/amd/amdgpu/amdgpu_ip.c
··· 254 254 /** 255 255 * amdgpu_device_ip_set_clockgating_state - set the CG state 256 256 * 257 - * @dev: amdgpu_device pointer 257 + * @adev: amdgpu_device pointer 258 258 * @block_type: Type of hardware IP (SMU, GFX, UVD, etc.) 259 259 * @state: clockgating state (gate or ungate) 260 260 * ··· 262 262 * the hardware IP specified. 263 263 * Returns the error code from the last instance. 264 264 */ 265 - int amdgpu_device_ip_set_clockgating_state(void *dev, 265 + int amdgpu_device_ip_set_clockgating_state(struct amdgpu_device *adev, 266 266 enum amd_ip_block_type block_type, 267 267 enum amd_clockgating_state state) 268 268 { 269 - struct amdgpu_device *adev = dev; 270 269 int i, r = 0; 271 270 272 271 for (i = 0; i < adev->num_ip_blocks; i++) { ··· 288 289 /** 289 290 * amdgpu_device_ip_set_powergating_state - set the PG state 290 291 * 291 - * @dev: amdgpu_device pointer 292 + * @adev: amdgpu_device pointer 292 293 * @block_type: Type of hardware IP (SMU, GFX, UVD, etc.) 293 294 * @state: powergating state (gate or ungate) 294 295 * ··· 296 297 * the hardware IP specified. 297 298 * Returns the error code from the last instance. 298 299 */ 299 - int amdgpu_device_ip_set_powergating_state(void *dev, 300 + int amdgpu_device_ip_set_powergating_state(struct amdgpu_device *adev, 300 301 enum amd_ip_block_type block_type, 301 302 enum amd_powergating_state state) 302 303 { 303 - struct amdgpu_device *adev = dev; 304 304 int i, r = 0; 305 305 306 306 for (i = 0; i < adev->num_ip_blocks; i++) {
+2 -2
drivers/gpu/drm/amd/amdgpu/amdgpu_ip.h
··· 136 136 struct amdgpu_device *adev, 137 137 const struct amdgpu_ip_block_version *ip_block_version); 138 138 139 - int amdgpu_device_ip_set_clockgating_state(void *dev, 139 + int amdgpu_device_ip_set_clockgating_state(struct amdgpu_device *adev, 140 140 enum amd_ip_block_type block_type, 141 141 enum amd_clockgating_state state); 142 - int amdgpu_device_ip_set_powergating_state(void *dev, 142 + int amdgpu_device_ip_set_powergating_state(struct amdgpu_device *adev, 143 143 enum amd_ip_block_type block_type, 144 144 enum amd_powergating_state state); 145 145 void amdgpu_device_ip_get_clockgating_state(struct amdgpu_device *adev,