drm/amd: Add debug mask for subviewport mclk switch
Subsystems (3)
PATCH 1/1 drm/amd: Add debug mask for subviewport mclk switch
[Why&How]
Expose a new debugfs enum to force a subviewport memory clock switch to facilitate easy testing.
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 +++ drivers/gpu/drm/amd/include/amd_shared.h | 1 + 2 files changed, 4 insertions(+)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +3 -0
@@ -1559,6 +1559,9 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)if (amdgpu_dc_debug_mask &DC_DISABLE_CLOCK_GATING ) adev->dm.dc->debug.disable_clock_gate = true; +if (amdgpu_dc_debug_mask &DC_FORCE_SUBVP_MCLK_SWITCH ) + adev->dm.dc->debug.force_subvp_mclk_switch = true; + r =dm_dmub_hw_init (adev);if (r) {DRM_ERROR ("DMUB interface failed to initialize: status=%d\n" , r);
drivers/gpu/drm/amd/include/amd_shared.h +1 -0
@@ -247,6 +247,7 @@ enum DC_DEBUG_MASK {DC_DISABLE_DSC =0x4 ,DC_DISABLE_CLOCK_GATING =0x8 ,DC_DISABLE_PSR =0x10 , + DC_FORCE_SUBVP_MCLK_SWITCH = 0x20, };enum amd_dpm_forced_level ;
Signature · 1 line
2.36.1
Ping
Quoted 36 lines · Aurabindo Pillai
[Why&How]
Expose a new debugfs enum to force a subviewport memory clock switch to facilitate easy testing.Signed-off-by Aurabindo Pillai <[email protected]>--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 +++ drivers/gpu/drm/amd/include/amd_shared.h | 1 + 2 files changed, 4 insertions(+)drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +3
-0@@ -1559,6 +1559,9 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)if (amdgpu_dc_debug_mask &DC_DISABLE_CLOCK_GATING ) adev->dm.dc->debug.disable_clock_gate = true; +if (amdgpu_dc_debug_mask &DC_FORCE_SUBVP_MCLK_SWITCH ) + adev->dm.dc->debug.force_subvp_mclk_switch = true; + r =dm_dmub_hw_init (adev);if (r) {DRM_ERROR ("DMUB interface failed to initialize: status=%d\n" , r);drivers/gpu/drm/amd/include/amd_shared.h +1
-0@@ -247,6 +247,7 @@ enum DC_DEBUG_MASK {DC_DISABLE_DSC =0x4 ,DC_DISABLE_CLOCK_GATING =0x8 ,DC_DISABLE_PSR =0x10 , + DC_FORCE_SUBVP_MCLK_SWITCH = 0x20, };enum amd_dpm_forced_level ;
Quoted 5 lines · Aurabindo Pillai
[Why&How]
Expose a new debugfs enum to force a subviewport memory clock switch to facilitate easy testing.
Is the debugfs support already plumbed in and this just enables you to use it? If it's in debugfs, do we really need a module parameter to enable it or can it just be enabled by default and used via debugfs when needed?
Alex
Quoted 35 lines
Signed-off-by Aurabindo Pillai <[email protected]>--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 +++ drivers/gpu/drm/amd/include/amd_shared.h | 1 + 2 files changed, 4 insertions(+)drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +3
-0@@ -1559,6 +1559,9 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)if (amdgpu_dc_debug_mask &DC_DISABLE_CLOCK_GATING ) adev->dm.dc->debug.disable_clock_gate = true; +if (amdgpu_dc_debug_mask &DC_FORCE_SUBVP_MCLK_SWITCH ) + adev->dm.dc->debug.force_subvp_mclk_switch = true; + r =dm_dmub_hw_init (adev);if (r) {DRM_ERROR ("DMUB interface failed to initialize: status=%d\n" , r);drivers/gpu/drm/amd/include/amd_shared.h +1
-1@@ -247,6 +247,7 @@ enum DC_DEBUG_MASK {DC_DISABLE_DSC =0x4 ,DC_DISABLE_CLOCK_GATING =0x8 ,DC_DISABLE_PSR =0x10 , + DC_FORCE_SUBVP_MCLK_SWITCH = 0x20, };enum amd_dpm_forced_level ; --2.36.1
Quoted 8 lines · Alex Deucher
Quoted 5 lines · Aurabindo Pillai
[Why&How]
Expose a new debugfs enum to force a subviewport memory clock switch to facilitate easy testing.
Quoted 4 lines
Is the debugfs support already plumbed in and this just enables you to use it? If it's in debugfs, do we really need a module parameter to enable it or can it just be enabled by default and used via debugfs when needed?
Sorry, I meant to put in debug mask, like in the title. Will fix that. There is no debugfs associated with this change. The change in DM is enough to enable this.
Quoted 38 lines
Alex
Quoted 35 lines
Signed-off-by Aurabindo Pillai <[email protected]>--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 +++ drivers/gpu/drm/amd/include/amd_shared.h | 1 + 2 files changed, 4 insertions(+)drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +3
-0@@ -1559,6 +1559,9 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)if (amdgpu_dc_debug_mask &DC_DISABLE_CLOCK_GATING ) adev->dm.dc->debug.disable_clock_gate = true; +if (amdgpu_dc_debug_mask &DC_FORCE_SUBVP_MCLK_SWITCH ) + adev->dm.dc->debug.force_subvp_mclk_switch = true; + r =dm_dmub_hw_init (adev);if (r) {DRM_ERROR ("DMUB interface failed to initialize: status=%d\n" , r);drivers/gpu/drm/amd/include/amd_shared.h +1
-1@@ -247,6 +247,7 @@ enum DC_DEBUG_MASK {DC_DISABLE_DSC =0x4 ,DC_DISABLE_CLOCK_GATING =0x8 ,DC_DISABLE_PSR =0x10 , + DC_FORCE_SUBVP_MCLK_SWITCH = 0x20, };enum amd_dpm_forced_level ; --2.36.1
Alex Deucher
Acked-byQuoted 12 lines · Aurabindo Pillai
Quoted 8 lines · Alex Deucher
Quoted 5 lines · Aurabindo Pillai
[Why&How]
Expose a new debugfs enum to force a subviewport memory clock switch to facilitate easy testing.
Quoted 9 lines
Quoted 4 lines
Is the debugfs support already plumbed in and this just enables you to use it? If it's in debugfs, do we really need a module parameter to enable it or can it just be enabled by default and used via debugfs when needed?
Sorry, I meant to put in debug mask, like in the title. Will fix that. There is no debugfs associated with this change. The change in DM is enough to enable this.
Quoted 1 line
Thanks. With that fixed,
Quoted 37 lines
Quoted 37 lines
Alex
Quoted 35 lines
Signed-off-by Aurabindo Pillai <[email protected]>--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 +++ drivers/gpu/drm/amd/include/amd_shared.h | 1 + 2 files changed, 4 insertions(+)drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +3
-0@@ -1559,6 +1559,9 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)if (amdgpu_dc_debug_mask &DC_DISABLE_CLOCK_GATING ) adev->dm.dc->debug.disable_clock_gate = true; +if (amdgpu_dc_debug_mask &DC_FORCE_SUBVP_MCLK_SWITCH ) + adev->dm.dc->debug.force_subvp_mclk_switch = true; + r =dm_dmub_hw_init (adev);if (r) {DRM_ERROR ("DMUB interface failed to initialize: status=%d\n" , r);drivers/gpu/drm/amd/include/amd_shared.h +1
-1@@ -247,6 +247,7 @@ enum DC_DEBUG_MASK {DC_DISABLE_DSC =0x4 ,DC_DISABLE_CLOCK_GATING =0x8 ,DC_DISABLE_PSR =0x10 , + DC_FORCE_SUBVP_MCLK_SWITCH = 0x20, };enum amd_dpm_forced_level ; --2.36.1
Quoted 4 lines · Aurabindo Pillai
[Why&How]
Expose a new debugfs enum to force a subviewport memory clock switch to facilitate easy testing.
Does this force a single switch? Or at regular intervals?
It would be useful to describe a bit better what it does.
Quoted 1 line
Signed-off-by Aurabindo Pillai <[email protected]>
Either way, since this is for debug purposes only this is
Harry
Quoted 31 lines
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 +++ drivers/gpu/drm/amd/include/amd_shared.h | 1 + 2 files changed, 4 insertions(+)drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +3
-0@@ -1559,6 +1559,9 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)if (amdgpu_dc_debug_mask &DC_DISABLE_CLOCK_GATING ) adev->dm.dc->debug.disable_clock_gate = true; +if (amdgpu_dc_debug_mask &DC_FORCE_SUBVP_MCLK_SWITCH ) + adev->dm.dc->debug.force_subvp_mclk_switch = true; + r =dm_dmub_hw_init (adev);if (r) {DRM_ERROR ("DMUB interface failed to initialize: status=%d\n" , r);drivers/gpu/drm/amd/include/amd_shared.h +1
-0@@ -247,6 +247,7 @@ enum DC_DEBUG_MASK {DC_DISABLE_DSC =0x4 ,DC_DISABLE_CLOCK_GATING =0x8 ,DC_DISABLE_PSR =0x10 , + DC_FORCE_SUBVP_MCLK_SWITCH = 0x20, };enum amd_dpm_forced_level ;
Quoted 9 lines · Harry Wentland
Quoted 4 lines · Aurabindo Pillai
[Why&How]
Expose a new debugfs enum to force a subviewport memory clock switch to facilitate easy testing.Does this force a single switch? Or at regular intervals?
If this debug option is set, each time a MCLK switch happens, a SubVP sequences shall be initiated. That is, during the MCLK switch the scanout shall be from the Subviewport memory. Setting this option doesnt trigger an MCLK switch though.
Quoted 2 lines
It would be useful to describe a bit better what it does.
Will keep that in mind, thanks! Unfortunately I merged it already since I got the ack last week.
Quoted 40 lines
Quoted 2 lines
Signed-off-by Aurabindo Pillai <[email protected]>Either way, since this is for debug purposes only this is
Reviewed-by Harry Wentland <[email protected]>Harry
Quoted 31 lines
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 +++ drivers/gpu/drm/amd/include/amd_shared.h | 1 + 2 files changed, 4 insertions(+)drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +3
-0@@ -1559,6 +1559,9 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)if (amdgpu_dc_debug_mask &DC_DISABLE_CLOCK_GATING ) adev->dm.dc->debug.disable_clock_gate = true; +if (amdgpu_dc_debug_mask &DC_FORCE_SUBVP_MCLK_SWITCH ) + adev->dm.dc->debug.force_subvp_mclk_switch = true; + r =dm_dmub_hw_init (adev);if (r) {DRM_ERROR ("DMUB interface failed to initialize: status=%d\n" , r);drivers/gpu/drm/amd/include/amd_shared.h +1
-0@@ -247,6 +247,7 @@ enum DC_DEBUG_MASK {DC_DISABLE_DSC =0x4 ,DC_DISABLE_CLOCK_GATING =0x8 ,DC_DISABLE_PSR =0x10 , + DC_FORCE_SUBVP_MCLK_SWITCH = 0x20, };enum amd_dpm_forced_level ;
Quoted 13 lines · Aurabindo Pillai
Quoted 9 lines · Harry Wentland
Quoted 4 lines · Aurabindo Pillai
[Why&How]
Expose a new debugfs enum to force a subviewport memory clock switch to facilitate easy testing.Does this force a single switch? Or at regular intervals?
Quoted 7 lines
If this debug option is set, each time a MCLK switch happens, a SubVP sequences shall be initiated. That is, during the MCLK switch the scanout shall be from the Subviewport memory. Setting this option doesnt trigger an MCLK switch though.
Quoted 2 lines
It would be useful to describe a bit better what it does.
Will keep that in mind, thanks! Unfortunately I merged it already since I got the ack last week. No worries :)
Harry
Quoted 38 lines
Quoted 38 lines
Quoted 2 lines
Signed-off-by Aurabindo Pillai <[email protected]>Either way, since this is for debug purposes only this is
Reviewed-by Harry Wentland <[email protected]>Harry
Quoted 29 lines
---
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c| 3 +++ drivers/gpu/drm/amd/include/amd_shared.h | 1 +2 files changed, 4 insertions(+)drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +2
-0@@ -1559,6 +1559,9 @@ static int amdgpu_dm_init(struct amdgpu_device *adev) if (amdgpu_dc_debug_mask & DC_DISABLE_CLOCK_GATING) adev->dm.dc->debug.disable_clock_gate = true; + if (amdgpu_dc_debug_mask & DC_FORCE_SUBVP_MCLK_SWITCH) + adev->dm.dc->debug.force_subvp_mclk_switch = true; + r = dm_dmub_hw_init(adev); if (r) { DRM_ERROR("DMUB interface failed to initialize: status=%d\n", r);drivers/gpu/drm/amd/include/amd_shared.h +1
-0@@ -247,6 +247,7 @@ enum DC_DEBUG_MASK { DC_DISABLE_DSC = 0x4, DC_DISABLE_CLOCK_GATING = 0x8, DC_DISABLE_PSR = 0x10, + DC_FORCE_SUBVP_MCLK_SWITCH = 0x20, }; enum amd_dpm_forced_level;