From patchwork Wed May 8 11:37:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 163629 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:81:0:0:0:0 with SMTP id l1csp2553805ilm; Wed, 8 May 2019 04:38:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqyHMuhtdIOX+IbOS7qRV6mLgn0NGSeSsjSWOMoQ5eW2Lbr3WqxLDqh1QnDoE1vYIEPoe2FH X-Received: by 2002:a63:fa4a:: with SMTP id g10mr19785663pgk.147.1557315495794; Wed, 08 May 2019 04:38:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557315495; cv=none; d=google.com; s=arc-20160816; b=ORexYVP6nLF0y4ibNTmvXhdxR23nYfMTqQW1YnQpBvNU4rrwLdJurtE5FcLkSBXNPC g+fR32WzPGcQf4wbImXD8+RSAaBdJ4ruhK81zyOQ2Pc30PHQ+yoS8bZIvUiurSPpNscd AMBbjWcJyvwWFmS/Vz6aLpKNLsl3xCt5ncFKxhtK7zBQFdsSDT9XQ8YManwDdhFojSnZ 6ACAMCnww7/ZLRyjNW+a8wEm2/9vxt77EPY4psEqt8rhqV+FxDlktcrfQha1iPq4d6qc UyAgpPzk4zo/2KHCBSAuYv3sYJLPwt4RXFtimmLGDxjGZXpE9MtfP3FZF4mc5lEtiwdi IOJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=+SyLCGKQZVZPU6RL6iNDUpQzPqwKhYQ4Nyrk4MwksBs=; b=cYx0wv8GPPS3VHuqPJOkrEZk1oRCNtHbrwyS6BiGj4bmgfhRu+pDDyNgFOsA+vkEX4 2YupkC2C2ziKI5mTrDtvbiWy0KUwHhLaQxKhXEFLITmIq9qqqiqM9pZX0S/z4RybMD4l 1EP+GVdldtLIGhfNWkz6YpUq7bfv84ZNtGt/gmVC6JL7RrLd4r66bHZtD221bSiyBE+/ ztWZL4EoHTgq51OFyHveHKFMeVt2VNncEoXgbkND2OKAS4RxSGcutChRl2iudT6QXyRv J8jwbUPr5rpb6v4RpQ5nQgiX6xrVN83kHF2b2NN60oD+vtP4GvkaCS5GWI/PLfX4+qlF O4gw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=H4L+4rhn; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r39si23135828pld.10.2019.05.08.04.38.15; Wed, 08 May 2019 04:38:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=H4L+4rhn; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727734AbfEHLiO (ORCPT + 15 others); Wed, 8 May 2019 07:38:14 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:40150 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727693AbfEHLiO (ORCPT ); Wed, 8 May 2019 07:38:14 -0400 Received: by mail-wm1-f65.google.com with SMTP id h11so2804039wmb.5 for ; Wed, 08 May 2019 04:38:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=+SyLCGKQZVZPU6RL6iNDUpQzPqwKhYQ4Nyrk4MwksBs=; b=H4L+4rhnt7nJyxUySG1D23U7M9pA5N7CS039VwgPFeog8c1Klhg8iWTRDlj8w6WBt2 5sItGQ+3VIqHal+WYVg6wp43BZm7t3BsDCDWbHZseIrR7Mh87mv/BdxJPCvcr2tsQy2q iS1Juki+Y76Q1bIFy1P+jHdFX5Wk1JvuKUQ53yaYwroRfFYA5gvxX7WsLQVC6j9bTINR KdENWoXqhrW86MJ2rtpD16eomAyw31yBAtLUK4QM1LPlSJCl+/Ho01vS8Lw7RuCHLeOw EF/I6soUFl2NVdwNrms2Brv8QFNqb5xdF+0ReSgAn4HgchKwtwWaTlelpv0+zpjyWB35 Z/OQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=+SyLCGKQZVZPU6RL6iNDUpQzPqwKhYQ4Nyrk4MwksBs=; b=R2B/ow8tZJmiAS61YNT52f86QGV0vNPDFt51009a4VCsfkcAZWxvrcZ59WU+rl6ph6 RkV2JFrUJ7Twnq4s1w1+f9t05QBcfRjPURV562dch7CoK59hFgd0+czp9LBQWb28gGcH X0mBXOOFFazIhzaId+7+mBqT/82s801uDNLQrmBSvwIK3xy5BMRaINuFT/C61PiljObj KtT0d7U+cq8ScRxkUvmVR6/JEk/0S5Od/VtrBEyR/lE8fuXRvug9psaK0ZP1U47sOvTP pP1iCjOPGOSRxYQvQPs1AQzYOGo7c21ka5dWSdXXq6AoJNE3i3R8pssslH5f0aRIy1AC 27Yw== X-Gm-Message-State: APjAAAXpCSorSoJmIkGxO6M0H6R76mtcL8QYxL3rDCjced7NnOcDSnX0 B7T8zdPto4/UZEV97O0Yz+m/OQ== X-Received: by 2002:a1c:eb07:: with SMTP id j7mr2656906wmh.138.1557315493184; Wed, 08 May 2019 04:38:13 -0700 (PDT) Received: from localhost.localdomain ([37.157.136.206]) by smtp.gmail.com with ESMTPSA id r2sm36077322wrr.65.2019.05.08.04.38.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 May 2019 04:38:12 -0700 (PDT) From: Stanimir Varbanov To: linux-media@vger.kernel.org Cc: Mauro Carvalho Chehab , Hans Verkuil , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Sakari Ailus , Stanimir Varbanov Subject: [PATCH v2] v4l: Add source event change for bit-depth Date: Wed, 8 May 2019 14:37:59 +0300 Message-Id: <20190508113759.19168-1-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.17.1 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org This event indicate that the source bit-depth is changed during run-time. The client must get the new format and re-allocate buffers for it. This can usually happens with video decoder (encoders) when the bit-stream depth is changed from 8 to 10bits or vice versa. Signed-off-by: Stanimir Varbanov --- Change since v1: s/BITDEPTH/BIT_DEPTH Documentation/media/uapi/v4l/vidioc-dqevent.rst | 7 +++++++ Documentation/media/videodev2.h.rst.exceptions | 1 + include/uapi/linux/videodev2.h | 1 + 3 files changed, 9 insertions(+) -- 2.17.1 diff --git a/Documentation/media/uapi/v4l/vidioc-dqevent.rst b/Documentation/media/uapi/v4l/vidioc-dqevent.rst index dea9c0cc00ab..f7782cbddc5f 100644 --- a/Documentation/media/uapi/v4l/vidioc-dqevent.rst +++ b/Documentation/media/uapi/v4l/vidioc-dqevent.rst @@ -397,6 +397,13 @@ call. that many devices are not able to recover from a temporary loss of signal and so restarting streaming I/O is required in order for the hardware to synchronize to the video signal. + * - ``V4L2_EVENT_SRC_CH_BIT_DEPTH`` + - 0x0002 + - This event gets triggered when bit-depth change is detected from a + video decoder. Applications will have to query the new pixel format + and re-negotiate the queue. In most cases the streaming must be stopped + and restarted (:ref:`VIDIOC_STREAMOFF ` followed by + :ref:`VIDIOC_STREAMON `). Return Value diff --git a/Documentation/media/videodev2.h.rst.exceptions b/Documentation/media/videodev2.h.rst.exceptions index 64d348e67df9..68ae00d7450f 100644 --- a/Documentation/media/videodev2.h.rst.exceptions +++ b/Documentation/media/videodev2.h.rst.exceptions @@ -478,6 +478,7 @@ replace define V4L2_EVENT_CTRL_CH_FLAGS ctrl-changes-flags replace define V4L2_EVENT_CTRL_CH_RANGE ctrl-changes-flags replace define V4L2_EVENT_SRC_CH_RESOLUTION src-changes-flags +replace define V4L2_EVENT_SRC_CH_BIT_DEPTH src-changes-flags replace define V4L2_EVENT_MD_FL_HAVE_FRAME_SEQ :c:type:`v4l2_event_motion_det` diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h index 1050a75fb7ef..ecfdbaa60b05 100644 --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h @@ -2287,6 +2287,7 @@ struct v4l2_event_frame_sync { }; #define V4L2_EVENT_SRC_CH_RESOLUTION (1 << 0) +#define V4L2_EVENT_SRC_CH_BIT_DEPTH (1 << 1) struct v4l2_event_src_change { __u32 changes;