media: add ioctl video layer1 on/off state in amvideo.[2/1]
authorRongrong Zhou <rongrong.zhou@amlogic.com>
Thu, 19 Oct 2017 09:34:06 +0000 (17:34 +0800)
committerJianxin Pan <jianxin.pan@amlogic.com>
Fri, 20 Oct 2017 09:37:30 +0000 (02:37 -0700)
PD#152453: add ioctl for OMX to get current video layer1 on/off state
for DRM TVP resource release.

Change-Id: I8a45869f63259500cbe8be7bc146793e6d7eb266
Signed-off-by: Rongrong Zhou <rongrong.zhou@amlogic.com>
drivers/amlogic/media/video_sink/video.c
include/linux/amlogic/media/utils/amstream.h

index f971eb6..7973a49 100644 (file)
@@ -6491,6 +6491,10 @@ static long amvideo_ioctl(struct file *file, unsigned int cmd, ulong arg)
                put_user(video_global_output, (u32 __user *)argp);
                break;
 
+       case AMSTREAM_IOC_GET_VIDEO_LAYER1_ON:
+               put_user(video_onoff_state, (u32 __user *)argp);
+               break;
+
        default:
                return -EINVAL;
        }
@@ -6528,6 +6532,7 @@ static long amvideo_compat_ioctl(struct file *file, unsigned int cmd, ulong arg)
        case AMSTREAM_IOC_GET_SOURCE_VIDEO_3D_TYPE:
        case AMSTREAM_IOC_GET_VSYNC_SLOW_FACTOR:
        case AMSTREAM_IOC_GLOBAL_GET_VIDEO_OUTPUT:
+       case AMSTREAM_IOC_GET_VIDEO_LAYER1_ON:
                arg = (unsigned long) compat_ptr(arg);
        case AMSTREAM_IOC_TRICKMODE:
        case AMSTREAM_IOC_VPAUSE:
index 7aa5f9f..b6fe978 100644 (file)
@@ -89,6 +89,7 @@
 #define AMSTREAM_IOC_VDECINFO _IOR((_A_M), 0x20, int)
 #define AMSTREAM_IOC_GLOBAL_GET_VIDEO_OUTPUT  _IOR((_A_M), 0x21, int)
 #define AMSTREAM_IOC_GLOBAL_SET_VIDEO_OUTPUT  _IOW((_A_M), 0x22, int)
+#define AMSTREAM_IOC_GET_VIDEO_LAYER1_ON  _IOR((_A_M), 0x23, int)
 
 #define AMSTREAM_IOC_APTS             _IOR((_A_M), 0x40, int)
 #define AMSTREAM_IOC_VPTS             _IOR((_A_M), 0x41, int)