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

media: aspeed: Extend debug message

updated as below:

Capture:
Mode : Direct fetch
VGA bpp mode : 32
Signal : lock
Width : 1920
Height : 1080
FRC : 0

Compression:
Format : JPEG
Subsampling : 444
Quality : 4

Performance:
Frame# : 4
Frame Duration(ms) :
Now : 22
Min : 21
Max : 22
FPS : 45

Signed-off-by: Jammy Huang <jammy_huang@aspeedtech.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>

authored by

Jammy Huang and committed by
Hans Verkuil
5b16db4f d4b9fd00

+37 -1
+37 -1
drivers/media/platform/aspeed/aspeed-video.c
··· 1904 1904 static int aspeed_video_debugfs_show(struct seq_file *s, void *data) 1905 1905 { 1906 1906 struct aspeed_video *v = s->private; 1907 + u32 val08; 1907 1908 1908 1909 seq_puts(s, "\n"); 1910 + 1911 + seq_puts(s, "Capture:\n"); 1912 + val08 = aspeed_video_read(v, VE_CTRL); 1913 + if (FIELD_GET(VE_CTRL_DIRECT_FETCH, val08)) { 1914 + seq_printf(s, " %-20s:\tDirect fetch\n", "Mode"); 1915 + seq_printf(s, " %-20s:\t%s\n", "VGA bpp mode", 1916 + FIELD_GET(VE_CTRL_INT_DE, val08) ? "16" : "32"); 1917 + } else { 1918 + seq_printf(s, " %-20s:\tSync\n", "Mode"); 1919 + seq_printf(s, " %-20s:\t%s\n", "Video source", 1920 + FIELD_GET(VE_CTRL_SOURCE, val08) ? 1921 + "external" : "internal"); 1922 + seq_printf(s, " %-20s:\t%s\n", "DE source", 1923 + FIELD_GET(VE_CTRL_INT_DE, val08) ? 1924 + "internal" : "external"); 1925 + seq_printf(s, " %-20s:\t%s\n", "Cursor overlay", 1926 + FIELD_GET(VE_CTRL_AUTO_OR_CURSOR, val08) ? 1927 + "Without" : "With"); 1928 + } 1909 1929 1910 1930 seq_printf(s, " %-20s:\t%s\n", "Signal", 1911 1931 v->v4l2_input_status ? "Unlock" : "Lock"); ··· 1935 1915 1936 1916 seq_puts(s, "\n"); 1937 1917 1918 + seq_puts(s, "Compression:\n"); 1919 + seq_printf(s, " %-20s:\t%s\n", "Format", format_str[v->format]); 1920 + seq_printf(s, " %-20s:\t%s\n", "Subsampling", 1921 + v->yuv420 ? "420" : "444"); 1922 + seq_printf(s, " %-20s:\t%d\n", "Quality", v->jpeg_quality); 1923 + if (v->format == VIDEO_FMT_ASPEED) { 1924 + seq_printf(s, " %-20s:\t%s\n", "HQ Mode", 1925 + v->hq_mode ? "on" : "off"); 1926 + seq_printf(s, " %-20s:\t%d\n", "HQ Quality", 1927 + v->hq_mode ? v->jpeg_hq_quality : 0); 1928 + } 1929 + 1930 + seq_puts(s, "\n"); 1931 + 1938 1932 seq_puts(s, "Performance:\n"); 1939 1933 seq_printf(s, " %-20s:\t%d\n", "Frame#", v->sequence); 1940 1934 seq_printf(s, " %-20s:\n", "Frame Duration(ms)"); 1941 1935 seq_printf(s, " %-18s:\t%d\n", "Now", v->perf.duration); 1942 1936 seq_printf(s, " %-18s:\t%d\n", "Min", v->perf.duration_min); 1943 1937 seq_printf(s, " %-18s:\t%d\n", "Max", v->perf.duration_max); 1944 - seq_printf(s, " %-20s:\t%d\n", "FPS", 1000 / (v->perf.totaltime / v->sequence)); 1938 + seq_printf(s, " %-20s:\t%d\n", "FPS", 1939 + (v->perf.totaltime && v->sequence) ? 1940 + 1000 / (v->perf.totaltime / v->sequence) : 0); 1945 1941 1946 1942 return 0; 1947 1943 }