AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Harry Wentland <harry.wentland@amd.com>
To: Mario Limonciello <superm1@kernel.org>,
	"amd-gfx @ lists . freedesktop . org"
	<amd-gfx@lists.freedesktop.org>
Cc: Mario Limonciello <mario.limonciello@amd.com>
Subject: Re: [PATCH 4/4] drm/amd/display: Refactor mark_seamless_boot_stream()
Date: Tue, 21 Jan 2025 10:45:18 -0500	[thread overview]
Message-ID: <f70c0997-2ce7-487d-a32a-392fc707b587@amd.com> (raw)
In-Reply-To: <20250120194903.1048811-4-superm1@kernel.org>

On 2025-01-20 14:49, Mario Limonciello wrote:
> From: Mario Limonciello <mario.limonciello@amd.com>
> 
> mark_seamless_boot_stream() can be called multiple times to run
> the more expensive checks in dc_validate_boot_timing().
> 
> Refactor the function so that if those have already passed once
> the function isn't called again.
> 
> Also add a message the first time that they have passed to let
> the user know the stream will be used for seamless boot.
> 
> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>

Series is
Reviewed-by: Harry Wentland <harry.wentland@amd.com>

Harry

> ---
>  .../gpu/drm/amd/display/dc/core/dc_resource.c  | 18 +++++++++++-------
>  1 file changed, 11 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
> index 626f75b6ad003..78bad889ba065 100644
> --- a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
> +++ b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
> @@ -3525,16 +3525,20 @@ static int acquire_resource_from_hw_enabled_state(
>  	return -1;
>  }
>  
> -static void mark_seamless_boot_stream(
> -		const struct dc  *dc,
> -		struct dc_stream_state *stream)
> +static void mark_seamless_boot_stream(const struct dc  *dc,
> +				      struct dc_stream_state *stream)
>  {
>  	struct dc_bios *dcb = dc->ctx->dc_bios;
>  
> -	if (dc->config.allow_seamless_boot_optimization &&
> -			!dcb->funcs->is_accelerated_mode(dcb)) {
> -		if (dc_validate_boot_timing(dc, stream->sink, &stream->timing))
> -			stream->apply_seamless_boot_optimization = true;
> +	if (stream->apply_seamless_boot_optimization)
> +		return;
> +	if (!dc->config.allow_seamless_boot_optimization)
> +		return;
> +	if (dcb->funcs->is_accelerated_mode(dcb))
> +		return;
> +	if (dc_validate_boot_timing(dc, stream->sink, &stream->timing)) {
> +		stream->apply_seamless_boot_optimization = true;
> +		DC_LOG_INFO("Marked stream for seamless boot optimization\n");
>  	}
>  }
>  


      reply	other threads:[~2025-01-21 15:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-20 19:49 [PATCH 1/4] drm/amd/display: Add debug messages for dc_validate_boot_timing() Mario Limonciello
2025-01-20 19:49 ` [PATCH 2/4] drm/amd/display: Decrease message about seamless boot enabled to debug Mario Limonciello
2025-01-20 19:49 ` [PATCH 3/4] drm/amd/display: Add new log type `DC_LOG_INFO` Mario Limonciello
2025-01-20 19:49 ` [PATCH 4/4] drm/amd/display: Refactor mark_seamless_boot_stream() Mario Limonciello
2025-01-21 15:45   ` Harry Wentland [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=f70c0997-2ce7-487d-a32a-392fc707b587@amd.com \
    --to=harry.wentland@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=mario.limonciello@amd.com \
    --cc=superm1@kernel.org \
    /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