Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

media: aspeed: Fix no complete irq for non-64-aligned width

In ast2500, engine will stop occasionally for 1360x768.

This is a bug which has been addressed, but the workaround is specific
for 1680 only. Here we make it more complete.

Signed-off-by: Jammy Huang <jammy_huang@aspeedtech.com>
Reviewed-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>

authored by

Jammy Huang and committed by
Mauro Carvalho Chehab
71ef8053 fd3e9d57

+9 -8
+9 -8
drivers/media/platform/aspeed-video.c
··· 916 916 /* Set capture/compression frame sizes */ 917 917 aspeed_video_calc_compressed_size(video, size); 918 918 919 - if (video->active_timings.width == 1680) { 919 + if (!IS_ALIGNED(act->width, 64)) { 920 920 /* 921 - * This is a workaround to fix a silicon bug on A1 and A2 922 - * revisions. Since it doesn't break capturing operation of 921 + * This is a workaround to fix a AST2500 silicon bug on A1 and 922 + * A2 revisions. Since it doesn't break capturing operation of 923 923 * other revisions, use it for all revisions without checking 924 - * the revision ID. It picked 1728 which is a very next 925 - * 64-pixels aligned value to 1680 to minimize memory bandwidth 924 + * the revision ID. It picked new width which is a very next 925 + * 64-pixels aligned value to minimize memory bandwidth 926 926 * and to get better access speed from video engine. 927 927 */ 928 - aspeed_video_write(video, VE_CAP_WINDOW, 929 - 1728 << 16 | act->height); 930 - size += (1728 - 1680) * video->active_timings.height; 928 + u32 width = ALIGN(act->width, 64); 929 + 930 + aspeed_video_write(video, VE_CAP_WINDOW, width << 16 | act->height); 931 + size = width * act->height; 931 932 } else { 932 933 aspeed_video_write(video, VE_CAP_WINDOW, 933 934 act->width << 16 | act->height);