mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 20:07:46 +09:00
tvin: vdin: add interface to get signalinfo [1/1]
PD#TV-2083 Problem: TVIN_IOC_G_SIG_INFO not complete enough Solution: add interface to get signalinfo Verify: Verify on TL1 Change-Id: I32f198f14dfcc1f8a8ee1f19c4065bd7d4d5dccc Signed-off-by: Xuhua Zhang <xuhua.zhang@amlogic.com>
This commit is contained in:
@@ -2272,6 +2272,28 @@ static long vdin_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
|
|||||||
mutex_unlock(&devp->fe_lock);
|
mutex_unlock(&devp->fe_lock);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case TVIN_IOC_G_FRONTEND_INFO: {
|
||||||
|
struct tvin_frontend_info_s info;
|
||||||
|
|
||||||
|
if ((!devp) || (!devp->fmt_info_p) || (!devp->curr_wr_vfe)) {
|
||||||
|
ret = -EFAULT;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
memset(&info, 0, sizeof(struct tvin_frontend_info_s));
|
||||||
|
mutex_lock(&devp->fe_lock);
|
||||||
|
info.cfmt = devp->parm.info.cfmt;
|
||||||
|
info.fps = devp->parm.info.fps;
|
||||||
|
info.colordepth = devp->prop.colordepth;
|
||||||
|
info.scan_mode = devp->fmt_info_p->scan_mode;
|
||||||
|
info.height = devp->curr_wr_vfe->vf.height;
|
||||||
|
info.width = devp->curr_wr_vfe->vf.width;
|
||||||
|
if (copy_to_user(argp, &info,
|
||||||
|
sizeof(struct tvin_frontend_info_s)))
|
||||||
|
ret = -EFAULT;
|
||||||
|
mutex_unlock(&devp->fe_lock);
|
||||||
|
break;
|
||||||
|
}
|
||||||
case TVIN_IOC_G_BUF_INFO: {
|
case TVIN_IOC_G_BUF_INFO: {
|
||||||
struct tvin_buf_info_s buf_info;
|
struct tvin_buf_info_s buf_info;
|
||||||
memset(&buf_info, 0, sizeof(buf_info));
|
memset(&buf_info, 0, sizeof(buf_info));
|
||||||
|
|||||||
@@ -316,6 +316,15 @@ struct tvin_info_s {
|
|||||||
unsigned int is_dvi;
|
unsigned int is_dvi;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct tvin_frontend_info_s {
|
||||||
|
enum tvin_scan_mode_e scan_mode;
|
||||||
|
enum tvin_color_fmt_e cfmt;
|
||||||
|
unsigned int fps;
|
||||||
|
unsigned int width;
|
||||||
|
unsigned int height;
|
||||||
|
unsigned int colordepth;
|
||||||
|
};
|
||||||
|
|
||||||
struct tvin_buf_info_s {
|
struct tvin_buf_info_s {
|
||||||
unsigned int vf_size;
|
unsigned int vf_size;
|
||||||
unsigned int buf_count;
|
unsigned int buf_count;
|
||||||
@@ -438,6 +447,8 @@ struct tvafe_pin_mux_s {
|
|||||||
#define TVIN_IOC_SET_AUTO_RATIO_EN _IOW(_TM_T, 0x4c, unsigned int)
|
#define TVIN_IOC_SET_AUTO_RATIO_EN _IOW(_TM_T, 0x4c, unsigned int)
|
||||||
#define TVIN_IOC_GET_LATENCY_MODE _IOR(_TM_T, 0x4d,\
|
#define TVIN_IOC_GET_LATENCY_MODE _IOR(_TM_T, 0x4d,\
|
||||||
struct tvin_latency_s)
|
struct tvin_latency_s)
|
||||||
|
#define TVIN_IOC_G_FRONTEND_INFO _IOR(_TM_T, 0x4e,\
|
||||||
|
struct tvin_frontend_info_s)
|
||||||
|
|
||||||
/* TVAFE */
|
/* TVAFE */
|
||||||
#define TVIN_IOC_S_AFE_VGA_PARM _IOW(_TM_T, 0x16, struct tvafe_vga_parm_s)
|
#define TVIN_IOC_S_AFE_VGA_PARM _IOW(_TM_T, 0x16, struct tvafe_vga_parm_s)
|
||||||
|
|||||||
Reference in New Issue
Block a user