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

drm/amd/display: Update DMUB flags and definitions

[WHAT]
- Update replay residency tracing design to support more types
including tracking PHY and ALPM residency types
- Add commands for Replay frame update count profiling
- Enhance HWFQ with additional flags to allow for more
optimized IPS low power state residencies
- Add new flag to indicate if a new frame update needed for
ABM to ramp up into steady state

Acked-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Anthony Koo <anthony.koo@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Anthony Koo and committed by
Alex Deucher
2c8c7a2c d1b2703c

+38 -4
+1 -1
drivers/gpu/drm/amd/display/dc/dce/dmub_replay.c
··· 244 244 uint16_t param = (uint16_t)(panel_inst << 8); 245 245 246 246 if (is_alpm) 247 - param |= REPLAY_RESIDENCY_MODE_ALPM; 247 + param |= REPLAY_RESIDENCY_FIELD_MODE_ALPM; 248 248 249 249 if (is_start) 250 250 param |= REPLAY_RESIDENCY_ENABLE;
+37 -3
drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h
··· 194 194 * of user backlight level. 195 195 */ 196 196 unsigned int abm_gradual_bl_change : 1; 197 + 198 + /** 199 + * @abm_new_frame: Indicates if a new frame update needed for ABM to ramp up into steady 200 + */ 201 + unsigned int abm_new_frame : 1; 197 202 } bitfields; 198 203 199 204 unsigned int u32All; ··· 2942 2937 struct dmub_cmd_psr_set_power_opt_data psr_set_power_opt_data; 2943 2938 }; 2944 2939 2940 + /** 2941 + * Definition of Replay Residency GPINT command. 2942 + * Bit[0] - Residency mode for Revision 0 2943 + * Bit[1] - Enable/Disable state 2944 + * Bit[2-3] - Revision number 2945 + * Bit[4-7] - Residency mode for Revision 1 2946 + * Bit[8] - Panel instance 2947 + * Bit[9-15] - Reserved 2948 + */ 2949 + 2950 + enum pr_residency_mode { 2951 + PR_RESIDENCY_MODE_PHY = 0x0, 2952 + PR_RESIDENCY_MODE_ALPM, 2953 + PR_RESIDENCY_MODE_IPS2, 2954 + PR_RESIDENCY_MODE_FRAME_CNT, 2955 + }; 2956 + 2945 2957 #define REPLAY_RESIDENCY_MODE_SHIFT (0) 2946 2958 #define REPLAY_RESIDENCY_ENABLE_SHIFT (1) 2959 + #define REPLAY_RESIDENCY_REVISION_SHIFT (2) 2960 + #define REPLAY_RESIDENCY_MODE2_SHIFT (4) 2947 2961 2948 2962 #define REPLAY_RESIDENCY_MODE_MASK (0x1 << REPLAY_RESIDENCY_MODE_SHIFT) 2949 - # define REPLAY_RESIDENCY_MODE_PHY (0x0 << REPLAY_RESIDENCY_MODE_SHIFT) 2950 - # define REPLAY_RESIDENCY_MODE_ALPM (0x1 << REPLAY_RESIDENCY_MODE_SHIFT) 2951 - # define REPLAY_RESIDENCY_MODE_IPS 0x10 2963 + # define REPLAY_RESIDENCY_FIELD_MODE_PHY (0x0 << REPLAY_RESIDENCY_MODE_SHIFT) 2964 + # define REPLAY_RESIDENCY_FIELD_MODE_ALPM (0x1 << REPLAY_RESIDENCY_MODE_SHIFT) 2965 + 2966 + #define REPLAY_RESIDENCY_MODE2_MASK (0xF << REPLAY_RESIDENCY_MODE2_SHIFT) 2967 + # define REPLAY_RESIDENCY_FIELD_MODE2_IPS (0x1 << REPLAY_RESIDENCY_MODE2_SHIFT) 2968 + # define REPLAY_RESIDENCY_FIELD_MODE2_FRAME_CNT (0x2 << REPLAY_RESIDENCY_MODE2_SHIFT) 2952 2969 2953 2970 #define REPLAY_RESIDENCY_ENABLE_MASK (0x1 << REPLAY_RESIDENCY_ENABLE_SHIFT) 2954 2971 # define REPLAY_RESIDENCY_DISABLE (0x0 << REPLAY_RESIDENCY_ENABLE_SHIFT) 2955 2972 # define REPLAY_RESIDENCY_ENABLE (0x1 << REPLAY_RESIDENCY_ENABLE_SHIFT) 2956 2973 2974 + #define REPLAY_RESIDENCY_REVISION_MASK (0x3 << REPLAY_RESIDENCY_REVISION_SHIFT) 2975 + # define REPLAY_RESIDENCY_REVISION_0 (0x0 << REPLAY_RESIDENCY_REVISION_SHIFT) 2976 + # define REPLAY_RESIDENCY_REVISION_1 (0x1 << REPLAY_RESIDENCY_REVISION_SHIFT) 2977 + 2978 + /** 2979 + * Definition of a replay_state. 2980 + */ 2957 2981 enum replay_state { 2958 2982 REPLAY_STATE_0 = 0x0, 2959 2983 REPLAY_STATE_1 = 0x10,