From: Rodrigo Siqueira Jordao <Rodrigo.Siqueira@amd.com>
To: sunpeng.li@amd.com, amd-gfx@lists.freedesktop.org
Cc: Bhawanpreet.Lakha@amd.com, qingqing.zhuo@amd.com,
Aurabindo.Pillai@amd.com, harry.wentland@amd.com
Subject: Re: [PATCH 1/2] drm/amd/display: Add visualconfirm module parameter
Date: Thu, 7 Jul 2022 11:23:39 -0400 [thread overview]
Message-ID: <1ff59bfc-3945-667e-efb0-51291a44e499@amd.com> (raw)
In-Reply-To: <20220707145656.565627-1-sunpeng.li@amd.com>
On 07/07/2022 10:56, sunpeng.li@amd.com wrote:
> From: Leo Li <sunpeng.li@amd.com>
>
> [Why]
>
> Being able to configure visual confirm at boot or in cmdline is helpful
> when debugging.
>
> [How]
>
> Add a module parameter to configure DC visual confirm, which works the
> same way as the equivalent debugfs entry.
>
> Signed-off-by: Leo Li <sunpeng.li@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 +
> drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 4 ++++
> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 ++
> 3 files changed, 7 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> index 845d6054992a..4629bef6c44e 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> @@ -197,6 +197,7 @@ extern uint amdgpu_smu_memory_pool_size;
> extern int amdgpu_smu_pptable_id;
> extern uint amdgpu_dc_feature_mask;
> extern uint amdgpu_dc_debug_mask;
> +extern uint amdgpu_dc_visual_confirm;
> extern uint amdgpu_dm_abm_level;
> extern int amdgpu_backlight;
> extern struct amdgpu_mgpu_info mgpu_info;
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> index 1cc9260e75de..e1e8cf70e719 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> @@ -167,6 +167,7 @@ int amdgpu_smu_pptable_id = -1;
> */
> uint amdgpu_dc_feature_mask = 2;
> uint amdgpu_dc_debug_mask;
> +uint amdgpu_dc_visual_confirm;
> int amdgpu_async_gfx_ring = 1;
> int amdgpu_mcbp;
> int amdgpu_discovery = -1;
> @@ -827,6 +828,9 @@ module_param_named(dcfeaturemask, amdgpu_dc_feature_mask, uint, 0444);
> MODULE_PARM_DESC(dcdebugmask, "all debug options disabled (default))");
> module_param_named(dcdebugmask, amdgpu_dc_debug_mask, uint, 0444);
>
> +MODULE_PARM_DESC(visualconfirm, "Visual confirm (0 = off (default), 1 = MPO, 5 = PSR)");
> +module_param_named(visualconfirm, amdgpu_dc_visual_confirm, uint, 0444);
> +
> /**
> * DOC: abmlevel (uint)
> * Override the default ABM (Adaptive Backlight Management) level used for DC
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> index eb5efb4aa2ba..d7208c0b76b1 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -1562,6 +1562,8 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
> if (amdgpu_dc_debug_mask & DC_FORCE_SUBVP_MCLK_SWITCH)
> adev->dm.dc->debug.force_subvp_mclk_switch = true;
>
> + adev->dm.dc->debug.visual_confirm = amdgpu_dc_visual_confirm;
> +
> r = dm_dmub_hw_init(adev);
> if (r) {
> DRM_ERROR("DMUB interface failed to initialize: status=%d\n", r);
Series LGTM,
Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
prev parent reply other threads:[~2022-07-07 15:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-07 14:56 [PATCH 1/2] drm/amd/display: Add visualconfirm module parameter sunpeng.li
2022-07-07 14:56 ` [PATCH 2/2] drm/amd/display: Add dcdebugmask option for disabling MPO sunpeng.li
2022-07-07 15:23 ` Rodrigo Siqueira Jordao [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1ff59bfc-3945-667e-efb0-51291a44e499@amd.com \
--to=rodrigo.siqueira@amd.com \
--cc=Aurabindo.Pillai@amd.com \
--cc=Bhawanpreet.Lakha@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=harry.wentland@amd.com \
--cc=qingqing.zhuo@amd.com \
--cc=sunpeng.li@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox