mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 11:26:02 +09:00
drm/rockchip: vop2: Check writeback fifo depth
The fifo depth of RK356X/RK3588 writeback is 1920x4/16. A fifo_throd larger than this value will cause a empty(zero) writeback. Signed-off-by: Andy Yan <andy.yan@rock-chips.com> Change-Id: Id67209f7b162608dcba191ab23cf6eec11e3fc08
This commit is contained in:
@@ -852,6 +852,7 @@ struct vop2_wb_data {
|
||||
const uint32_t *formats;
|
||||
struct vop_rect max_output;
|
||||
const struct vop2_wb_regs *regs;
|
||||
uint32_t fifo_depth;
|
||||
};
|
||||
|
||||
struct vop2_video_port_data {
|
||||
|
||||
@@ -2730,6 +2730,8 @@ static void vop2_wb_commit(struct drm_crtc *crtc)
|
||||
spin_unlock_irqrestore(&wb->job_lock, flags);
|
||||
|
||||
fifo_throd = fb->pitches[0] >> 4;
|
||||
if (fifo_throd >= vop2->data->wb->fifo_depth)
|
||||
fifo_throd = vop2->data->wb->fifo_depth;
|
||||
r2y = is_yuv_support(fb->format->format) && (!is_yuv_output(vcstate->bus_format));
|
||||
|
||||
/*
|
||||
|
||||
@@ -650,6 +650,7 @@ static const struct vop2_wb_data rk3568_vop_wb_data = {
|
||||
.formats = formats_wb,
|
||||
.nformats = ARRAY_SIZE(formats_wb),
|
||||
.max_output = { 1920, 1080 },
|
||||
.fifo_depth = 1920 * 4 / 16,
|
||||
.regs = &rk3568_vop_wb_regs,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user