diff options
author | david.li <david.li@starfivetech.com> | 2021-08-04 11:14:03 +0300 |
---|---|---|
committer | david.li <david.li@starfivetech.com> | 2021-08-04 11:14:03 +0300 |
commit | 926865792b02aa91f34947b87770e596db8e4c62 (patch) | |
tree | 8c0153a02f9472e740eb28154d2667635e3e7f62 | |
parent | 209b5ca08e98029b23916265984bb88d7ebbaf72 (diff) | |
download | linux-926865792b02aa91f34947b87770e596db8e4c62.tar.xz |
[starfive][lcd][Dynamic identification 1080*1920 && 800*480]
-rwxr-xr-x[-rw-r--r--] | drivers/media/platform/starfive/imx219_mipi.c | 4 | ||||
-rwxr-xr-x | drivers/media/platform/starfive/imx219_mipi_sub.c | 4 | ||||
-rwxr-xr-x | drivers/media/platform/starfive/stf_vin.c | 6 | ||||
-rwxr-xr-x[-rw-r--r--] | drivers/video/fbdev/starfive/starfive_fb.c | 15 |
4 files changed, 20 insertions, 9 deletions
diff --git a/drivers/media/platform/starfive/imx219_mipi.c b/drivers/media/platform/starfive/imx219_mipi.c index 6004bbbaecc9..324747d6f576 100644..100755 --- a/drivers/media/platform/starfive/imx219_mipi.c +++ b/drivers/media/platform/starfive/imx219_mipi.c @@ -329,7 +329,7 @@ static int imx219_probe(struct i2c_client *client, struct imx219 *imx219; struct device_node *np = client->dev.of_node; int ret; - MIPI_INFO("imx219_probe enter\n"); + MIPI_INFO("imx219_probe main enter\n"); imx219 = devm_kzalloc(dev, sizeof(struct imx219), GFP_KERNEL); if (!imx219) @@ -401,7 +401,7 @@ static struct i2c_driver imx219_i2c_driver = { static __init int init_imx219(void) { int err; - + printk(" init_imx219 main\n"); err = i2c_add_driver(&imx219_i2c_driver); if (err != 0) printk("i2c driver registration failed, error=%d\n", err); diff --git a/drivers/media/platform/starfive/imx219_mipi_sub.c b/drivers/media/platform/starfive/imx219_mipi_sub.c index f23293bc5a81..1548fed0b437 100755 --- a/drivers/media/platform/starfive/imx219_mipi_sub.c +++ b/drivers/media/platform/starfive/imx219_mipi_sub.c @@ -329,7 +329,7 @@ static int imx219_probe(struct i2c_client *client, struct imx219 *imx219; struct device_node *np = client->dev.of_node; int ret; - MIPI_INFO("imx219_probe enter\n"); + MIPI_INFO("imx219_probe enter sub\n"); imx219 = devm_kzalloc(dev, sizeof(struct imx219), GFP_KERNEL); if (!imx219) @@ -401,7 +401,7 @@ static struct i2c_driver imx219_i2c_driver = { static __init int init_imx219rx1(void) { int err; - + printk("init_imx219rx1 sub\n"); err = i2c_add_driver(&imx219_i2c_driver); if (err != 0) printk("i2c driver registration failed, error=%d\n", err); diff --git a/drivers/media/platform/starfive/stf_vin.c b/drivers/media/platform/starfive/stf_vin.c index 3c6e7ac2ce73..5326316b5959 100755 --- a/drivers/media/platform/starfive/stf_vin.c +++ b/drivers/media/platform/starfive/stf_vin.c @@ -709,7 +709,10 @@ static int vin_parse_dt(struct device *dev, struct stf_vin_dev *vin) vin->isp0 = of_property_read_bool(np, "isp0_enable"); vin->isp1 = of_property_read_bool(np, "isp1_enable"); of_property_read_u32(np, "csi-lane", &vin->csi_fmt.lane); - +#ifdef CONFIG_FB_STARFIVE_SEEED5INCH + vin->frame.width = 800; + vin->frame.height = 480; +#endif #ifdef CONFIG_VIDEO_STARFIVE_VIN_SENSOR_IMX219SUB of_property_read_u8_array(np, "csi1-dlane-swaps", vin->csi_fmt.dlane_swap, 4); of_property_read_u8_array(np, "csi1-dlane-pn-swaps", vin->csi_fmt.dlane_pn_swap, 4); @@ -719,7 +722,6 @@ static int vin_parse_dt(struct device *dev, struct stf_vin_dev *vin) of_property_read_u32(np, "csi1-width", &vin->csi_fmt.w); of_property_read_u32(np, "csi1-height", &vin->csi_fmt.h); of_property_read_u32(np, "csi1-dt", &vin->csi_fmt.dt); - #else of_property_read_u8_array(np, "csi-dlane-swaps", vin->csi_fmt.dlane_swap, 4); diff --git a/drivers/video/fbdev/starfive/starfive_fb.c b/drivers/video/fbdev/starfive/starfive_fb.c index 3ae6cfaa343b..923664f26387 100644..100755 --- a/drivers/video/fbdev/starfive/starfive_fb.c +++ b/drivers/video/fbdev/starfive/starfive_fb.c @@ -981,9 +981,18 @@ static int sf_fb_pp_init(struct sf_fb_data *sf_dev) { for (pp_id = 0; pp_id < PP_NUM; pp_id++) { if(1 == sf_dev->pp[pp_id].inited) { - ret = sf_fb_pp_video_mode_init(sf_dev, &src, &dst, pp_id); - if (!ret) - pp_config(sf_dev, pp_id, &src, &dst); +#ifdef CONFIG_FB_STARFIVE_SEEED5INCH + if (pp_id == 1) { + sf_dev->pp[pp_id].src.height = 480; + sf_dev->pp[pp_id].src.width = 800; + sf_dev->pp[pp_id].dst.height = 480; + sf_dev->pp[pp_id].dst.width = 800; + } +#endif + + ret = sf_fb_pp_video_mode_init(sf_dev, &src, &dst, pp_id); + if (!ret) + pp_config(sf_dev, pp_id, &src, &dst); } } |