From patchwork Wed Dec 18 13:22:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 182001 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp646601ile; Wed, 18 Dec 2019 05:24:05 -0800 (PST) X-Google-Smtp-Source: APXvYqxbVJuxT9c+YAPcQkKHk462owZIYe/KgFvkxLTNMe/X8kQzcZ3N01oUgNN5ikn955oDMftX X-Received: by 2002:aca:54cc:: with SMTP id i195mr334495oib.126.1576675445427; Wed, 18 Dec 2019 05:24:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576675445; cv=none; d=google.com; s=arc-20160816; b=xnctJ09jsIefplEIcNrVduS8tCXFPz2DqyRNErO7HXkNFdTnkvESegmWdWt4/oWeWG y6EXdwvoGTjOfabdFEKfpeh00EH0C7m5KlGCKb3mHRDdGpXMBmyiGI3xiCtritv/s6sD D/y3DVny3FKa6ASC1zrDucMU2vqjVY+kxtYqaaoBGvtU8d9858gh2+FzslBq6EjtVjcF IVR+Rwa2xtNvmTgbUftXybL4I1WZYqdO+2Og4/HKM0NjvSN6IwCZjIENbHIgwW6QDeGu k12ne0bsd706APbSoBqBl1nPsXC/IdcxTqgvsx1Um/9Htbz5pBJFjKD1kgOnQaZsp4AE YAUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=fdnv5G54kjVyBGm0/gl9gu7nvtpvFPt8yg5pxAgrcmE=; b=oIifV9VAmL4vfJyTZqaI1pwR3atxTBtXnstyF6aSFhT1HeUjhsAled0iVk6OKrlZoj NGUj3A9Mq3GVOtftqsuQLSWpTtOubMINTZLYBDO9giOtJVzaVWZqvop+IgLXNliu+K9u P6aINXqoFmnTd2IvJiZcwqrdFkrXZ/jlGroaE2SISEcygkRdh8k6/Fkm3b1b7gZnLF2C yvrXXqdQPAgmyN2BjqIW1ggQA/AOuD+8AAqE4SmMyDv4qbwtpiMF7RjETN5+D5Zm71B2 eHETa3k9k3TgAKguJyYGbZRiHTLcP9lCKx9TAp+AKP3716umAkzYSSBI4V8wnoq+x/o5 TpqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jFgeMvSD; 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 t18si1407797oij.133.2019.12.18.05.24.05; Wed, 18 Dec 2019 05:24:05 -0800 (PST) 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=jFgeMvSD; 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 S1727020AbfLRNYE (ORCPT + 15 others); Wed, 18 Dec 2019 08:24:04 -0500 Received: from mail-lf1-f67.google.com ([209.85.167.67]:35593 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727261AbfLRNYC (ORCPT ); Wed, 18 Dec 2019 08:24:02 -0500 Received: by mail-lf1-f67.google.com with SMTP id 15so1710256lfr.2 for ; Wed, 18 Dec 2019 05:24:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=fdnv5G54kjVyBGm0/gl9gu7nvtpvFPt8yg5pxAgrcmE=; b=jFgeMvSDcZBktiP6w0iUj7kL8k5sQjm6mg9k/ps8khr63J+cX9pqqKQmBDnUrdI9gu OCDqRaWaj9TWeCld9YrmKJeFymYAvdTB+DMOFSYGWOT1lKPPM7PNz1+mL46/Oqo/zjec 2cQXB8kZqYvTvrRCRPTBbhecOeMDUyEG5ZQ6IhQVfhTDh4jd2+eqTBs0ska9ydwcQ2/g yb+sLpOS+M8i3V+i7FOHlvRywr1cc3y/66aqcbOg6LzLpc+o16HtsbWjAB2fNrLK2HMC 3Kobzz7C/Ljj7tZR6xXs/0wdvfzY0t8oZVh5uZib95O8vY3MDYE0V5pBEI7yG92n2z0A dCUQ== 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:in-reply-to :references; bh=fdnv5G54kjVyBGm0/gl9gu7nvtpvFPt8yg5pxAgrcmE=; b=USpEFm7kTr1UG9LC8TTXE+wM9FvWqoCuUWu0Dgdjc8WPV5tM6gluub1odjvxvYb/nr 0X16Yi+hBwin6tObvqQetcwPTYlEy0spMOBxmlWt5bibwej+QU6w0JfsNlE2cf7J5C7+ rdmDyNZegR4KWeDgQiKyJqhZzpGTApQrm7HJg0cFNjmoQqt4VGF10+0OkmqdJ2v2s1bo Y3fAPTYpp2NC+Mp0ABMSheb7oyAZcLXE/MyDmjvnjiIr6Tljqx5r5Eopy/SXCSWG6VIK ta7Xa2tH/KZd/A1RA/0SCfQzkmscA3RfNO4M/7f71eTWTT6nLxE+iY6/AHfmBBKkzkny mzhQ== X-Gm-Message-State: APjAAAXccW65s8T5JFyiTPPUjEDAuIw8MwWM4H1GaPDZi2LQW07Asgxt 2ZeHW1+ZnXSV99+qVm4QDuxvoqdcIO8= X-Received: by 2002:a19:f006:: with SMTP id p6mr1719027lfc.94.1576675440344; Wed, 18 Dec 2019 05:24:00 -0800 (PST) Received: from localhost.localdomain ([37.157.136.193]) by smtp.gmail.com with ESMTPSA id z7sm1440667lfa.81.2019.12.18.05.23.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Dec 2019 05:23:59 -0800 (PST) From: Stanimir Varbanov To: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, devicetree@vger.kernel.org Cc: Vikash Garodia , dikshita@codeaurora.org, Stanimir Varbanov Subject: [PATCH v2 04/12] v4l: Add source event change for bit-depth Date: Wed, 18 Dec 2019 15:22:43 +0200 Message-Id: <20191218132251.24161-5-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191218132251.24161-1-stanimir.varbanov@linaro.org> References: <20191218132251.24161-1-stanimir.varbanov@linaro.org> 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 color 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 color bit-depth is changed from 8 to 10bits or vice versa. Acked-by: Sakari Ailus Signed-off-by: Stanimir Varbanov --- Documentation/media/uapi/v4l/vidioc-dqevent.rst | 8 +++++++- Documentation/media/videodev2.h.rst.exceptions | 1 + include/uapi/linux/videodev2.h | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) -- 2.17.1 diff --git a/Documentation/media/uapi/v4l/vidioc-dqevent.rst b/Documentation/media/uapi/v4l/vidioc-dqevent.rst index 42659a3d1705..fad853d440cf 100644 --- a/Documentation/media/uapi/v4l/vidioc-dqevent.rst +++ b/Documentation/media/uapi/v4l/vidioc-dqevent.rst @@ -402,7 +402,13 @@ call. that many Video Capture 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_COLOR_DEPTH`` + - 0x0002 + - This event gets triggered when color 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 cb6ccf91776e..209709114378 100644 --- a/Documentation/media/videodev2.h.rst.exceptions +++ b/Documentation/media/videodev2.h.rst.exceptions @@ -490,6 +490,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_COLOR_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 04481c717fee..2a5138ac6d25 100644 --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h @@ -2307,6 +2307,7 @@ struct v4l2_event_frame_sync { }; #define V4L2_EVENT_SRC_CH_RESOLUTION (1 << 0) +#define V4L2_EVENT_SRC_CH_COLOR_DEPTH (1 << 1) struct v4l2_event_src_change { __u32 changes; From patchwork Wed Dec 18 13:22:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 182004 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp646827ile; Wed, 18 Dec 2019 05:24:15 -0800 (PST) X-Google-Smtp-Source: APXvYqzIYQ2rBPJB4D4/tTZBBGS19iHuWa6sTSuZiiW42eB9RjzQfYazihpOvPS/9CCfUtlp1boI X-Received: by 2002:a05:6830:20d3:: with SMTP id z19mr2431451otq.330.1576675455395; Wed, 18 Dec 2019 05:24:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576675455; cv=none; d=google.com; s=arc-20160816; b=A+mHniWmJaoi9i5ExjK5zxxL4UVRIjlucTK4Av29dgcmUyjN5voRNpefRMbSE7UkK0 1Xn5W1ckGyxEHwiE9+pE6jO0zuUtsZ8UWgEdgKSJvY5uLAvFFEYGJ33MISlxtqwSW0Pl BfUsheHhOcasQpzY4klAhMpdEKJFdEzWuHfPHyiVuUV0CceBSoBW1X/rhNrAYSGiwfJT 2i+sSwGmqyb4VpG8v270jCaUI2aQ2ChxuEloIRbXosPtvVTPxzVkjf/2xnXaHmUIEaqz MDmczDrCds7KFKCoWSy7tsFg7AG3la3Y/uk6Rmn79czvcXHoYIjV5EzG+C3glUFGr/vO ut+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=unqIuIpnL0SKav+KaURk+5yuOec5tbAyPzTEx5H0hC0=; b=od1ql4L5W8JQOvo4r2f8zQbYrCVez8yUkNW12ii7K3kginV6zc3diMiJUZMIQi3iEr MHD7SilYWIHpWA/vZVsDwNB8igGyBqjkCozEbGF6prL5EdDISRwjqcAqnkynergOzpmv eVqFBnlE47GjFJ+gqFf63e6tDkM1IGoQGwxk3R0id/VJ+b8vdzOLFeeS5wrJYI6cqTNP g0GNi/lkxHfmXjIbzZ3Prmrvejvcyr9+GDvtCWfiH63UX/+dxwDtJB68cmpEkJCNy/9m jq8F3RfYxhNDfIi4bVv34Y6ERDwGKMp2L4SEJOxTPZnY6+/ttDeYg7FgbmMCPfHW6SYT n2IA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PY1qWRdU; 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 t18si1408196oij.133.2019.12.18.05.24.15; Wed, 18 Dec 2019 05:24:15 -0800 (PST) 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=PY1qWRdU; 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 S1727381AbfLRNYO (ORCPT + 15 others); Wed, 18 Dec 2019 08:24:14 -0500 Received: from mail-lj1-f196.google.com ([209.85.208.196]:39822 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727346AbfLRNYO (ORCPT ); Wed, 18 Dec 2019 08:24:14 -0500 Received: by mail-lj1-f196.google.com with SMTP id l2so2123626lja.6 for ; Wed, 18 Dec 2019 05:24:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=unqIuIpnL0SKav+KaURk+5yuOec5tbAyPzTEx5H0hC0=; b=PY1qWRdU8/IJtzEkH9dEi7ciUkruMXnneayBeR6VHlIyzfG52/l5OqxiD4bMqdQZv6 m4st955NgxkUXzg2lkGxJ72Vt7u32kCnSsm6BePQJJ0YoA86+12iDAh+4/EyNogR+BTV pO6XNfGRqjhHYWo4/k/CeYJeH08ak7JFxyVJORvfhgaFJ4oEnLRTdWUf+Zn7wT69Giyf VBSF6LV3kg0roqFJDDhLvZiw4vt7PnlixzXZHfvOt+KOQP7fH2S+P3EnCnMCvEJKEHEj FherkDEjnsiGsSp6gvPHczQRbAWocD6qCShi7x4ITOtVF/cj1H5j59w0z4H0PultmYCh +ixw== 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:in-reply-to :references; bh=unqIuIpnL0SKav+KaURk+5yuOec5tbAyPzTEx5H0hC0=; b=if9nycCr+g3FVdZcc/D+xrOwVYq8Ggk+bYVkoK3mYg1Dl9Wm9gRctyAA458emu9byH 5Ejbph3SS/QHaJXkbxE4gxNJ7hfVRG2HA75GJ4Jm47hYwANbjfiikRhbKGTqw1QI1A9Q h1T2uNlox0phVUUxPd6o3+dEcuiHA4qko6tziR+rCI47i9E59vPd3uwaf9D+tvRZRRJd 3vvYnjHRjMHB8ifEZPDB2CG1uUePxZEJgz2a5iEbOSycDO1gDNwtUSdvjAVLhkgdDpmc Ic9fAqyuKEbqSgzSw3O6jxx0w1abEwWRbXPLoauaeelKtlD5D9KdO5a5SrzMx4wJ87Vq Kv/Q== X-Gm-Message-State: APjAAAW7A2UtFbdxrwNX4q33JVYoN1VOi68ZkoNqVT3yLvKREOqWbgAe DFegtrhyqHykahmxml5MSlHCwij3tBs= X-Received: by 2002:a2e:9a01:: with SMTP id o1mr1645018lji.247.1576675451419; Wed, 18 Dec 2019 05:24:11 -0800 (PST) Received: from localhost.localdomain ([37.157.136.193]) by smtp.gmail.com with ESMTPSA id z7sm1440667lfa.81.2019.12.18.05.24.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Dec 2019 05:24:10 -0800 (PST) From: Stanimir Varbanov To: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, devicetree@vger.kernel.org Cc: Vikash Garodia , dikshita@codeaurora.org, Stanimir Varbanov Subject: [PATCH v2 08/12] dt-bindings: media: venus: Convert sdm845 to DT schema Date: Wed, 18 Dec 2019 15:22:47 +0200 Message-Id: <20191218132251.24161-9-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191218132251.24161-1-stanimir.varbanov@linaro.org> References: <20191218132251.24161-1-stanimir.varbanov@linaro.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Convert qcom,sdm845-venus Venus binding to DT schema. Signed-off-by: Stanimir Varbanov --- .../bindings/media/qcom,venus-sdm845.yaml | 151 ++++++++++++++++++ 1 file changed, 151 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/qcom,venus-sdm845.yaml -- 2.17.1 diff --git a/Documentation/devicetree/bindings/media/qcom,venus-sdm845.yaml b/Documentation/devicetree/bindings/media/qcom,venus-sdm845.yaml new file mode 100644 index 000000000000..4136a0d979d5 --- /dev/null +++ b/Documentation/devicetree/bindings/media/qcom,venus-sdm845.yaml @@ -0,0 +1,151 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) + +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/media/qcom,venus-sdm845.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#" + +title: Qualcomm Venus video encode and decode accelerators + +maintainers: + - Stanimir Varbanov + +description: | + The Venus IP is a video encode and decode accelerator present + on Qualcomm platforms + +properties: + compatible: + enum: + - qcom,sdm845-venus + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + power-domains: + minItems: 1 + maxItems: 1 + + clocks: + maxItems: 3 + + clock-names: + maxItems: 3 + items: + - const: core + - const: iface + - const: bus + + iommus: + minItems: 1 + maxItems: 20 + + memory-region: + maxItems: 1 + + video-core0: + type: object + + properties: + compatible: + const: "venus-decoder" + + clocks: + maxItems: 2 + + clock-names: + maxItems: 2 + items: + - const: core + - const: bus + + power-domains: + minItems: 1 + maxItems: 1 + + required: + - compatible + + video-core1: + type: object + + properties: + compatible: + const: "venus-encoder" + + clocks: + maxItems: 2 + + clock-names: + maxItems: 2 + items: + - const: core + - const: bus + + power-domains: + minItems: 1 + maxItems: 1 + + required: + - compatible + + video-firmware: + type: object + + description: | + Firmware subnode is needed when the platform does not + have TrustZone. + + properties: + iommus: + minItems: 1 + +required: + - compatible + - reg + - interrupts + - power-domains + - clocks + - clock-names + - iommus + - memory-region + - video-core0 + - video-core1 + +examples: + - | + #include + #include + + video-codec@aa00000 { + compatible = "qcom,sdm845-venus"; + reg = <0 0x0aa00000 0 0xff000>; + interrupts = ; + clocks = <&videocc VIDEO_CC_VENUS_CTL_CORE_CLK>, + <&videocc VIDEO_CC_VENUS_AHB_CLK>, + <&videocc VIDEO_CC_VENUS_CTL_AXI_CLK>; + clock-names = "core", "iface", "bus"; + power-domains = <&videocc VENUS_GDSC>; + iommus = <&apps_smmu 0x10a0 0x8>, + <&apps_smmu 0x10b0 0x0>; + memory-region = <&venus_mem>; + + video-core0 { + compatible = "venus-decoder"; + clocks = <&videocc VIDEO_CC_VCODEC0_CORE_CLK>, + <&videocc VIDEO_CC_VCODEC0_AXI_CLK>; + clock-names = "core", "bus"; + power-domains = <&videocc VCODEC0_GDSC>; + }; + + video-core1 { + compatible = "venus-encoder"; + clocks = <&videocc VIDEO_CC_VCODEC1_CORE_CLK>, + <&videocc VIDEO_CC_VCODEC1_AXI_CLK>; + clock-names = "core", "bus"; + power-domains = <&videocc VCODEC1_GDSC>; + }; + };