AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Anson Jacob <Anson.Jacob@amd.com>
To: <amd-gfx@lists.freedesktop.org>
Cc: stylon.wang@amd.com, solomon.chiu@amd.com, Sunpeng.Li@amd.com,
	Harry.Wentland@amd.com, qingqing.zhuo@amd.com,
	Rodrigo.Siqueira@amd.com, roman.li@amd.com, Anson.Jacob@amd.com,
	Aurabindo.Pillai@amd.com,
	Ariel Bernstein <Eric.Bernstein@amd.com>,
	wayne.lin@amd.com, mikita.lipski@amd.com,
	Bhawanpreet.Lakha@amd.com, agustin.gutierrez@amd.com,
	pavle.kotarac@amd.com
Subject: [PATCH 04/22] drm/amd/display: Add comment where CONFIG_DRM_AMD_DC_DCN macro ends
Date: Thu, 4 Nov 2021 16:51:57 -0400	[thread overview]
Message-ID: <20211104205215.1125899-5-Anson.Jacob@amd.com> (raw)
In-Reply-To: <20211104205215.1125899-1-Anson.Jacob@amd.com>

Trivial patch which adds a comment for macro
endif's in amdgpu_dm.c

Reviewed-by: Ariel Bernstein <Eric.Bernstein@amd.com>
Reviewed-by: Harry Wentland <Harry.Wentland@amd.com>
Acked-by: Anson Jacob <Anson.Jacob@amd.com>
Signed-off-by: Anson Jacob <Anson.Jacob@amd.com>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 8 ++++----
 drivers/gpu/drm/amd/display/dc/core/dc.c          | 6 ++++--
 drivers/gpu/drm/amd/display/dc/core/dc_link.c     | 2 +-
 3 files changed, 9 insertions(+), 7 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 1e26d9be8993..5d646acd269d 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -619,7 +619,7 @@ static void dm_dcn_vertical_interrupt0_high_irq(void *interrupt_params)
 
 	amdgpu_dm_crtc_handle_crc_window_irq(&acrtc->base);
 }
-#endif
+#endif /* CONFIG_DRM_AMD_SECURE_DISPLAY */
 
 /**
  * dmub_aux_setconfig_reply_callback - Callback for AUX or SET_CONFIG command.
@@ -812,7 +812,7 @@ static void dm_dmub_outbox1_low_irq(void *interrupt_params)
 	if (count > DMUB_TRACE_MAX_READ)
 		DRM_DEBUG_DRIVER("Warning : count > DMUB_TRACE_MAX_READ");
 }
-#endif
+#endif /* CONFIG_DRM_AMD_DC_DCN */
 
 static int dm_set_clockgating_state(void *handle,
 		  enum amd_clockgating_state state)
@@ -1563,7 +1563,7 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
 			DRM_ERROR("amdgpu: fail to register dmub hpd callback");
 			goto error;
 		}
-#endif
+#endif /* CONFIG_DRM_AMD_DC_DCN */
 	}
 
 	if (amdgpu_dm_initialize_drm_device(adev)) {
@@ -6077,7 +6077,7 @@ static void apply_dsc_policy_for_stream(struct amdgpu_dm_connector *aconnector,
 	if (stream->timing.flags.DSC && aconnector->dsc_settings.dsc_bits_per_pixel)
 		stream->timing.dsc_cfg.bits_per_pixel = aconnector->dsc_settings.dsc_bits_per_pixel;
 }
-#endif
+#endif /* CONFIG_DRM_AMD_DC_DCN */
 
 /**
  * DOC: FreeSync Video
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c
index 398de46fb7e4..0ded4decee05 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
@@ -1892,6 +1892,7 @@ static bool is_flip_pending_in_pipes(struct dc *dc, struct dc_state *context)
 	return false;
 }
 
+#ifdef CONFIG_DRM_AMD_DC_DCN
 /* Perform updates here which need to be deferred until next vupdate
  *
  * i.e. blnd lut, 3dlut, and shaper lut bypass regs are double buffered
@@ -1901,7 +1902,6 @@ static bool is_flip_pending_in_pipes(struct dc *dc, struct dc_state *context)
  */
 static void process_deferred_updates(struct dc *dc)
 {
-#ifdef CONFIG_DRM_AMD_DC_DCN
 	int i = 0;
 
 	if (dc->debug.enable_mem_low_power.bits.cm) {
@@ -1910,8 +1910,8 @@ static void process_deferred_updates(struct dc *dc)
 			if (dc->res_pool->dpps[i]->funcs->dpp_deferred_update)
 				dc->res_pool->dpps[i]->funcs->dpp_deferred_update(dc->res_pool->dpps[i]);
 	}
-#endif
 }
+#endif /* CONFIG_DRM_AMD_DC_DCN */
 
 void dc_post_update_surfaces_to_stream(struct dc *dc)
 {
@@ -1938,7 +1938,9 @@ void dc_post_update_surfaces_to_stream(struct dc *dc)
 			dc->hwss.disable_plane(dc, &context->res_ctx.pipe_ctx[i]);
 		}
 
+#ifdef CONFIG_DRM_AMD_DC_DCN
 	process_deferred_updates(dc);
+#endif
 
 	dc->hwss.optimize_bandwidth(dc, context);
 
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link.c b/drivers/gpu/drm/amd/display/dc/core/dc_link.c
index b4cdf6d43965..d856f08491de 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_link.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_link.c
@@ -4821,7 +4821,7 @@ uint32_t dc_bandwidth_in_kbps_from_timing(
 				timing->dsc_cfg.bits_per_pixel,
 				timing->dsc_cfg.num_slices_h,
 				timing->dsc_cfg.is_dp);
-#endif
+#endif /* CONFIG_DRM_AMD_DC_DCN */
 
 	switch (timing->display_color_depth) {
 	case COLOR_DEPTH_666:
-- 
2.25.1


  parent reply	other threads:[~2021-11-04 20:52 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-04 20:51 [PATCH 00/22] DC Patches Nov 4, 2021 Anson Jacob
2021-11-04 20:51 ` [PATCH 01/22] drm/amd/display: Add helper for blanking all dp displays Anson Jacob
2021-11-04 20:51 ` [PATCH 02/22] drm/amd/display: Pass panel inst to a PSR command Anson Jacob
2021-11-04 20:51 ` [PATCH 03/22] drm/amd/display: remove dmcub_support cap dependency Anson Jacob
2021-11-04 20:51 ` Anson Jacob [this message]
2021-11-04 20:51 ` [PATCH 05/22] drm/amd/display: Fix RGB MPO underflow with multiple displays Anson Jacob
2021-11-04 20:51 ` [PATCH 06/22] drm/amd/display: Use link_enc_cfg API for queries Anson Jacob
2021-11-04 20:52 ` [PATCH 07/22] drm/amd/display: Fix detection of aligned DMUB firmware meta info Anson Jacob
2021-11-04 20:52 ` [PATCH 08/22] drm/amd/display: bring dcn31 clk mgr in line with other version style Anson Jacob
2021-11-04 20:52 ` [PATCH 09/22] drm/amd/display: clean up some formats and log Anson Jacob
2021-11-04 20:52 ` [PATCH 10/22] drm/amd/display: use link_rate_set above DPCD 1.3 (#1527) Anson Jacob
2021-11-04 20:52 ` [PATCH 11/22] drm/amd/display: fix stale info in link encoder assignment Anson Jacob
2021-11-04 20:52 ` [PATCH 12/22] drm/amd/display: retain/release stream pointer in link enc table Anson Jacob
2021-11-04 20:52 ` [PATCH 13/22] drm/amd/display: Don't lock connection_mutex for DMUB HPD Anson Jacob
2021-11-04 20:52 ` [PATCH 14/22] drm/amd/display: Add callbacks for DMUB HPD IRQ notifications Anson Jacob
2021-11-04 20:52 ` [PATCH 15/22] drm/amd/display: Fix Coverity Issues Anson Jacob
2021-11-04 20:52 ` [PATCH 16/22] drm/amd/display: Add hpd pending flag to indicate detection of new hpd Anson Jacob
2021-11-04 20:52 ` [PATCH 17/22] drm/amd/display: Adjust code indentation Anson Jacob
2021-11-04 20:52 ` [PATCH 18/22] drm/amd/display: 3.2.161 Anson Jacob
2021-11-04 20:52 ` [PATCH 19/22] drm/amd/display: To support sending TPS3 pattern when restoring link Anson Jacob
2021-11-04 20:52 ` [PATCH 20/22] drm/amd/display: Query all entries in assignment table during updates Anson Jacob
2021-11-04 20:52 ` [PATCH 21/22] drm/amd/display: Initialise encoder assignment when initialising dc_state Anson Jacob
2021-11-04 20:52 ` [PATCH 22/22] drm/amd/display: Wait for ACK for INBOX0 HW Lock Anson Jacob
2021-11-05 20:14 ` [PATCH 00/22] DC Patches Nov 4, 2021 Wheeler, Daniel

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=20211104205215.1125899-5-Anson.Jacob@amd.com \
    --to=anson.jacob@amd.com \
    --cc=Aurabindo.Pillai@amd.com \
    --cc=Bhawanpreet.Lakha@amd.com \
    --cc=Eric.Bernstein@amd.com \
    --cc=Harry.Wentland@amd.com \
    --cc=Rodrigo.Siqueira@amd.com \
    --cc=Sunpeng.Li@amd.com \
    --cc=agustin.gutierrez@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=mikita.lipski@amd.com \
    --cc=pavle.kotarac@amd.com \
    --cc=qingqing.zhuo@amd.com \
    --cc=roman.li@amd.com \
    --cc=solomon.chiu@amd.com \
    --cc=stylon.wang@amd.com \
    --cc=wayne.lin@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