Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp296117yba; Mon, 1 Apr 2019 06:40:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqyQyXNBS0YKDFGLgdmppk/nZvVXbmIHC40p6mfkdR7NlaAL9uZvuDtdWfSwCyaK2xqe6deJ X-Received: by 2002:a63:7444:: with SMTP id e4mr42632384pgn.261.1554126031649; Mon, 01 Apr 2019 06:40:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554126031; cv=none; d=google.com; s=arc-20160816; b=lSyoTz1UhscJHB3o+vGcjlDHt+8vB2J/Ii19PHFPb0FIMU6E0RAu4qj+gG5Aa4vhR2 kzrgdHyJHZGGqcK8v5xekYEYcYQ6AmyTj0976oOs/lIVHMofW0LVmbKaNEU3fVwvYCFQ zAqsY+JHr1gsSB1SoE4jhOatBemgK9PsYEuAM3wac7y25CXoLTK2sJO7LPMQYyyCRkNo oeuzdtXUhEBQNIE6aUQBy1X3hDaMU2H7VD8o9nVsp9QeKbS2XL9L6/IP14wh0/bQgAqD TTMDOfYVsEDOjrq4OuLy7jQIrI8JS6207iuQEbkU734P441m8JPmewPIKeEwzQ1fFQrL 99pQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=W4Q5AbKbln/Fu2EQxLepyTtJKMD+qTIvZtoNE1VnyUg=; b=sCoVJHOLNDfRtwjiULOdMjkTupCL1ljMxV7xfnv+QjF5BbTQXUHWVWKHSnOFJPf6Jv C1W+d5+Bmqy0+K2JgCtnRqlF3etA6Nr3IxFNiU7c5H4s08ALojhh11YVap5qj2OWG2HC Wi1SVgSo1Buyvjn6aBiEHNHPZ67UdQitY5OhGMYLN0O40YeYBEc3RIAnv0FCxjY9CxKK ASg5ijquX+SigUYPCt0h8Ef/CzMuN0i1/qcFYFnfmcOB6bLY3uPOl2l2EdsU0t3ltAyJ zIcvmh40fgiLLHLFT/5OJ/y4ETlOF3dpzpqA3V51AouggawiSTUmtzRvo++kkS+/o4Lf p4iw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=Po33D9vx; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 32si9061026pls.415.2019.04.01.06.40.16; Mon, 01 Apr 2019 06:40:31 -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=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=Po33D9vx; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728654AbfDANjY (ORCPT + 99 others); Mon, 1 Apr 2019 09:39:24 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:39086 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728355AbfDANjD (ORCPT ); Mon, 1 Apr 2019 09:39:03 -0400 Received: by mail-wr1-f67.google.com with SMTP id j9so12104248wrn.6 for ; Mon, 01 Apr 2019 06:39:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=W4Q5AbKbln/Fu2EQxLepyTtJKMD+qTIvZtoNE1VnyUg=; b=Po33D9vx6Hu6bDHxutnO535NGEcbzTijhog09s4FmNNp8B/ggr0OFm/szBbgu2eGGS A7k2zD3bS6uLzH2eNpC/iXM/S1UBMp+WPnrn6cHCJZ8pOtw6H1kdgPm9Fz14cuto98VB DTHzNo1BZd2MSZw/cv8/m3ZgrI/wcTy8UwkkGdBv26FDvhcA60Nbj6luDlXyPjH8XWmq ychX7Ly7ZzWHvr3+TCW+lOa9JMHWNfOKWlJ+g0PjFQEIo3ukW9VwAmD0u/yBiwo2twz6 8euI5ZVVVrDLc5U2FXp/KQRcx71jv51k9guoNH/yomhTot+z+kNDskEmvSuSE+BEsyOR Ysnw== 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:mime-version:content-transfer-encoding; bh=W4Q5AbKbln/Fu2EQxLepyTtJKMD+qTIvZtoNE1VnyUg=; b=Byx1n8iUnCjx/jY9/+NoTo45FOiWpEhLu7jdsC/QTJo1CECdjqrOe01RTx0FjwSKP2 sqvK+3hhelU2m6R5/RAmptL+Oqkr0Df4Z99tFBCwmmmVezp4aDM/4KHnxDKEljZ0az3v eAThiQ4SJ1x2MlDdfTp2AdAn5d06dBO8XvA6vRYwZkSBUWFFQ95S6VOQAyt9AVJkNJuL bgUmITrxLwHcAQJq14atCB1Y9LWt6Gzx3oYpl/Za4Ywp25bGjpFlbtJQuBFmYZMBdfJ0 jVQGv0cuZMLBKILCwAxzae8B6q+O9XH6BXXAVyjjt/xZEGJULF0ONfxv5XCtdDM2QKet CVqQ== X-Gm-Message-State: APjAAAVB8Rq8W8GxqgPEYMzSAbCQTMIXB1SZG+JNAKVxvj613BhxDkP9 EwJTJWTY+DlPT9bhilDPCeAqAw== X-Received: by 2002:a5d:638d:: with SMTP id p13mr40116890wru.202.1554125941395; Mon, 01 Apr 2019 06:39:01 -0700 (PDT) Received: from mjourdan-pc.numericable.fr (abo-99-183-68.mtp.modulonet.fr. [85.68.183.99]) by smtp.gmail.com with ESMTPSA id v184sm25205996wma.6.2019.04.01.06.39.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 01 Apr 2019 06:39:00 -0700 (PDT) From: Maxime Jourdan To: Mauro Carvalho Chehab Cc: Maxime Jourdan , Hans Verkuil , Kevin Hilman , Jerome Brunet , Neil Armstrong , Martin Blumenstingl , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org Subject: [PATCH v5 2/4] media: videodev2: add V4L2_FMT_FLAG_FIXED_RESOLUTION Date: Mon, 1 Apr 2019 15:38:43 +0200 Message-Id: <20190401133845.4171-3-mjourdan@baylibre.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190401133845.4171-1-mjourdan@baylibre.com> References: <20190401133845.4171-1-mjourdan@baylibre.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When a v4l2 driver exposes V4L2_EVENT_SOURCE_CHANGE, some (usually OUTPUT) formats may not be able to trigger this event. For instance, MPEG2 on Amlogic hardware does not support resolution switching on the fly, and a decode session must operate at a set resolution defined before the decoding start. Add a enum_fmt format flag to tag those specific formats. Signed-off-by: Maxime Jourdan --- Documentation/media/uapi/v4l/vidioc-enum-fmt.rst | 6 ++++++ include/uapi/linux/videodev2.h | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Documentation/media/uapi/v4l/vidioc-enum-fmt.rst b/Documentation/media/uapi/v4l/vidioc-enum-fmt.rst index 822d6730e7d2..b11448a1848b 100644 --- a/Documentation/media/uapi/v4l/vidioc-enum-fmt.rst +++ b/Documentation/media/uapi/v4l/vidioc-enum-fmt.rst @@ -127,6 +127,12 @@ one until ``EINVAL`` is returned. - This format is not native to the device but emulated through software (usually libv4l2), where possible try to use a native format instead for better performance. + * - ``V4L2_FMT_FLAG_FIXED_RESOLUTION`` + - 0x0004 + - Dynamic resolution switching is not supported for this format, + even if the event ``V4L2_EVENT_SOURCE_CHANGE`` is supported by + the device. + Return Value diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h index 1db220da3bcc..9c8a2d2e7bc6 100644 --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h @@ -751,8 +751,9 @@ struct v4l2_fmtdesc { __u32 reserved[4]; }; -#define V4L2_FMT_FLAG_COMPRESSED 0x0001 -#define V4L2_FMT_FLAG_EMULATED 0x0002 +#define V4L2_FMT_FLAG_COMPRESSED 0x0001 +#define V4L2_FMT_FLAG_EMULATED 0x0002 +#define V4L2_FMT_FLAG_FIXED_RESOLUTION 0x0004 /* Frame Size and frame rate enumeration */ /* -- 2.21.0