.. | .. |
---|
33 | 33 | #include <media/v4l2-fwnode.h> |
---|
34 | 34 | #include <media/v4l2-subdev.h> |
---|
35 | 35 | #include "../platform/rockchip/isp/rkisp_tb_helper.h" |
---|
| 36 | +#include "cam-tb-setup.h" |
---|
36 | 37 | |
---|
37 | 38 | #define DRIVER_VERSION KERNEL_VERSION(0, 0x01, 0x02) |
---|
38 | 39 | #define GC2093_NAME "gc2093" |
---|
.. | .. |
---|
1612 | 1613 | |
---|
1613 | 1614 | |
---|
1614 | 1615 | #ifdef CONFIG_VIDEO_ROCKCHIP_THUNDER_BOOT_ISP |
---|
1615 | | -static u32 rk_cam_hdr; |
---|
1616 | | -static u32 rk_cam_w; |
---|
1617 | | -static u32 rk_cam_h; |
---|
1618 | | -static u32 rk_cam_fps; |
---|
1619 | | - |
---|
1620 | | -static int __init __maybe_unused rk_cam_hdr_setup(char *str) |
---|
1621 | | -{ |
---|
1622 | | - int ret = 0; |
---|
1623 | | - unsigned long val = 0; |
---|
1624 | | - |
---|
1625 | | - ret = kstrtoul(str, 0, &val); |
---|
1626 | | - if (!ret) |
---|
1627 | | - rk_cam_hdr = (u32)val; |
---|
1628 | | - else |
---|
1629 | | - pr_err("get rk_cam_hdr fail\n"); |
---|
1630 | | - return 1; |
---|
1631 | | -} |
---|
1632 | | - |
---|
1633 | | -static int __init __maybe_unused rk_cam_w_setup(char *str) |
---|
1634 | | -{ |
---|
1635 | | - int ret = 0; |
---|
1636 | | - unsigned long val = 0; |
---|
1637 | | - |
---|
1638 | | - ret = kstrtoul(str, 0, &val); |
---|
1639 | | - if (!ret) |
---|
1640 | | - rk_cam_w = (u32)val; |
---|
1641 | | - else |
---|
1642 | | - pr_err("get rk_cam_w fail\n"); |
---|
1643 | | - return 1; |
---|
1644 | | -} |
---|
1645 | | - |
---|
1646 | | -static int __init __maybe_unused rk_cam_h_setup(char *str) |
---|
1647 | | -{ |
---|
1648 | | - int ret = 0; |
---|
1649 | | - unsigned long val = 0; |
---|
1650 | | - |
---|
1651 | | - ret = kstrtoul(str, 0, &val); |
---|
1652 | | - if (!ret) |
---|
1653 | | - rk_cam_h = (u32)val; |
---|
1654 | | - else |
---|
1655 | | - pr_err("get rk_cam_h fail\n"); |
---|
1656 | | - return 1; |
---|
1657 | | -} |
---|
1658 | | - |
---|
1659 | | -static int __init __maybe_unused rk_cam_fps_setup(char *str) |
---|
1660 | | -{ |
---|
1661 | | - int ret = 0; |
---|
1662 | | - unsigned long val = 0; |
---|
1663 | | - |
---|
1664 | | - ret = kstrtoul(str, 0, &val); |
---|
1665 | | - if (!ret) |
---|
1666 | | - rk_cam_fps = (u32)val; |
---|
1667 | | - else |
---|
1668 | | - pr_err("get rk_cam_fps fail\n"); |
---|
1669 | | - return 1; |
---|
1670 | | -} |
---|
1671 | | - |
---|
1672 | | -__setup("rk_cam_hdr=", rk_cam_hdr_setup); |
---|
1673 | | -__setup("rk_cam_w=", rk_cam_w_setup); |
---|
1674 | | -__setup("rk_cam_h=", rk_cam_h_setup); |
---|
1675 | | -__setup("rk_cam_fps=", rk_cam_fps_setup); |
---|
1676 | | - |
---|
1677 | 1616 | static void find_terminal_resolution(struct gc2093 *gc2093) |
---|
1678 | 1617 | { |
---|
1679 | 1618 | int i = 0; |
---|
.. | .. |
---|
1682 | 1621 | u32 cur_fps = 0; |
---|
1683 | 1622 | u32 dst_fps = 0; |
---|
1684 | 1623 | u32 tmp_fps = 0; |
---|
| 1624 | + u32 rk_cam_hdr = get_rk_cam_hdr(); |
---|
| 1625 | + u32 rk_cam_w = get_rk_cam_w(); |
---|
| 1626 | + u32 rk_cam_h = get_rk_cam_h(); |
---|
| 1627 | + u32 rk_cam_fps = get_rk_cam_fps(); |
---|
1685 | 1628 | |
---|
1686 | 1629 | if (rk_cam_w == 0 || rk_cam_h == 0 || |
---|
1687 | 1630 | rk_cam_fps == 0) |
---|