[PATCH v2 7/8] drm/amdgpu: Make set PG/CG state functions public

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[AMD Public Use]


Expose PG/CG set states functions for other clients

 

Signed-off-by: Lijo Lazar lijo.lazar@xxxxxxx

---

drivers/gpu/drm/amd/amdgpu/amdgpu.h        | 5 +++++

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 7 ++++---

2 files changed, 9 insertions(+), 3 deletions(-)

 

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h

index af8680727800..dea99f0e5703 100644

--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h

+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h

@@ -1394,6 +1394,11 @@ bool amdgpu_device_load_pci_state(struct pci_dev *pdev);

 bool amdgpu_device_skip_hw_access(struct amdgpu_device *adev);

+int amdgpu_device_set_cg_state(struct amdgpu_device *adev,

+                                                    enum amd_clockgating_state state);

+int amdgpu_device_set_pg_state(struct amdgpu_device *adev,

+                                                    enum amd_powergating_state state);

+

#include "amdgpu_object.h"

 static inline bool amdgpu_is_tmz(struct amdgpu_device *adev)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

index 6d6da1b504aa..b1b83d282090 100644

--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

@@ -2362,8 +2362,8 @@ static bool amdgpu_device_check_vram_lost(struct amdgpu_device *adev)

  * Returns 0 on success, negative error code on failure.

  */

-static int amdgpu_device_set_cg_state(struct amdgpu_device *adev,

-                                                                                              enum amd_clockgating_state state)

+int amdgpu_device_set_cg_state(struct amdgpu_device *adev,

+                                                    enum amd_clockgating_state state)

{

               int i, j, r;

@@ -2398,7 +2398,8 @@ static int amdgpu_device_set_cg_state(struct amdgpu_device *adev,

               return 0;

}

-static int amdgpu_device_set_pg_state(struct amdgpu_device *adev, enum amd_powergating_state state)

+int amdgpu_device_set_pg_state(struct amdgpu_device *adev,

+                                                    enum amd_powergating_state state)

{

               int i, j, r;

--

2.17.1

 

_______________________________________________
amd-gfx mailing list
amd-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux