Skip to content

Commit d93cce0

Browse files
Liu Yingjasonimx
authored andcommitted
LF-16696 drm/imx: dpu95-h/vscaler: Initialize stream_id
The below patch kind of introduced a bug as it should have initialized the stream_id members of struct dpu95_hscaler and struct dpu95_vscaler to be DPU95_HSCALER_NO_STREAM_ID and DPU95_VSCALER_NO_STREAM_ID respectively. Before that patch, the initialization is usually done by sheer chance to the "no stream id" status by calling set_no_stream_id() callback in dpu95_crtc_atomic_flush_scalers()/dpu95_crtc_atomic_flush() with the first atomic commit because the scalers are usually not enabled by that commit. LF-16347 drm/imx: dpu95-kms: Avoid scaler engines from being accidentally disabled To fix the issue, explicitly initialize stream_id in dpu95_{h,v}s_init(). Without the fix, the initial value of stream_id is zero, which would be taken as display stream 0 and hence display stream 1 would fail to use the scalers if display stream 1 is the first one to use them. Reviewed-by: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com> Signed-off-by: Liu Ying <victor.liu@nxp.com> Acked-by: Jason Liu <jason.hui.liu@nxp.com>
1 parent a0f9b7e commit d93cce0

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

drivers/gpu/drm/imx/dpu95/dpu95-hscaler.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,7 @@ int dpu95_hs_init(struct dpu95_soc *dpu, unsigned int index,
310310
hs->index = index;
311311
hs->link_id = dpu95_hs_link_id[index];
312312
hs->ops = &dpu95_hs_ops;
313+
hs->stream_id = DPU95_HSCALER_NO_STREAM_ID;
313314

314315
return 0;
315316
}

drivers/gpu/drm/imx/dpu95/dpu95-vscaler.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,7 @@ int dpu95_vs_init(struct dpu95_soc *dpu, unsigned int index,
309309
vs->index = index;
310310
vs->link_id = dpu95_vs_link_id[index];
311311
vs->ops = &dpu95_vs_ops;
312+
vs->stream_id = DPU95_VSCALER_NO_STREAM_ID;
312313

313314
return 0;
314315
}

0 commit comments

Comments
 (0)