mirror of https://gitee.com/openkylin/linux.git
drm/amd/display: Check for valid stream_encode
Before accessing it's vtable, check that stream_encoder is non-null. Signed-off-by: Ilya Bakoulin <Ilya.Bakoulin@amd.com> Reviewed-by: Eric Bernstein <Eric.Bernstein@amd.com> Acked-by: Leo Li <sunpeng.li@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
c7990daebe
commit
288af96df1
|
@ -612,7 +612,8 @@ bool dc_stream_set_dynamic_metadata(struct dc *dc,
|
|||
|
||||
pipe_ctx->stream->dmdata_address = attr->address;
|
||||
|
||||
if (pipe_ctx->stream_res.stream_enc->funcs->set_dynamic_metadata != NULL) {
|
||||
if (pipe_ctx->stream_res.stream_enc &&
|
||||
pipe_ctx->stream_res.stream_enc->funcs->set_dynamic_metadata != NULL) {
|
||||
if (pipe_ctx->stream->dmdata_address.quad_part != 0) {
|
||||
/* if using dynamic meta, don't set up generic infopackets */
|
||||
pipe_ctx->stream_res.encoder_info_frame.hdrsmd.valid = false;
|
||||
|
|
Loading…
Reference in New Issue