disable_link(pipe_ctx->stream->sink->link, pipe_ctx->stream->signal);
}
+void core_link_set_avmute(struct pipe_ctx *pipe_ctx, bool enable)
+{
+ struct core_dc *core_dc = DC_TO_CORE(pipe_ctx->stream->ctx->dc);
+
+ if (pipe_ctx->stream->signal != SIGNAL_TYPE_HDMI_TYPE_A)
+ return;
+
+ core_dc->hwss.set_avmute(pipe_ctx, enable);
+}
+
uint8_t *check_sum = NULL;
uint8_t byte_index = 0;
union hdmi_info_packet *hdmi_info = &info_frame.avi_info_packet.info_packet_hdmi;
+ unsigned int vic = pipe_ctx->stream->public.timing.vic;
+ enum dc_timing_3d_format format;
color_space = pipe_ctx->stream->public.output_color_space;
if (color_space == COLOR_SPACE_UNKNOWN)
/* C0, C1 : Colorimetry */
if (color_space == COLOR_SPACE_YCBCR709 ||
- color_space == COLOR_SPACE_YCBCR709_LIMITED ||
- color_space == COLOR_SPACE_2020_YCBCR)
+ color_space == COLOR_SPACE_YCBCR709_LIMITED)
hdmi_info->bits.C0_C1 = COLORIMETRY_ITU709;
else if (color_space == COLOR_SPACE_YCBCR601 ||
color_space == COLOR_SPACE_YCBCR601_LIMITED)
hdmi_info->bits.Q0_Q1 = RGB_QUANTIZATION_DEFAULT_RANGE;
hdmi_info->bits.YQ0_YQ1 = YYC_QUANTIZATION_LIMITED_RANGE;
}
-
- hdmi_info->bits.VIC0_VIC7 =
- stream->public.timing.vic;
+ ///VIC
+ format = stream->public.timing.timing_3d_format;
+ /*todo, add 3DStereo support*/
+ if (format != TIMING_3D_FORMAT_NONE) {
+ // Based on HDMI specs hdmi vic needs to be converted to cea vic when 3D is enabled
+ switch (pipe_ctx->stream->public.timing.hdmi_vic) {
+ case 1:
+ vic = 95;
+ break;
+ case 2:
+ vic = 94;
+ break;
+ case 3:
+ vic = 93;
+ break;
+ case 4:
+ vic = 98;
+ break;
+ default:
+ break;
+ }
+ }
+ hdmi_info->bits.VIC0_VIC7 = vic;
/* pixel repetition
* PR0 - PR3 start from 0 whereas pHwPathMode->mode.timing.flags.pixel
* barLeft: Pixel Number of End of Left Bar.
* barRight: Pixel Number of Start of Right Bar. */
hdmi_info->bits.bar_top = stream->public.timing.v_border_top;
- hdmi_info->bits.bar_bottom = (stream->public.timing.v_border_top
+ hdmi_info->bits.bar_bottom = (stream->public.timing.v_total
- stream->public.timing.v_border_bottom + 1);
hdmi_info->bits.bar_left = stream->public.timing.h_border_left;
hdmi_info->bits.bar_right = (stream->public.timing.h_total
uint8_t checksum = 0;
uint32_t i = 0;
enum dc_timing_3d_format format;
+ // Can be different depending on packet content /*todo*/
+ // unsigned int length = pPathMode->dolbyVision ? 24 : 5;
+
+ info_packet->valid = false;
format = stream->public.timing.timing_3d_format;
if (stream->public.view_format == VIEW_3D_FORMAT_NONE)
REG_UPDATE(DP_VID_STREAM_CNTL, DP_VID_STREAM_ENABLE, true);
}
+static void dce110_stream_encoder_set_avmute(
+ struct stream_encoder *enc,
+ bool enable)
+{
+ struct dce110_stream_encoder *enc110 = DCE110STRENC_FROM_STRENC(enc);
+ unsigned int value = enable ? 1 : 0;
+
+ REG_UPDATE(HDMI_GC, HDMI_GC_AVMUTE, value);
+}
+
#define DP_SEC_AUD_N__DP_SEC_AUD_N__DEFAULT 0x8000
#define DP_SEC_TIMESTAMP__DP_SEC_TIMESTAMP_MODE__AUTO_CALC 1
dce110_stream_encoder_dp_blank,
.dp_unblank =
dce110_stream_encoder_dp_unblank,
-
.audio_mute_control = dce110_se_audio_mute_control,
.dp_audio_setup = dce110_se_dp_audio_setup,
.hdmi_audio_setup = dce110_se_hdmi_audio_setup,
.hdmi_audio_disable = dce110_se_hdmi_audio_disable,
.setup_stereo_sync = setup_stereo_sync,
+ .set_avmute = dce110_stream_encoder_set_avmute,
+
};
bool dce110_stream_encoder_construct(
pipe_ctx->stream_enc->funcs->dp_unblank(pipe_ctx->stream_enc, ¶ms);
}
+
+void dce110_set_avmute(struct pipe_ctx *pipe_ctx, bool enable)
+{
+ if (pipe_ctx != NULL && pipe_ctx->stream_enc != NULL)
+ pipe_ctx->stream_enc->funcs->set_avmute(pipe_ctx->stream_enc, enable);
+}
+
static enum audio_dto_source translate_to_dto_source(enum controller_id crtc_id)
{
switch (crtc_id) {
(pipe_ctx->stream->signal == SIGNAL_TYPE_DVI_DUAL_LINK) ?
true : false);
+ resource_build_info_frame(pipe_ctx);
+
if (!pipe_ctx_old->stream) {
core_link_enable_stream(pipe_ctx);
- resource_build_info_frame(pipe_ctx);
dce110_update_info_frame(pipe_ctx);
if (dc_is_dp_signal(pipe_ctx->stream->signal))
dce110_unblank_stream(pipe_ctx,
.set_static_screen_control = set_static_screen_control,
.reset_hw_ctx_wrap = reset_hw_ctx_wrap,
.prog_pixclk_crtc_otg = dce110_prog_pixclk_crtc_otg,
- .setup_stereo = NULL
+ .setup_stereo = NULL,
+ .set_avmute = dce110_set_avmute,
};
bool dce110_hw_sequencer_construct(struct core_dc *dc)
void dce110_update_info_frame(struct pipe_ctx *pipe_ctx);
+void dce110_set_avmute(struct pipe_ctx *pipe_ctx, bool enable);
void dce110_enable_accelerated_mode(struct core_dc *dc);
void dce110_power_down(struct core_dc *dc);
.set_drr = set_drr,
.get_position = get_position,
.set_static_screen_control = set_static_screen_control,
- .setup_stereo = dcn10_setup_stereo
+ .setup_stereo = dcn10_setup_stereo,
+ .set_avmute = dce110_set_avmute,
};
void core_link_disable_stream(struct pipe_ctx *pipe_ctx);
+void core_link_set_avmute(struct pipe_ctx *pipe_ctx, bool enable);
/********** DAL Core*********************/
#include "display_clock.h"
#include "transform.h"
struct stream_encoder *enc,
int tg_inst,
bool enable);
+
+ void (*set_avmute)(
+ struct stream_encoder *enc, bool enable);
};
#endif /* STREAM_ENCODER_H_ */
void (*setup_stereo)(
struct pipe_ctx *pipe_ctx,
struct core_dc *dc);
+
+ void (*set_avmute)(struct pipe_ctx *pipe_ctx, bool enable);
};
void color_space_to_black_color(
static void virtual_stream_encoder_stop_hdmi_info_packets(
struct stream_encoder *enc) {}
+static void virtual_stream_encoder_set_avmute(
+ struct stream_encoder *enc,
+ bool enable) {}
static void virtual_stream_encoder_update_dp_info_packets(
struct stream_encoder *enc,
const struct encoder_info_frame *info_frame) {}
virtual_stream_encoder_dp_unblank,
.audio_mute_control = virtual_audio_mute_control,
+ .set_avmute = virtual_stream_encoder_set_avmute,
};
bool virtual_stream_encoder_construct(