AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Hamza Mahfooz <hamza.mahfooz@amd.com>
To: Shirish S <shirish.s@amd.com>, Leo Li <sunpeng.li@amd.com>,
	Harry Wentland <harry.wentland@amd.com>,
	Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>,
	Alex Deucher <alexander.deucher@amd.com>
Cc: amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/amd/display: enable/disable PSR feature at run time
Date: Tue, 11 Jul 2023 13:26:11 -0400	[thread overview]
Message-ID: <9ba47227-09d2-e7ad-3fce-2fe206eceb21@amd.com> (raw)
In-Reply-To: <20230711072837.41854-1-shirish.s@amd.com>


On 7/11/23 03:28, Shirish S wrote:
> [Why]
> Per current architecture, PSR feature is disabled by default for DCN < 3.

There were issues in the past with enabling PSR for < DCN3 ASICs. So,
unless we can prove those issues are gone I don't think this is advisable.

> This makes it impossible for those pre-flashed device users to try newer
> (psr capable) panels without altering OS (boot params).
> Also on Chromebooks its not sustainable to have custom dc_feature_mask.
> 
> [How]
> amdgpu_dm_set_psr_caps() in its current form does a decent job to evaluate
> and discard links that are not capable of PSR feature.
> If the current implementation has gap, going forward it needs to be
> addressed either by adding appropriate ways to detect and discard the
> panels or by iteratively blacklisting the same.
> 
> Signed-off-by: Shirish S <shirish.s@amd.com>
> ---
>   .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 23 ++-----------------
>   1 file changed, 2 insertions(+), 21 deletions(-)
> 
> 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 073bf00c6fdc..0fcafe1a071d 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -4313,7 +4313,6 @@ static int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev)
>   	s32 primary_planes;
>   	enum dc_connection_type new_connection_type = dc_connection_none;
>   	const struct dc_plane_cap *plane;
> -	bool psr_feature_enabled = false;
>   	int max_overlay = dm->dc->caps.max_slave_planes;
>   
>   	dm->display_indexes_num = dm->dc->caps.max_streams;
> @@ -4405,24 +4404,6 @@ static int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev)
>   			      adev->ip_versions[DCE_HWIP][0]);
>   	}
>   
> -	/* Determine whether to enable PSR support by default. */
> -	if (!(amdgpu_dc_debug_mask & DC_DISABLE_PSR)) {
> -		switch (adev->ip_versions[DCE_HWIP][0]) {
> -		case IP_VERSION(3, 1, 2):
> -		case IP_VERSION(3, 1, 3):
> -		case IP_VERSION(3, 1, 4):
> -		case IP_VERSION(3, 1, 5):
> -		case IP_VERSION(3, 1, 6):
> -		case IP_VERSION(3, 2, 0):
> -		case IP_VERSION(3, 2, 1):
> -			psr_feature_enabled = true;
> -			break;
> -		default:
> -			psr_feature_enabled = amdgpu_dc_feature_mask & DC_PSR_MASK;
> -			break;
> -		}
> -	}
> -
>   	/* loops over all connectors on the board */
>   	for (i = 0; i < link_cnt; i++) {
>   		struct dc_link *link = NULL;
> @@ -4471,8 +4452,8 @@ static int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev)
>   				amdgpu_dm_update_connector_after_detect(aconnector);
>   				setup_backlight_device(dm, aconnector);
>   
> -				if (psr_feature_enabled)
> -					amdgpu_dm_set_psr_caps(link);
> +				/* Determine & Set PSR caps*/
> +				amdgpu_dm_set_psr_caps(link);
>   
>   				/* TODO: Fix vblank control helpers to delay PSR entry to allow this when
>   				 * PSR is also supported.
-- 
Hamza


      reply	other threads:[~2023-07-11 17:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-11  7:28 [PATCH] drm/amd/display: enable/disable PSR feature at run time Shirish S
2023-07-11 17:26 ` Hamza Mahfooz [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=9ba47227-09d2-e7ad-3fce-2fe206eceb21@amd.com \
    --to=hamza.mahfooz@amd.com \
    --cc=Rodrigo.Siqueira@amd.com \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=harry.wentland@amd.com \
    --cc=shirish.s@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