amd-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: "Liu, Zhan" <Zhan.Liu@amd.com>
To: Alex Deucher <alexdeucher@gmail.com>,
	"amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>
Cc: "Deucher, Alexander" <Alexander.Deucher@amd.com>
Subject: RE: [PATCH 3/3] drm/amdgpu/display move get_num_odm_splits() into dc_resource.c
Date: Wed, 12 Feb 2020 15:58:07 +0000	[thread overview]
Message-ID: <DM5PR1201MB2554165EB95580B5B5E20FDD9E1B0@DM5PR1201MB2554.namprd12.prod.outlook.com> (raw)
In-Reply-To: <20200212043258.1123758-3-alexander.deucher@amd.com>

Please find my reply inline.

Thanks,
Zhan

> -----Original Message-----
> From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> On Behalf Of Alex
> Deucher
> Sent: 2020/February/11, Tuesday 11:33 PM
> To: amd-gfx@lists.freedesktop.org
> Cc: Deucher, Alexander <Alexander.Deucher@amd.com>
> Subject: [PATCH 3/3] drm/amdgpu/display move get_num_odm_splits() into
> dc_resource.c
> 
> It's used by more than just DCN2.0.  Fixes missing symbol when amdgpu is
> built without DCN support.
> 
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> ---
>  .../gpu/drm/amd/display/dc/core/dc_resource.c    | 16 ++++++++++++++++
>  .../drm/amd/display/dc/dcn20/dcn20_resource.c    | 16 ----------------
>  .../drm/amd/display/dc/dcn20/dcn20_resource.h    |  1 -
>  drivers/gpu/drm/amd/display/dc/inc/resource.h    |  3 +++
>  4 files changed, 19 insertions(+), 17 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 c02e5994d32b..572ce3842535 100644
> --- a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
> +++ b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
> @@ -532,6 +532,22 @@ static inline void get_vp_scan_direction(
>  		*flip_horz_scan_dir = !*flip_horz_scan_dir;  }
> 
> +int get_num_odm_splits(struct pipe_ctx *pipe) {
> +	int odm_split_count = 0;
> +	struct pipe_ctx *next_pipe = pipe->next_odm_pipe;
> +	while (next_pipe) {
> +		odm_split_count++;
> +		next_pipe = next_pipe->next_odm_pipe;
> +	}
> +	pipe = pipe->prev_odm_pipe;
> +	while (pipe) {
> +		odm_split_count++;
> +		pipe = pipe->prev_odm_pipe;
> +	}
> +	return odm_split_count;
> +}
> +
>  static void calculate_split_count_and_index(struct pipe_ctx *pipe_ctx, int
> *split_count, int *split_idx)  {
>  	*split_count = get_num_odm_splits(pipe_ctx); diff --git
> a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
> b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
> index 39026df56fa6..1061faccec9c 100644
> --- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
> +++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
> @@ -1861,22 +1861,6 @@ void
> dcn20_populate_dml_writeback_from_context(
> 
>  }
> 
> -int get_num_odm_splits(struct pipe_ctx *pipe) -{
> -	int odm_split_count = 0;
> -	struct pipe_ctx *next_pipe = pipe->next_odm_pipe;
> -	while (next_pipe) {
> -		odm_split_count++;
> -		next_pipe = next_pipe->next_odm_pipe;
> -	}
> -	pipe = pipe->prev_odm_pipe;
> -	while (pipe) {
> -		odm_split_count++;
> -		pipe = pipe->prev_odm_pipe;
> -	}
> -	return odm_split_count;
> -}
> -
>  int dcn20_populate_dml_pipes_from_context(
>  		struct dc *dc, struct dc_state *context,
> display_e2e_pipe_params_st *pipes)  { diff --git
> a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.h
> b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.h
> index 5180088ab6bc..f5893840b79b 100644
> --- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.h
> +++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.h
> @@ -49,7 +49,6 @@ unsigned int dcn20_calc_max_scaled_time(
>  		unsigned int time_per_pixel,
>  		enum mmhubbub_wbif_mode mode,
>  		unsigned int urgent_watermark);
> -int get_num_odm_splits(struct pipe_ctx *pipe);  int

Seems like the "int" at the end of this line actually belongs to the next line.
I am wondering is it a typo or a format-patch glitch?

> dcn20_populate_dml_pipes_from_context(
>  		struct dc *dc, struct dc_state *context,
> display_e2e_pipe_params_st *pipes);  struct pipe_ctx
> *dcn20_acquire_idle_pipe_for_layer(
> diff --git a/drivers/gpu/drm/amd/display/dc/inc/resource.h
> b/drivers/gpu/drm/amd/display/dc/inc/resource.h
> index 5ae8ada154ef..ca4c36c0c9bc 100644
> --- a/drivers/gpu/drm/amd/display/dc/inc/resource.h
> +++ b/drivers/gpu/drm/amd/display/dc/inc/resource.h
> @@ -179,4 +179,7 @@ unsigned int resource_pixel_format_to_bpp(enum
> surface_pixel_format format);
> 
>  void get_audio_check(struct audio_info *aud_modes,
>  	struct audio_check *aud_chk);
> +
> +int get_num_odm_splits(struct pipe_ctx *pipe);
> +
>  #endif /* DRIVERS_GPU_DRM_AMD_DC_DEV_DC_INC_RESOURCE_H_ */
> --
> 2.24.1
> 
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  reply	other threads:[~2020-02-12 15:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-12  4:32 [PATCH 1/3] drm/amdgpu/display: extend DCN guard in dal_bios_parser_init_cmd_tbl_helper2 Alex Deucher
2020-02-12  4:32 ` [PATCH 2/3] drm/amdgpu/display: extend DCN guards Alex Deucher
2020-02-12 15:40   ` Liu, Zhan
2020-02-12 17:10   ` Rodrigo Siqueira
2020-02-12  4:32 ` [PATCH 3/3] drm/amdgpu/display move get_num_odm_splits() into dc_resource.c Alex Deucher
2020-02-12 15:58   ` Liu, Zhan [this message]
2020-02-12 16:04     ` Alex Deucher
2020-02-12 16:12       ` Liu, Zhan
2020-02-12 17:09   ` Rodrigo Siqueira
2020-02-12 15:19 ` [PATCH 1/3] drm/amdgpu/display: extend DCN guard in dal_bios_parser_init_cmd_tbl_helper2 Liu, Zhan
2020-02-12 17:09 ` Rodrigo Siqueira

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=DM5PR1201MB2554165EB95580B5B5E20FDD9E1B0@DM5PR1201MB2554.namprd12.prod.outlook.com \
    --to=zhan.liu@amd.com \
    --cc=Alexander.Deucher@amd.com \
    --cc=alexdeucher@gmail.com \
    --cc=amd-gfx@lists.freedesktop.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;
as well as URLs for NNTP newsgroup(s).