From: Harry Wentland <harry.wentland@amd.com>
To: Alex Deucher <alexander.deucher@amd.com>, amd-gfx@lists.freedesktop.org
Cc: Stephen Rothwell <sfr@canb.auug.org.au>,
Aurabindo Pillai <aurabindo.pillai@amd.com>
Subject: Re: [PATCH] drm/amdgpu/display: Protect some functions with CONFIG_DRM_AMD_DC_DCN
Date: Thu, 2 Jun 2022 09:37:24 -0400 [thread overview]
Message-ID: <71241cfd-309e-a370-e84a-61af3ca23398@amd.com> (raw)
In-Reply-To: <20220602023136.836224-1-alexander.deucher@amd.com>
On 2022-06-01 22:31, Alex Deucher wrote:
> Protect remove_hpo_dp_link_enc_from_ctx() and release_hpo_dp_link_enc()
> with CONFIG_DRM_AMD_DC_DCN as the functions are only called from code
> that is protected by CONFIG_DRM_AMD_DC_DCN. Fixes build fail with
> -Werror=unused-function.
>
> Fixes: 9b0e0d433f74 ("drm/amd/display: Add dependant changes for DCN32/321")
> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> Cc: Aurabindo Pillai <aurabindo.pillai@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Harry
> ---
> drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> 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 b087452e4590..a098fd0cb240 100644
> --- a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
> +++ b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
> @@ -1801,6 +1801,7 @@ static inline void retain_hpo_dp_link_enc(
> res_ctx->hpo_dp_link_enc_ref_cnts[enc_index]++;
> }
>
> +#if defined(CONFIG_DRM_AMD_DC_DCN)
> static inline void release_hpo_dp_link_enc(
> struct resource_context *res_ctx,
> int enc_index)
> @@ -1808,6 +1809,7 @@ static inline void release_hpo_dp_link_enc(
> ASSERT(res_ctx->hpo_dp_link_enc_ref_cnts[enc_index] > 0);
> res_ctx->hpo_dp_link_enc_ref_cnts[enc_index]--;
> }
> +#endif
>
> static bool add_hpo_dp_link_enc_to_ctx(struct resource_context *res_ctx,
> const struct resource_pool *pool,
> @@ -1832,6 +1834,7 @@ static bool add_hpo_dp_link_enc_to_ctx(struct resource_context *res_ctx,
> return pipe_ctx->link_res.hpo_dp_link_enc != NULL;
> }
>
> +#if defined(CONFIG_DRM_AMD_DC_DCN)
> static void remove_hpo_dp_link_enc_from_ctx(struct resource_context *res_ctx,
> struct pipe_ctx *pipe_ctx,
> struct dc_stream_state *stream)
> @@ -1845,6 +1848,7 @@ static void remove_hpo_dp_link_enc_from_ctx(struct resource_context *res_ctx,
> pipe_ctx->link_res.hpo_dp_link_enc = NULL;
> }
> }
> +#endif
>
> /* TODO: release audio object */
> void update_audio_usage(
prev parent reply other threads:[~2022-06-02 13:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-02 2:31 [PATCH] drm/amdgpu/display: Protect some functions with CONFIG_DRM_AMD_DC_DCN Alex Deucher
2022-06-02 13:37 ` 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=71241cfd-309e-a370-e84a-61af3ca23398@amd.com \
--to=harry.wentland@amd.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=aurabindo.pillai@amd.com \
--cc=sfr@canb.auug.org.au \
/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