hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/drivers/media/i2c/gc2093.c
....@@ -33,6 +33,7 @@
3333 #include <media/v4l2-fwnode.h>
3434 #include <media/v4l2-subdev.h>
3535 #include "../platform/rockchip/isp/rkisp_tb_helper.h"
36
+#include "cam-tb-setup.h"
3637
3738 #define DRIVER_VERSION KERNEL_VERSION(0, 0x01, 0x02)
3839 #define GC2093_NAME "gc2093"
....@@ -1612,68 +1613,6 @@
16121613
16131614
16141615 #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
-
16771616 static void find_terminal_resolution(struct gc2093 *gc2093)
16781617 {
16791618 int i = 0;
....@@ -1682,6 +1621,10 @@
16821621 u32 cur_fps = 0;
16831622 u32 dst_fps = 0;
16841623 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();
16851628
16861629 if (rk_cam_w == 0 || rk_cam_h == 0 ||
16871630 rk_cam_fps == 0)