From: Wayne Lin <Wayne.Lin@amd.com>
To: <amd-gfx@lists.freedesktop.org>
Cc: stylon.wang@amd.com, Anthony Koo <Anthony.Koo@amd.com>,
hvanzyll <hvanzyll@amd.com>,
Sunpeng.Li@amd.com, Harry.Wentland@amd.com,
qingqing.zhuo@amd.com, Rodrigo.Siqueira@amd.com,
roman.li@amd.com, solomon.chiu@amd.com, Aurabindo.Pillai@amd.com,
wayne.lin@amd.com, mikita.lipski@amd.com,
Bhawanpreet.Lakha@amd.com, agustin.gutierrez@amd.com,
pavle.kotarac@amd.com
Subject: [PATCH 09/14] drm/amd/display: Visual Confirm Bar Height Adjust
Date: Fri, 12 Nov 2021 08:54:33 +0800 [thread overview]
Message-ID: <20211112005438.5505-10-Wayne.Lin@amd.com> (raw)
In-Reply-To: <20211112005438.5505-1-Wayne.Lin@amd.com>
From: hvanzyll <hvanzyll@amd.com>
[What]
This change allows adjustment to the Visual Confirm
height border.
[Why]
Aids debugging and testing
[How]
Use the existing infrastructure to implement logic to
draw borders
Reviewed-by: Anthony Koo <Anthony.Koo@amd.com>
Acked-by: Wayne Lin <wayne.lin@amd.com>
Signed-off-by: Harry VanZyllDeJong <hvanzyll@amd.com>
---
drivers/gpu/drm/amd/display/dc/dc.h | 2 ++
.../gpu/drm/amd/display/dc/dcn10/dcn10_dpp_dscl.c | 14 +++++++++++++-
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/drm/amd/display/dc/dc.h
index 764663df7887..6b4c9e9705c0 100644
--- a/drivers/gpu/drm/amd/display/dc/dc.h
+++ b/drivers/gpu/drm/amd/display/dc/dc.h
@@ -574,6 +574,8 @@ struct dc_debug_options {
bool native422_support;
bool disable_dsc;
enum visual_confirm visual_confirm;
+ int visual_confirm_rect_height;
+
bool sanity_checks;
bool max_disp_clk;
bool surface_trace;
diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp_dscl.c b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp_dscl.c
index 44293d66b46b..e31a6f1516bb 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp_dscl.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp_dscl.c
@@ -39,6 +39,10 @@
#define BLACK_OFFSET_RGB_Y 0x0
#define BLACK_OFFSET_CBCR 0x8000
+#define VISUAL_CONFIRM_RECT_HEIGHT_DEFAULT 3
+#define VISUAL_CONFIRM_RECT_HEIGHT_MIN 1
+#define VISUAL_CONFIRM_RECT_HEIGHT_MAX 10
+
#define REG(reg)\
dpp->tf_regs->reg
@@ -685,9 +689,17 @@ static void dpp1_dscl_set_recout(struct dcn10_dpp *dpp,
const struct rect *recout)
{
int visual_confirm_on = 0;
+ unsigned short visual_confirm_rect_height = VISUAL_CONFIRM_RECT_HEIGHT_DEFAULT;
+
if (dpp->base.ctx->dc->debug.visual_confirm != VISUAL_CONFIRM_DISABLE)
visual_confirm_on = 1;
+ /* Check bounds to ensure the VC bar height was set to a sane value */
+ if ((dpp->base.ctx->dc->debug.visual_confirm_rect_height >= VISUAL_CONFIRM_RECT_HEIGHT_MIN) &&
+ (dpp->base.ctx->dc->debug.visual_confirm_rect_height <= VISUAL_CONFIRM_RECT_HEIGHT_MAX)) {
+ visual_confirm_rect_height = dpp->base.ctx->dc->debug.visual_confirm_rect_height;
+ }
+
REG_SET_2(RECOUT_START, 0,
/* First pixel of RECOUT in the active OTG area */
RECOUT_START_X, recout->x,
@@ -699,7 +711,7 @@ static void dpp1_dscl_set_recout(struct dcn10_dpp *dpp,
RECOUT_WIDTH, recout->width,
/* Number of RECOUT vertical lines */
RECOUT_HEIGHT, recout->height
- - visual_confirm_on * 2 * (dpp->base.inst + 1));
+ - visual_confirm_on * 2 * (dpp->base.inst + visual_confirm_rect_height));
}
/**
--
2.25.1
next prev parent reply other threads:[~2021-11-12 0:55 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-12 0:54 [PATCH 00/14] DC Patches November 12, 2021 Wayne Lin
2021-11-12 0:54 ` [PATCH 01/14] drm/amd/display: Secondary display goes blank on Non DCN31 Wayne Lin
2021-11-12 0:54 ` [PATCH 02/14] drm/amd/display: Only flush delta from last command execution Wayne Lin
2021-11-12 0:54 ` [PATCH 03/14] drm/amd/display: Revert changes for MPO underflow Wayne Lin
2021-11-12 0:54 ` [PATCH 04/14] drm/amd/display: set MSA vsp/hsp to 0 for positive polarity for DP 128b/132b Wayne Lin
2021-11-12 0:54 ` [PATCH 05/14] drm/amd/display: Code change for DML isolation Wayne Lin
2021-11-12 0:54 ` [PATCH 06/14] drm/amd/display: Reset fifo after enable otg Wayne Lin
2021-11-12 0:54 ` [PATCH 07/14] drm/amd/display: Enable DSC over eDP Wayne Lin
2021-11-12 0:54 ` [PATCH 08/14] drm/amd/display: Fix eDP will flash when boot to OS Wayne Lin
2021-11-12 0:54 ` Wayne Lin [this message]
2021-11-12 0:54 ` [PATCH 10/14] drm/amd/display: [FW Promotion] Release 0.0.92 Wayne Lin
2021-11-12 0:54 ` [PATCH 11/14] drm/amd/display: [FW Promotion] Release 0.0.93 Wayne Lin
2021-11-12 0:54 ` [PATCH 12/14] drm/amd/display: fixed the DSC power off sequence during Driver PnP Wayne Lin
2021-11-12 0:54 ` [PATCH 13/14] drm/amd/display: 3.2.162 Wayne Lin
2021-11-12 0:54 ` [PATCH 14/14] drm/amd/display: Revert "retain/release stream pointer in link enc table" Wayne Lin
2021-11-15 14:35 ` [PATCH 00/14] DC Patches November 12, 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=20211112005438.5505-10-Wayne.Lin@amd.com \
--to=wayne.lin@amd.com \
--cc=Anthony.Koo@amd.com \
--cc=Aurabindo.Pillai@amd.com \
--cc=Bhawanpreet.Lakha@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=hvanzyll@amd.com \
--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 \
/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