[PATCH v3 1/2] drm/amd/display: Add power_state member into dc_state

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

 



This can be used by the display core to let decisions be made based
upon the requested power state.

Cc: Qingqing Zhuo <qingqing.zhuo@xxxxxxx>
Cc: Scott Bruce <smbruce@xxxxxxxxx>
Cc: Chris Hixon <linux-kernel-bugs@xxxxxxxxxxxxx>
Cc: spasswolf@xxxxxx
Signed-off-by: Mario Limonciello <mario.limonciello@xxxxxxx>
---
changes from v2->v3:
 * New patch
 drivers/gpu/drm/amd/display/dc/core/dc.c        | 2 ++
 drivers/gpu/drm/amd/display/dc/inc/core_types.h | 1 +
 2 files changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c
index 91c4874473d6..2954485b474c 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
@@ -3281,6 +3281,8 @@ void dc_set_power_state(
 	if (!dc->current_state)
 		return;
 
+	dc->current_state->power_state = power_state;
+
 	switch (power_state) {
 	case DC_ACPI_CM_POWER_STATE_D0:
 		dc_resource_state_construct(dc, dc->current_state);
diff --git a/drivers/gpu/drm/amd/display/dc/inc/core_types.h b/drivers/gpu/drm/amd/display/dc/inc/core_types.h
index 943240e2809e..6bd0aeed1856 100644
--- a/drivers/gpu/drm/amd/display/dc/inc/core_types.h
+++ b/drivers/gpu/drm/amd/display/dc/inc/core_types.h
@@ -506,6 +506,7 @@ struct dc_state {
 	struct {
 		unsigned int stutter_period_us;
 	} perf_params;
+	enum dc_acpi_cm_power_state power_state;
 };
 
 #endif /* _CORE_TYPES_H_ */
-- 
2.25.1




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

  Powered by Linux