mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-27 00:51:35 +00:00
media fixes for v4.19-rc5
-----BEGIN PGP SIGNATURE----- iQIcBAABAgAGBQJbqNUBAAoJEAhfPr2O5OEVruYP/jLw6Cd3koAQAZkbccn9ju5r 5zcSTCza9GAE7R0dsDhLEKT/N7lPdTFkYGKFTaoAMN79tgviPvm6LMQKOlh3h3Mc 3SWwGGBrsPYO0SmN7Lr14neG/6oHt6vupAIMJEbXMEukFqJRKdoYLTYx03LbVT4Y BPEP9h5LSZsi1bs9keBpDbcZ/BjJWmtEkspkZ7GNCmb9YPLEDX6yX4Ulft1HZajv wiH2gICw5cz0d6PiJpUo5STXnyy8y0U/Jh3gGbSxf7vTWJ5u5by2NaTIjs/8if2z 8GelvBVXFfTltQMJa9nrS2yuB4IX+Uj3qSmZoGZXia5Mg8E5OcNgJb8JOu0IPyaL pEdz0kY4iRl67Db8VwAnSU2Kka9AEnla7VinsnigxKb9IUknhLNKA0bMcLEVF+Lx lBSmsOisAAK6ARt5oVmJnOLh00YDm8RsSXVitQuQSm8fK4UJ+LcWe9ltclrN/WPf /8MnA34C/duLEeXG3yhDD3cxZnb8NmQ0VEdloA4ohOAdKO/RTDPGooKy4nXnQQs5 frF9qPwcCVOG64207uur3zveXzWx5aYoNelfQctKBjW4pZNw25H7yrgijVU8Df6A whoVhLVv1YtrGbcVZ1megS7aKUi/uc1pT56nerNibozFUquHi79oYRDINdejOARx dE0QOCbcrBhJfjIj6Vsg =Oquq -----END PGP SIGNATURE----- Merge tag 'media/v4.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Mauro briefly writes: "media fixes for v4.19-rc5 some drivers and Kbuild fixes" * tag 'media/v4.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: media: platform: fix cros-ec-cec build error media: staging/media/mt9t031/Kconfig: remove bogus entry media: i2c: mt9v111: Fix v4l2-ctrl error handling media: camss: add missing includes media: camss: Use managed memory allocations media: camss: mark PM functions as __maybe_unused media: af9035: prevent buffer overflow on write media: video_function_calls.rst: drop obsolete video-set-attributes reference
This commit is contained in:
commit
02214bfc89
13 changed files with 36 additions and 46 deletions
|
@ -33,4 +33,3 @@ Video Function Calls
|
||||||
video-clear-buffer
|
video-clear-buffer
|
||||||
video-set-streamtype
|
video-set-streamtype
|
||||||
video-set-format
|
video-set-format
|
||||||
video-set-attributes
|
|
||||||
|
|
|
@ -1159,41 +1159,21 @@ static int mt9v111_probe(struct i2c_client *client)
|
||||||
V4L2_CID_AUTO_WHITE_BALANCE,
|
V4L2_CID_AUTO_WHITE_BALANCE,
|
||||||
0, 1, 1,
|
0, 1, 1,
|
||||||
V4L2_WHITE_BALANCE_AUTO);
|
V4L2_WHITE_BALANCE_AUTO);
|
||||||
if (IS_ERR_OR_NULL(mt9v111->auto_awb)) {
|
|
||||||
ret = PTR_ERR(mt9v111->auto_awb);
|
|
||||||
goto error_free_ctrls;
|
|
||||||
}
|
|
||||||
|
|
||||||
mt9v111->auto_exp = v4l2_ctrl_new_std_menu(&mt9v111->ctrls,
|
mt9v111->auto_exp = v4l2_ctrl_new_std_menu(&mt9v111->ctrls,
|
||||||
&mt9v111_ctrl_ops,
|
&mt9v111_ctrl_ops,
|
||||||
V4L2_CID_EXPOSURE_AUTO,
|
V4L2_CID_EXPOSURE_AUTO,
|
||||||
V4L2_EXPOSURE_MANUAL,
|
V4L2_EXPOSURE_MANUAL,
|
||||||
0, V4L2_EXPOSURE_AUTO);
|
0, V4L2_EXPOSURE_AUTO);
|
||||||
if (IS_ERR_OR_NULL(mt9v111->auto_exp)) {
|
|
||||||
ret = PTR_ERR(mt9v111->auto_exp);
|
|
||||||
goto error_free_ctrls;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Initialize timings */
|
|
||||||
mt9v111->hblank = v4l2_ctrl_new_std(&mt9v111->ctrls, &mt9v111_ctrl_ops,
|
mt9v111->hblank = v4l2_ctrl_new_std(&mt9v111->ctrls, &mt9v111_ctrl_ops,
|
||||||
V4L2_CID_HBLANK,
|
V4L2_CID_HBLANK,
|
||||||
MT9V111_CORE_R05_MIN_HBLANK,
|
MT9V111_CORE_R05_MIN_HBLANK,
|
||||||
MT9V111_CORE_R05_MAX_HBLANK, 1,
|
MT9V111_CORE_R05_MAX_HBLANK, 1,
|
||||||
MT9V111_CORE_R05_DEF_HBLANK);
|
MT9V111_CORE_R05_DEF_HBLANK);
|
||||||
if (IS_ERR_OR_NULL(mt9v111->hblank)) {
|
|
||||||
ret = PTR_ERR(mt9v111->hblank);
|
|
||||||
goto error_free_ctrls;
|
|
||||||
}
|
|
||||||
|
|
||||||
mt9v111->vblank = v4l2_ctrl_new_std(&mt9v111->ctrls, &mt9v111_ctrl_ops,
|
mt9v111->vblank = v4l2_ctrl_new_std(&mt9v111->ctrls, &mt9v111_ctrl_ops,
|
||||||
V4L2_CID_VBLANK,
|
V4L2_CID_VBLANK,
|
||||||
MT9V111_CORE_R06_MIN_VBLANK,
|
MT9V111_CORE_R06_MIN_VBLANK,
|
||||||
MT9V111_CORE_R06_MAX_VBLANK, 1,
|
MT9V111_CORE_R06_MAX_VBLANK, 1,
|
||||||
MT9V111_CORE_R06_DEF_VBLANK);
|
MT9V111_CORE_R06_DEF_VBLANK);
|
||||||
if (IS_ERR_OR_NULL(mt9v111->vblank)) {
|
|
||||||
ret = PTR_ERR(mt9v111->vblank);
|
|
||||||
goto error_free_ctrls;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* PIXEL_RATE is fixed: just expose it to user space. */
|
/* PIXEL_RATE is fixed: just expose it to user space. */
|
||||||
v4l2_ctrl_new_std(&mt9v111->ctrls, &mt9v111_ctrl_ops,
|
v4l2_ctrl_new_std(&mt9v111->ctrls, &mt9v111_ctrl_ops,
|
||||||
|
@ -1201,6 +1181,10 @@ static int mt9v111_probe(struct i2c_client *client)
|
||||||
DIV_ROUND_CLOSEST(mt9v111->sysclk, 2), 1,
|
DIV_ROUND_CLOSEST(mt9v111->sysclk, 2), 1,
|
||||||
DIV_ROUND_CLOSEST(mt9v111->sysclk, 2));
|
DIV_ROUND_CLOSEST(mt9v111->sysclk, 2));
|
||||||
|
|
||||||
|
if (mt9v111->ctrls.error) {
|
||||||
|
ret = mt9v111->ctrls.error;
|
||||||
|
goto error_free_ctrls;
|
||||||
|
}
|
||||||
mt9v111->sd.ctrl_handler = &mt9v111->ctrls;
|
mt9v111->sd.ctrl_handler = &mt9v111->ctrls;
|
||||||
|
|
||||||
/* Start with default configuration: 640x480 UYVY. */
|
/* Start with default configuration: 640x480 UYVY. */
|
||||||
|
@ -1226,26 +1210,27 @@ static int mt9v111_probe(struct i2c_client *client)
|
||||||
mt9v111->pad.flags = MEDIA_PAD_FL_SOURCE;
|
mt9v111->pad.flags = MEDIA_PAD_FL_SOURCE;
|
||||||
ret = media_entity_pads_init(&mt9v111->sd.entity, 1, &mt9v111->pad);
|
ret = media_entity_pads_init(&mt9v111->sd.entity, 1, &mt9v111->pad);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto error_free_ctrls;
|
goto error_free_entity;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ret = mt9v111_chip_probe(mt9v111);
|
ret = mt9v111_chip_probe(mt9v111);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto error_free_ctrls;
|
goto error_free_entity;
|
||||||
|
|
||||||
ret = v4l2_async_register_subdev(&mt9v111->sd);
|
ret = v4l2_async_register_subdev(&mt9v111->sd);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto error_free_ctrls;
|
goto error_free_entity;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
error_free_ctrls:
|
error_free_entity:
|
||||||
v4l2_ctrl_handler_free(&mt9v111->ctrls);
|
|
||||||
|
|
||||||
#if IS_ENABLED(CONFIG_MEDIA_CONTROLLER)
|
#if IS_ENABLED(CONFIG_MEDIA_CONTROLLER)
|
||||||
media_entity_cleanup(&mt9v111->sd.entity);
|
media_entity_cleanup(&mt9v111->sd.entity);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
error_free_ctrls:
|
||||||
|
v4l2_ctrl_handler_free(&mt9v111->ctrls);
|
||||||
|
|
||||||
mutex_destroy(&mt9v111->pwr_mutex);
|
mutex_destroy(&mt9v111->pwr_mutex);
|
||||||
mutex_destroy(&mt9v111->stream_mutex);
|
mutex_destroy(&mt9v111->stream_mutex);
|
||||||
|
|
||||||
|
@ -1259,12 +1244,12 @@ static int mt9v111_remove(struct i2c_client *client)
|
||||||
|
|
||||||
v4l2_async_unregister_subdev(sd);
|
v4l2_async_unregister_subdev(sd);
|
||||||
|
|
||||||
v4l2_ctrl_handler_free(&mt9v111->ctrls);
|
|
||||||
|
|
||||||
#if IS_ENABLED(CONFIG_MEDIA_CONTROLLER)
|
#if IS_ENABLED(CONFIG_MEDIA_CONTROLLER)
|
||||||
media_entity_cleanup(&sd->entity);
|
media_entity_cleanup(&sd->entity);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
v4l2_ctrl_handler_free(&mt9v111->ctrls);
|
||||||
|
|
||||||
mutex_destroy(&mt9v111->pwr_mutex);
|
mutex_destroy(&mt9v111->pwr_mutex);
|
||||||
mutex_destroy(&mt9v111->stream_mutex);
|
mutex_destroy(&mt9v111->stream_mutex);
|
||||||
|
|
||||||
|
|
|
@ -541,6 +541,8 @@ config VIDEO_CROS_EC_CEC
|
||||||
depends on MFD_CROS_EC
|
depends on MFD_CROS_EC
|
||||||
select CEC_CORE
|
select CEC_CORE
|
||||||
select CEC_NOTIFIER
|
select CEC_NOTIFIER
|
||||||
|
select CHROME_PLATFORMS
|
||||||
|
select CROS_EC_PROTO
|
||||||
---help---
|
---help---
|
||||||
If you say yes here you will get support for the
|
If you say yes here you will get support for the
|
||||||
ChromeOS Embedded Controller's CEC.
|
ChromeOS Embedded Controller's CEC.
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
#include <linux/clk.h>
|
#include <linux/clk.h>
|
||||||
#include <linux/completion.h>
|
#include <linux/completion.h>
|
||||||
#include <linux/interrupt.h>
|
#include <linux/interrupt.h>
|
||||||
|
#include <linux/io.h>
|
||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
#include <linux/of.h>
|
#include <linux/of.h>
|
||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
|
|
||||||
#include <linux/delay.h>
|
#include <linux/delay.h>
|
||||||
#include <linux/interrupt.h>
|
#include <linux/interrupt.h>
|
||||||
|
#include <linux/io.h>
|
||||||
|
|
||||||
#define CAMSS_CSI_PHY_LNn_CFG2(n) (0x004 + 0x40 * (n))
|
#define CAMSS_CSI_PHY_LNn_CFG2(n) (0x004 + 0x40 * (n))
|
||||||
#define CAMSS_CSI_PHY_LNn_CFG3(n) (0x008 + 0x40 * (n))
|
#define CAMSS_CSI_PHY_LNn_CFG3(n) (0x008 + 0x40 * (n))
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
|
|
||||||
#include <linux/delay.h>
|
#include <linux/delay.h>
|
||||||
#include <linux/interrupt.h>
|
#include <linux/interrupt.h>
|
||||||
|
#include <linux/io.h>
|
||||||
|
|
||||||
#define CSIPHY_3PH_LNn_CFG1(n) (0x000 + 0x100 * (n))
|
#define CSIPHY_3PH_LNn_CFG1(n) (0x000 + 0x100 * (n))
|
||||||
#define CSIPHY_3PH_LNn_CFG1_SWI_REC_DLY_PRG (BIT(7) | BIT(6))
|
#define CSIPHY_3PH_LNn_CFG1_SWI_REC_DLY_PRG (BIT(7) | BIT(6))
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
#include <linux/clk.h>
|
#include <linux/clk.h>
|
||||||
#include <linux/delay.h>
|
#include <linux/delay.h>
|
||||||
#include <linux/interrupt.h>
|
#include <linux/interrupt.h>
|
||||||
|
#include <linux/io.h>
|
||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
#include <linux/of.h>
|
#include <linux/of.h>
|
||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
#include <linux/clk.h>
|
#include <linux/clk.h>
|
||||||
#include <linux/completion.h>
|
#include <linux/completion.h>
|
||||||
#include <linux/interrupt.h>
|
#include <linux/interrupt.h>
|
||||||
|
#include <linux/io.h>
|
||||||
#include <linux/iopoll.h>
|
#include <linux/iopoll.h>
|
||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
#include <linux/mutex.h>
|
#include <linux/mutex.h>
|
||||||
|
@ -1076,8 +1077,8 @@ int msm_ispif_subdev_init(struct ispif_device *ispif,
|
||||||
else
|
else
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
ispif->line = kcalloc(ispif->line_num, sizeof(*ispif->line),
|
ispif->line = devm_kcalloc(dev, ispif->line_num, sizeof(*ispif->line),
|
||||||
GFP_KERNEL);
|
GFP_KERNEL);
|
||||||
if (!ispif->line)
|
if (!ispif->line)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/interrupt.h>
|
#include <linux/interrupt.h>
|
||||||
|
#include <linux/io.h>
|
||||||
#include <linux/iopoll.h>
|
#include <linux/iopoll.h>
|
||||||
|
|
||||||
#include "camss-vfe.h"
|
#include "camss-vfe.h"
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/interrupt.h>
|
#include <linux/interrupt.h>
|
||||||
|
#include <linux/io.h>
|
||||||
#include <linux/iopoll.h>
|
#include <linux/iopoll.h>
|
||||||
|
|
||||||
#include "camss-vfe.h"
|
#include "camss-vfe.h"
|
||||||
|
|
|
@ -848,17 +848,18 @@ static int camss_probe(struct platform_device *pdev)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
camss->csiphy = kcalloc(camss->csiphy_num, sizeof(*camss->csiphy),
|
camss->csiphy = devm_kcalloc(dev, camss->csiphy_num,
|
||||||
GFP_KERNEL);
|
sizeof(*camss->csiphy), GFP_KERNEL);
|
||||||
if (!camss->csiphy)
|
if (!camss->csiphy)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
camss->csid = kcalloc(camss->csid_num, sizeof(*camss->csid),
|
camss->csid = devm_kcalloc(dev, camss->csid_num, sizeof(*camss->csid),
|
||||||
GFP_KERNEL);
|
GFP_KERNEL);
|
||||||
if (!camss->csid)
|
if (!camss->csid)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
camss->vfe = kcalloc(camss->vfe_num, sizeof(*camss->vfe), GFP_KERNEL);
|
camss->vfe = devm_kcalloc(dev, camss->vfe_num, sizeof(*camss->vfe),
|
||||||
|
GFP_KERNEL);
|
||||||
if (!camss->vfe)
|
if (!camss->vfe)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
@ -993,12 +994,12 @@ static const struct of_device_id camss_dt_match[] = {
|
||||||
|
|
||||||
MODULE_DEVICE_TABLE(of, camss_dt_match);
|
MODULE_DEVICE_TABLE(of, camss_dt_match);
|
||||||
|
|
||||||
static int camss_runtime_suspend(struct device *dev)
|
static int __maybe_unused camss_runtime_suspend(struct device *dev)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int camss_runtime_resume(struct device *dev)
|
static int __maybe_unused camss_runtime_resume(struct device *dev)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -402,8 +402,10 @@ static int af9035_i2c_master_xfer(struct i2c_adapter *adap,
|
||||||
if (msg[0].addr == state->af9033_i2c_addr[1])
|
if (msg[0].addr == state->af9033_i2c_addr[1])
|
||||||
reg |= 0x100000;
|
reg |= 0x100000;
|
||||||
|
|
||||||
ret = af9035_wr_regs(d, reg, &msg[0].buf[3],
|
ret = (msg[0].len >= 3) ? af9035_wr_regs(d, reg,
|
||||||
msg[0].len - 3);
|
&msg[0].buf[3],
|
||||||
|
msg[0].len - 3)
|
||||||
|
: -EOPNOTSUPP;
|
||||||
} else {
|
} else {
|
||||||
/* I2C write */
|
/* I2C write */
|
||||||
u8 buf[MAX_XFER_SIZE];
|
u8 buf[MAX_XFER_SIZE];
|
||||||
|
|
|
@ -1,9 +1,3 @@
|
||||||
config SOC_CAMERA_IMX074
|
|
||||||
tristate "imx074 support (DEPRECATED)"
|
|
||||||
depends on SOC_CAMERA && I2C
|
|
||||||
help
|
|
||||||
This driver supports IMX074 cameras from Sony
|
|
||||||
|
|
||||||
config SOC_CAMERA_MT9T031
|
config SOC_CAMERA_MT9T031
|
||||||
tristate "mt9t031 support (DEPRECATED)"
|
tristate "mt9t031 support (DEPRECATED)"
|
||||||
depends on SOC_CAMERA && I2C
|
depends on SOC_CAMERA && I2C
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue