// send cmd
status = dc_wake_and_execute_dmub_cmd(dc->ctx, &cmd, DM_DMUB_WAIT_TYPE_WAIT);
+ // Update firmware_controlled_hdr_info_packet state on successful command execution
+ if (status && pipe_ctx)
+ pipe_ctx->stream->firmware_controlled_hdr_info_packet = enable;
+
return status;
}
enum dc_drr_trigger_mode drr_trigger_mode;
struct dc_update_scratch_space *update_scratch;
+ bool firmware_controlled_hdr_info_packet;
};
#define ABM_LEVEL_IMMEDIATE_DISABLE 255
&info_frame->spd,
true);
}
- if (info_frame->hdrsmd.valid) {
+ /* While smart power oled is enabled DMUB is scanning the contents of each frame
+ * and updating the HDR infopacket contents. Therefore we transition the infopacket
+ * programming control to DMUB while Smart Power OLED is enabled.
+ */
+ if (info_frame->hdrsmd.valid && !info_frame->firmware_controlled_hdr_info_packet) {
enc->vpg->funcs->update_generic_info_packet(
enc->vpg,
3, /* packetIndex */
&info_frame->spd,
true);
- if (info_frame->hdrsmd.valid)
+ if (info_frame->hdrsmd.valid && !info_frame->firmware_controlled_hdr_info_packet)
enc->vpg->funcs->update_generic_info_packet(
enc->vpg,
3, /* packetIndex */
pipe_ctx->stream_res.hpo_dp_stream_enc,
&pipe_ctx->stream_res.encoder_info_frame);
+ pipe_ctx->stream_res.encoder_info_frame.firmware_controlled_hdr_info_packet
+ = pipe_ctx->stream->firmware_controlled_hdr_info_packet;
+
pipe_ctx->stream_res.hpo_dp_stream_enc->funcs->update_dp_info_packets(
pipe_ctx->stream_res.hpo_dp_stream_enc,
&pipe_ctx->stream_res.encoder_info_frame);
pipe_ctx->stream_res.stream_enc,
&pipe_ctx->stream_res.encoder_info_frame);
+ pipe_ctx->stream_res.encoder_info_frame.firmware_controlled_hdr_info_packet
+ = pipe_ctx->stream->firmware_controlled_hdr_info_packet;
+
pipe_ctx->stream_res.stream_enc->funcs->update_dp_info_packets(
pipe_ctx->stream_res.stream_enc,
&pipe_ctx->stream_res.encoder_info_frame);
/* Adaptive Sync SDP*/
struct dc_info_packet adaptive_sync;
struct enc_sdp_line_num sdp_line_num;
+ bool firmware_controlled_hdr_info_packet;
};
struct encoder_unblank_param {