[PATCH 09/39] drm/amd/dal: visual confirm change blank color to none-black
Harry Wentland
harry.wentland at amd.com
Thu Nov 24 02:02:38 UTC 2016
From: Tony Cheng <tony.cheng at amd.com>
- brown to help identify OTG is blanked.
Change-Id: Ifaf1288956288d3dc08ace899cabed3fd69f93fd
Signed-off-by: Tony Cheng <tony.cheng at amd.com>
Acked-by: Harry Wentland <harry.wentland at amd.com>
---
drivers/gpu/drm/amd/dal/dc/core/dc_hw_sequencer.c | 14 +++++++++++---
drivers/gpu/drm/amd/dal/dc/dce110/dce110_hw_sequencer.c | 11 +++++++----
drivers/gpu/drm/amd/dal/dc/inc/hw_sequencer.h | 3 ++-
3 files changed, 20 insertions(+), 8 deletions(-)
diff --git a/drivers/gpu/drm/amd/dal/dc/core/dc_hw_sequencer.c b/drivers/gpu/drm/amd/dal/dc/core/dc_hw_sequencer.c
index 6252e3f67813..d5cffa51ca96 100644
--- a/drivers/gpu/drm/amd/dal/dc/core/dc_hw_sequencer.c
+++ b/drivers/gpu/drm/amd/dal/dc/core/dc_hw_sequencer.c
@@ -36,8 +36,7 @@ enum black_color_format {
BLACK_COLOR_FORMAT_YUV_TV,
BLACK_COLOR_FORMAT_YUV_CV,
BLACK_COLOR_FORMAT_YUV_SUPER_AA,
-
- BLACK_COLOR_FORMAT_COUNT
+ BLACK_COLOR_FORMAT_DEBUG,
};
static const struct tg_color black_color_format[] = {
@@ -51,12 +50,21 @@ static const struct tg_color black_color_format[] = {
{0x1f4, 0x40, 0x1f4},
/* BlackColorFormat_YUV_SuperAA */
{0x1a2, 0x20, 0x1a2},
+ /* visual confirm debug */
+ {0xff, 0xff, 0},
};
void color_space_to_black_color(
- enum dc_color_space colorspace,
+ const struct core_dc *dc,
+ enum dc_color_space colorspace,
struct tg_color *black_color)
{
+ if (dc->public.debug.surface_visual_confirm) {
+ *black_color =
+ black_color_format[BLACK_COLOR_FORMAT_DEBUG];
+ return;
+ }
+
switch (colorspace) {
case COLOR_SPACE_YPBPR601:
*black_color = black_color_format[BLACK_COLOR_FORMAT_YUV_TV];
diff --git a/drivers/gpu/drm/amd/dal/dc/dce110/dce110_hw_sequencer.c b/drivers/gpu/drm/amd/dal/dc/dce110/dce110_hw_sequencer.c
index ef00588b8179..eb37e58c66c9 100644
--- a/drivers/gpu/drm/amd/dal/dc/dce110/dce110_hw_sequencer.c
+++ b/drivers/gpu/drm/amd/dal/dc/dce110/dce110_hw_sequencer.c
@@ -553,8 +553,9 @@ static void program_scaler(const struct core_dc *dc,
if (dc->public.debug.surface_visual_confirm)
get_surface_visual_confirm_color(pipe_ctx, &color);
else
- color_space_to_black_color(pipe_ctx->stream->public.output_color_space,
- &color);
+ color_space_to_black_color(dc,
+ pipe_ctx->stream->public.output_color_space,
+ &color);
pipe_ctx->xfm->funcs->transform_set_pixel_storage_depth(
pipe_ctx->xfm,
@@ -583,7 +584,8 @@ static enum dc_status prog_pixclk_crtc_otg(
if (!pipe_ctx_old->stream) {
/* program blank color */
- color_space_to_black_color(stream->public.output_color_space, &black_color);
+ color_space_to_black_color(dc,
+ stream->public.output_color_space, &black_color);
pipe_ctx->tg->funcs->set_blank_color(
pipe_ctx->tg,
&black_color);
@@ -1712,7 +1714,8 @@ static void dce110_power_on_pipe_if_needed(
context->target_count);
/* TODO unhardcode*/
- color_space_to_black_color(COLOR_SPACE_YCBCR601, &black_color);
+ color_space_to_black_color(dc,
+ COLOR_SPACE_YCBCR601, &black_color);
pipe_ctx->tg->funcs->set_blank_color(
pipe_ctx->tg,
&black_color);
diff --git a/drivers/gpu/drm/amd/dal/dc/inc/hw_sequencer.h b/drivers/gpu/drm/amd/dal/dc/inc/hw_sequencer.h
index d16e70103300..35a556dd9054 100644
--- a/drivers/gpu/drm/amd/dal/dc/inc/hw_sequencer.h
+++ b/drivers/gpu/drm/amd/dal/dc/inc/hw_sequencer.h
@@ -149,7 +149,8 @@ struct hw_sequencer_funcs {
};
void color_space_to_black_color(
- enum dc_color_space colorspace,
+ const struct core_dc *dc,
+ enum dc_color_space colorspace,
struct tg_color *black_color);
#endif /* __DC_HW_SEQUENCER_H__ */
--
2.10.1
More information about the amd-gfx
mailing list