1
0
Fork 0

MLK-19689 drm/imx/dcss: Fix scaler freeze on channel-0

For channel 0 if 1920x1080@NV12 was used when setting a mode would
freeze the scaler. That's because the chroma vertical size was set to
540 (1920 / 2) instead of 544 (which is divisible to 8).

This patch makes sure we round up the chroma vertical size for channel-0
properly.

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
pull/10/head
Laurentiu Palcu 2018-10-17 11:28:36 +03:00 committed by Jason Liu
parent 83b8756e5b
commit b2aae035d8
1 changed files with 3 additions and 2 deletions

View File

@ -339,6 +339,7 @@ void dcss_dpr_set_res(struct dcss_soc *dcss, int ch_num, u32 xres, u32 yres,
for (plane = 0; plane < max_planes; plane++) {
yres = plane == 1 ? yres >> 1 : yres;
adj_h = plane == 1 ? adj_h >> 1 : adj_h;
pix_x_wide = dcss_dpr_x_pix_wide_adjust(ch, xres, pix_format);
pix_y_high = dcss_dpr_y_pix_high_adjust(ch, yres, pix_format);
@ -347,8 +348,8 @@ void dcss_dpr_set_res(struct dcss_soc *dcss, int ch_num, u32 xres, u32 yres,
if (pix_x_wide < adj_w)
pix_x_wide = adj_w;
if (pix_y_high != adj_h)
pix_y_high = plane == 0 ? adj_h : adj_h >> 1;
if (pix_y_high < adj_h)
pix_y_high = adj_h;
if (plane == 0)
ch->pitch = pix_x_wide;