msm: camera: sensor: Dump phy registers on error

Dump csiphy registers on following fatal errors:
1. lane overflow error
2. unbounded frame error
3. SOT ans EOT reception error
4. stream underflow error
These errors irqs are set at csid end, Currently there is no
interface to send message from one subdevice to other if the subdev is
not a real time device. This change adds an interface to notify the
no real time subdev.

CRs-Fixed: 2696744
Change-Id: I522167d1639ac298bc739a8a5a380a01356f0776
Signed-off-by: Vishal Verma <vishverm@codeaurora.org>
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
Цей коміт міститься в:
Vishal Verma
2020-04-02 20:43:26 +05:30
зафіксовано Jigar Agrawal
джерело 1b7fd53958
коміт 1435a8a68b
14 змінених файлів з 139 додано та 4 видалено

Переглянути файл

@@ -640,6 +640,24 @@ void cam_video_device_cleanup(void)
g_dev.video = NULL;
}
void cam_subdev_notify_message(u32 subdev_type,
enum cam_subdev_message_type_t message_type,
uint32_t data)
{
struct v4l2_subdev *sd = NULL;
struct cam_subdev *csd = NULL;
list_for_each_entry(sd, &g_dev.v4l2_dev->subdevs, list) {
sd->entity.name = video_device_node_name(sd->devnode);
if (sd->entity.function == subdev_type) {
csd = container_of(sd, struct cam_subdev, sd);
if (csd->msg_cb != NULL)
csd->msg_cb(sd, message_type, data);
}
}
}
EXPORT_SYMBOL(cam_subdev_notify_message);
int cam_register_subdev(struct cam_subdev *csd)
{
struct v4l2_subdev *sd;
@@ -660,7 +678,7 @@ int cam_register_subdev(struct cam_subdev *csd)
sd = &csd->sd;
v4l2_subdev_init(sd, csd->ops);
sd->internal_ops = csd->internal_ops;
snprintf(sd->name, ARRAY_SIZE(sd->name), csd->name);
snprintf(sd->name, V4L2_SUBDEV_NAME_SIZE, "%s", csd->name);
v4l2_set_subdevdata(sd, csd->token);
sd->flags = csd->sd_flags;

Переглянути файл

@@ -16,6 +16,10 @@
#define CAM_SUBDEVICE_EVENT_MAX 30
enum cam_subdev_message_type_t {
CAM_SUBDEV_MESSAGE_IRQ_ERR = 0x1
};
/**
* struct cam_subdev - describes a camera sub-device
*
@@ -49,8 +53,26 @@ struct cam_subdev {
u32 sd_flags;
void *token;
u32 ent_function;
void (*msg_cb)(
struct v4l2_subdev *sd,
enum cam_subdev_message_type_t msg_type,
uint32_t data);
};
/**
* cam_subdev_notify_message()
*
* @brief: Notify message to a subdevs of specific type
*
* @subdev_type: Subdev type
* @message_type: message type
* @data: data to be delivered.
*
*/
void cam_subdev_notify_message(u32 subdev_type,
enum cam_subdev_message_type_t message_type,
uint32_t data);
/**
* cam_subdev_probe()
*