From patchwork Mon Apr 1 13:38:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Jourdan X-Patchwork-Id: 10879963 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 850EB13B5 for ; Mon, 1 Apr 2019 13:39:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 69BA1280B0 for ; Mon, 1 Apr 2019 13:39:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5E19E28346; Mon, 1 Apr 2019 13:39:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E5DC027E71 for ; Mon, 1 Apr 2019 13:39:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=qi6jpLWZKlzw1jOiSyg/Cc1R9l3L2AoZ44P9AVTx1Lk=; b=py5nm8Hg9neKUs c3pXnli2C5rH7k4FzHOsrPmbOphwKnaQNnwHoTmCr3kEcY7HwWPDnRRVtCHFiRAdrPsiIiqyD+IRf tynVXLViht0mCSLXX7/pAov3TX8RKGrC/zblcPTEWN4/rYiPLtaFuw22RqIsA4fxf2qZOt95AeyXW sYhQ6+RKOFq7DXXRWZ9LEQr7RQuafAIy4iifI6DOGgHYwS6pSy6Ezmt3erMcXPLU14uN5HPJPDo5v leXC2kHs0YHPvdcWP6dufkhsl6vImjZBM1gnJ/JbNyxXlEdL3w/3PyJpxHyFSeGJMOVXVuOzk5f/x l1tx/dxn0qbhud2hvpTg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hAx9i-0004Lb-8w; Mon, 01 Apr 2019 13:39:18 +0000 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hAx9S-0003yM-TM for linux-arm-kernel@lists.infradead.org; Mon, 01 Apr 2019 13:39:05 +0000 Received: by mail-wr1-x442.google.com with SMTP id r4so12088773wrq.8 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=OjVZDZnlOUoXSLctcl584YxTLtNhd1f2UKxRui7JxzW8hTFKra2UAvlj5DoGsQ4euo 4+RFNUlzDCfIiZEUp9IlpwbWkgELYKaUiyJyXrpGXlfuuulJWMgFm1dwZYa5SRSyMMwY YOGMwHSECHTr1iGYy3uL1L2IXwDHnCY3HVIuuhMOwZ8u1QF2HNXEHM74YCLTLOvHGZtX 4xUl4WF7N8Owm24nfiRmDXq72Mo7m36gaCIA1eCeBe0TmgB8eOrkmSCdQNRh3+TkW9Yn DYJ937eQbk6qrRGsGOgp8UFZ9+qfDUZcRGipO0NKuVAKtMmxrHFKOEtCgiwlSxJpvH3e FyJQ== X-Gm-Message-State: APjAAAW7z83iET/7j7MvWWprPqt09kXO5w/kI755tCY8fN2fhuoKZ1SR erBWz44pdhMRyZx/iHjB2e0DFw== X-Google-Smtp-Source: APXvYqxTUchDyD2CapUrfQKpMKZeoRgwiyWB4JZQOimUIVfTCxhqoNIap1rkPJM+AA06ajth/EHnPw== 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190401_063902_942750_425C1B9D X-CRM114-Status: GOOD ( 14.15 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Maxime Jourdan , Neil Armstrong , Martin Blumenstingl , Kevin Hilman , linux-kernel@vger.kernel.org, Hans Verkuil , linux-amlogic@lists.infradead.org, linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Jerome Brunet Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 */ /*