1
0
Fork 0

MGS-4265 gpu: imx: dpu-blit: fix video hang with g2d compositor

video playback cause system hang with Wayland g2d compositor,
this also can be reproduced with Android G2D HWComposer.

the problem is second prg not handled between GPU and video.
need re-enable dprc & prg pipes when modifier changed.

Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
(cherry picked from commit 8ca7df522719ac94d126d34618cc9d25a2798660)
5.4-rM2-2.2.x-imx-squashed
Xianzhong 2018-09-20 02:47:16 +08:00 committed by Dong Aisheng
parent e9cbdf8cb7
commit 4137cd8a5d
2 changed files with 13 additions and 1 deletions

View File

@ -110,6 +110,7 @@ void dpu_be_configure_prefetch(struct dpu_bliteng *dpu_be,
u64 baddr, u64 uv_addr)
{
struct dprc *dprc;
bool dprc_en=false;
/* Enable DPR, dprc1 is connected to plane0 */
dprc = dpu_be->dprc[1];
@ -133,6 +134,13 @@ void dpu_be_configure_prefetch(struct dpu_bliteng *dpu_be,
return;
}
if (dpu_be->modifier != modifier && !dpu_be->start) {
dprc_disable(dprc);
dprc_en = true;
}
dpu_be->modifier = modifier;
dprc_configure(dprc, 0,
width, height,
x_offset, y_offset,
@ -142,7 +150,7 @@ void dpu_be_configure_prefetch(struct dpu_bliteng *dpu_be,
dpu_be->start,
false);
if (dpu_be->start) {
if (dpu_be->start || dprc_en) {
dprc_enable(dprc);
}
@ -406,6 +414,8 @@ int dpu_bliteng_init(struct dpu_bliteng *dpu_bliteng)
dpu_bliteng->start = true;
dpu_bliteng->sync = false;
dpu_bliteng->modifier = 0;
return 0;
}
EXPORT_SYMBOL_GPL(dpu_bliteng_init);

View File

@ -40,6 +40,8 @@ struct dpu_bliteng {
bool start;
bool sync;
u64 modifier;
};
#endif