hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/drivers/gpu/drm/amd/display/dc/inc/hw/dmcu.h
....@@ -27,9 +27,22 @@
2727
2828 #include "dm_services_types.h"
2929
30
+/* If HW itself ever powered down it will be 0.
31
+ * fwDmcuInit will write to 1.
32
+ * Driver will only call MCP init if current state is 1,
33
+ * and the MCP command will transition this to 2.
34
+ */
3035 enum dmcu_state {
31
- DMCU_NOT_INITIALIZED = 0,
32
- DMCU_RUNNING = 1
36
+ DMCU_UNLOADED = 0,
37
+ DMCU_LOADED_UNINITIALIZED = 1,
38
+ DMCU_RUNNING = 2,
39
+};
40
+
41
+struct dmcu_version {
42
+ unsigned int interface_version;
43
+ unsigned int abm_version;
44
+ unsigned int psr_version;
45
+ unsigned int build_version;
3346 };
3447
3548 struct dmcu {
....@@ -39,6 +52,8 @@
3952 enum dmcu_state dmcu_state;
4053 struct dmcu_version dmcu_version;
4154 unsigned int cached_wait_loop_number;
55
+ uint32_t psp_version;
56
+ bool auto_load_dmcu;
4257 };
4358
4459 struct dmcu_funcs {
....@@ -57,6 +72,8 @@
5772 void (*get_psr_wait_loop)(struct dmcu *dmcu,
5873 unsigned int *psr_wait_loop_number);
5974 bool (*is_dmcu_initialized)(struct dmcu *dmcu);
75
+ bool (*lock_phy)(struct dmcu *dmcu);
76
+ bool (*unlock_phy)(struct dmcu *dmcu);
6077 };
6178
6279 #endif