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: add more debug log messages

The new messages are listed as below:
1. jpeg header and capture buffer information
2. information for each irq
3. current capture mode, sync or direct-fetch
4. time consumed for each frame
5. input timing changed information

[hverkuil: use %pad for dma_addr_t to avoid compiler warnings]

Signed-off-by: Jammy Huang <jammy_huang@aspeedtech.com>
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
fd3e9d57 a3de90af

+24
+24
drivers/media/platform/aspeed-video.c
··· 482 482 483 483 static void update_perf(struct aspeed_video_perf *p) 484 484 { 485 + struct aspeed_video *v = container_of(p, struct aspeed_video, 486 + perf); 487 + 485 488 p->duration = 486 489 ktime_to_ms(ktime_sub(ktime_get(), p->last_sample)); 487 490 p->totaltime += p->duration; 488 491 489 492 p->duration_max = max(p->duration, p->duration_max); 490 493 p->duration_min = min(p->duration, p->duration_min); 494 + v4l2_dbg(2, debug, &v->v4l2_dev, "time consumed: %d ms\n", 495 + p->duration); 491 496 } 492 497 493 498 static int aspeed_video_start_frame(struct aspeed_video *video) ··· 621 616 * enabled; ignore them if so. 622 617 */ 623 618 sts &= aspeed_video_read(video, VE_INTERRUPT_CTRL); 619 + 620 + v4l2_dbg(2, debug, &video->v4l2_dev, "irq sts=%#x %s%s%s%s\n", sts, 621 + sts & VE_INTERRUPT_MODE_DETECT_WD ? ", unlock" : "", 622 + sts & VE_INTERRUPT_MODE_DETECT ? ", lock" : "", 623 + sts & VE_INTERRUPT_CAPTURE_COMPLETE ? ", capture-done" : "", 624 + sts & VE_INTERRUPT_COMP_COMPLETE ? ", comp-done" : ""); 624 625 625 626 /* 626 627 * Resolution changed or signal was lost; reset the engine and ··· 938 927 939 928 /* Don't use direct mode below 1024 x 768 (irqs don't fire) */ 940 929 if (size < DIRECT_FETCH_THRESHOLD) { 930 + v4l2_dbg(1, debug, &video->v4l2_dev, "Capture: Sync Mode\n"); 941 931 aspeed_video_write(video, VE_TGS_0, 942 932 FIELD_PREP(VE_TGS_FIRST, 943 933 video->frame_left - 1) | ··· 950 938 video->frame_bottom + 1)); 951 939 aspeed_video_update(video, VE_CTRL, 0, VE_CTRL_INT_DE); 952 940 } else { 941 + v4l2_dbg(1, debug, &video->v4l2_dev, "Capture: Direct Mode\n"); 953 942 aspeed_video_update(video, VE_CTRL, 0, VE_CTRL_DIRECT_FETCH); 954 943 } 955 944 ··· 967 954 if (!aspeed_video_alloc_buf(video, &video->srcs[1], size)) 968 955 goto err_mem; 969 956 957 + v4l2_dbg(1, debug, &video->v4l2_dev, "src buf0 addr(%pad) size(%d)\n", 958 + &video->srcs[0].dma, video->srcs[0].size); 959 + v4l2_dbg(1, debug, &video->v4l2_dev, "src buf1 addr(%pad) size(%d)\n", 960 + &video->srcs[1].dma, video->srcs[1].size); 970 961 aspeed_video_write(video, VE_SRC0_ADDR, video->srcs[0].dma); 971 962 aspeed_video_write(video, VE_SRC1_ADDR, video->srcs[1].dma); 972 963 } ··· 1235 1218 1236 1219 timings->type = V4L2_DV_BT_656_1120; 1237 1220 1221 + v4l2_dbg(1, debug, &video->v4l2_dev, "set new timings(%dx%d)\n", 1222 + timings->bt.width, timings->bt.height); 1223 + 1238 1224 return 0; 1239 1225 } 1240 1226 ··· 1418 1398 .u.src_change.changes = V4L2_EVENT_SRC_CH_RESOLUTION, 1419 1399 }; 1420 1400 1401 + v4l2_dbg(1, debug, &video->v4l2_dev, "fire source change event\n"); 1421 1402 v4l2_event_queue(&video->vdev, &ev); 1422 1403 } else if (test_bit(VIDEO_STREAMING, &video->flags)) { 1423 1404 /* No resolution change so just restart streaming */ ··· 1754 1733 dev_err(dev, "Unable to request IRQ %d\n", irq); 1755 1734 return rc; 1756 1735 } 1736 + dev_info(video->dev, "irq %d\n", irq); 1757 1737 1758 1738 video->eclk = devm_clk_get(dev, "eclk"); 1759 1739 if (IS_ERR(video->eclk)) { ··· 1791 1769 rc = -ENOMEM; 1792 1770 goto err_release_reserved_mem; 1793 1771 } 1772 + dev_info(video->dev, "alloc mem size(%d) at %pad for jpeg header\n", 1773 + VE_JPEG_HEADER_SIZE, &video->jpeg.dma); 1794 1774 1795 1775 aspeed_video_init_jpeg_table(video->jpeg.virt, video->yuv420); 1796 1776