From patchwork Mon Apr 15 15:27:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 162196 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp3062024jan; Mon, 15 Apr 2019 08:27:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqxIziBKFZA7YVzQ8uxHe9Rka72D2RUmraanWyx1L5l+PkeZujqPLgULd+6d7o+blcBIt6pm X-Received: by 2002:a62:1701:: with SMTP id 1mr76952539pfx.120.1555342062927; Mon, 15 Apr 2019 08:27:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555342062; cv=none; d=google.com; s=arc-20160816; b=MkF+HZolpRFmaEAixcetsS05562NIjjapHoMaEB8l6OsQ9vs0Ru0+K8hXu0x4T8yME 7hr9pT+DP2Q93tFNVCt3sd0FQ/ClAevX9nT05X37Q9K3aIAkqXzi+b4g/txekQngT8eU n2A3Y8832FzZ7/J8GKqf+au1+QMRhalUNfP9FvWNbJ2oqx5wyqxNzA/LJDrYC2P5FN0b F4c7iMKEcD/+qalELjVfDGHCqV3dQpbSHZzJo0keTYpVTqXhkUDbdJ6dVdbr82zyvlQ4 hiR7LjpI7MDFUPWU5GfPFXcX6jB9xEaZUfxTAc6b+4r0qqf5oLZh2a5ktrGr1PlsuH3p 9qnA== 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=rdjAJXPyrM7EYkVn/ceLH5U36WNFw9E4wp8blYV0QHo=; b=e404Peqp6TD81Gz5fWKUWk/RIuopHvxEuy7C52eNjA20PFgGCV9aIQ+3M8y6uazvSm prmqJvn/+vpFL1724YncOfIceKBPrr2S5UpTGIc4qKi9KxI2TRp2z5O/LiX1XAM9g+Z6 qkKTSJYPm5PTjcepelK+zA87RX9vI1nT9E1g/jqSDnO1YmLBIgcps7Tu8qAiicqGj+W6 tO544StveaYb6iEhoh+MNmQgeq5nd80xadP++nsqx19yMAlRjmFcOsP9ZSC2T7w7cnNI EoeoevzwDsy6bE66kd+2aA9G7KMxOp7wIfp1nvU4xL/jadEY8SakyXQMV80FV2l+/ASv Ym5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="uPREm/Ix"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 a191si25301621pge.72.2019.04.15.08.27.42; Mon, 15 Apr 2019 08:27:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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="uPREm/Ix"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 S1727681AbfDOP1l (ORCPT + 30 others); Mon, 15 Apr 2019 11:27:41 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:47085 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726034AbfDOP1k (ORCPT ); Mon, 15 Apr 2019 11:27:40 -0400 Received: by mail-wr1-f66.google.com with SMTP id t17so22467932wrw.13 for ; Mon, 15 Apr 2019 08:27:39 -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=rdjAJXPyrM7EYkVn/ceLH5U36WNFw9E4wp8blYV0QHo=; b=uPREm/IxJb+c7rMXJxDJMh982pm80bSgcoyt+4c2rUBFlpqabZFtJjD6BD9+UA1KYt 5vx/eEY4H6WNCnZ7syHqiO/HD1lxfL6T2qPgACJJ2+3ukcVipDTNlRFdLF9A0MfT9RQd VK+vFaIWWjn4UZGgsm57pPhnBY+jOvuOMWXK6rBQdeBoRQFgChIkdPiHdAC7R7zSxSJO DuluM82P013xbllH6mjENEdWMT2jvkxI7+CLSpT3M5DXIqKhB/auctdGdjsjYdYhmHb7 9E2WNMOiOEFCZ+wvuK6sdApFgDEX5ZbhMpzKK63x7K7MuNNVMlL0E+mFwA2exa7/T8Yb YWWQ== 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=rdjAJXPyrM7EYkVn/ceLH5U36WNFw9E4wp8blYV0QHo=; b=esJmE/ZTkSIrabVwX+5fTmrwNjB0uboTCRquwtPNSEGcSgHPQvI/WgFato7ldiv9En 28jLaiu28XGi705Gy61u9e7acS2DOdUxcsnxFXtY5qs5r5wS1Qh0iwigAWssbbx+IZiM eS4OoLnMOWscMS00EyJJ1Bs8AnNCyPkCPokDR4MRr0UaRhnyzfGWOMTQZAzhdNYMaHXe Xsl8NB6BGJyZSTJm+yVOcdViNce+fZ6gnUeX6fjBazbq5QNFbQMELU/SQTNNzhO/s6Fo btCxb4nLiFe9cxOIXgHDuXrOatxyUkiVQkYwoge6phye7lCM4j8ZzQ+TEbSQTRwZCz93 nuPA== X-Gm-Message-State: APjAAAWmLGqJZwacTv632Y3cgVQHNe6TduoV+0Gv5uSIhDWv20KEh4oz /a4k6eTV3MDAEs6gGwDsQDIvgg== X-Received: by 2002:adf:ea0b:: with SMTP id q11mr29187233wrm.233.1555342058968; Mon, 15 Apr 2019 08:27:38 -0700 (PDT) Received: from localhost.localdomain ([37.157.136.206]) by smtp.gmail.com with ESMTPSA id t74sm288818wmt.3.2019.04.15.08.27.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Apr 2019 08:27:38 -0700 (PDT) From: Stanimir Varbanov To: linux-media@vger.kernel.org Cc: Mauro Carvalho Chehab , Hans Verkuil , linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Sakari Ailus , Stanimir Varbanov Subject: [PATCH] v4l: Add source event change for bit-depth Date: Mon, 15 Apr 2019 18:27:23 +0300 Message-Id: <20190415152723.2481-1-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 --- 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..92573d7c3e05 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_BITDEPTH`` + - 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..b4c35b347983 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_BITDEPTH 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 496e6453450c..7398f42eac7d 100644 --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h @@ -2271,6 +2271,7 @@ struct v4l2_event_frame_sync { }; #define V4L2_EVENT_SRC_CH_RESOLUTION (1 << 0) +#define V4L2_EVENT_SRC_CH_BITDEPTH (1 << 1) struct v4l2_event_src_change { __u32 changes;