From patchwork Mon Sep 30 13:34:46 2013
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Philipp Zabel
X-Patchwork-Id: 2964991
Return-Path:
X-Original-To: patchwork-linux-media@patchwork.kernel.org
Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org
Received: from mail.kernel.org (mail.kernel.org [198.145.19.201])
by patchwork2.web.kernel.org (Postfix) with ESMTP id 780C9BFF0B
for ;
Mon, 30 Sep 2013 13:35:47 +0000 (UTC)
Received: from mail.kernel.org (localhost [127.0.0.1])
by mail.kernel.org (Postfix) with ESMTP id E271620268
for ;
Mon, 30 Sep 2013 13:35:42 +0000 (UTC)
Received: from vger.kernel.org (vger.kernel.org [209.132.180.67])
by mail.kernel.org (Postfix) with ESMTP id 9A69520161
for ;
Mon, 30 Sep 2013 13:35:41 +0000 (UTC)
Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
id S1755512Ab3I3NfT (ORCPT
);
Mon, 30 Sep 2013 09:35:19 -0400
Received: from metis.ext.pengutronix.de ([92.198.50.35]:46437 "EHLO
metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
with ESMTP id S1755540Ab3I3NfI (ORCPT
);
Mon, 30 Sep 2013 09:35:08 -0400
Received: from dude.hi.pengutronix.de ([10.1.0.7] helo=dude.pengutronix.de)
by metis.ext.pengutronix.de with esmtp (Exim 4.72)
(envelope-from )
id 1VQdcl-00046j-Cu; Mon, 30 Sep 2013 15:34:55 +0200
From: Philipp Zabel
To: linux-media@vger.kernel.org
Cc: Mauro Carvalho Chehab ,
Kamil Debski ,
Javier Martin ,
Hans Verkuil , kernel@pengutronix.de,
Philipp Zabel
Subject: [PATCH v2 03/10] [media] coda: add compressed flag to format
enumeration output
Date: Mon, 30 Sep 2013 15:34:46 +0200
Message-Id: <1380548093-22313-4-git-send-email-p.zabel@pengutronix.de>
X-Mailer: git-send-email 1.8.4.rc3
In-Reply-To: <1380548093-22313-1-git-send-email-p.zabel@pengutronix.de>
References: <1380548093-22313-1-git-send-email-p.zabel@pengutronix.de>
X-SA-Exim-Connect-IP: 10.1.0.7
X-SA-Exim-Mail-From: p.zabel@pengutronix.de
X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de);
SAEximRunCond expanded to false
X-PTX-Original-Recipient: linux-media@vger.kernel.org
Sender: linux-media-owner@vger.kernel.org
Precedence: bulk
List-ID:
X-Mailing-List: linux-media@vger.kernel.org
X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI,
RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org
X-Virus-Scanned: ClamAV using ClamSMTP
Correctly flag compressed formats in the ENUM_FMT ioctl output.
Signed-off-by: Philipp Zabel
---
drivers/media/platform/coda.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/media/platform/coda.c b/drivers/media/platform/coda.c
index 945c539..53539c1 100644
--- a/drivers/media/platform/coda.c
+++ b/drivers/media/platform/coda.c
@@ -457,6 +457,8 @@ static int enum_fmt(void *priv, struct v4l2_fmtdesc *f,
fmt = &formats[i];
strlcpy(f->description, fmt->name, sizeof(f->description));
f->pixelformat = fmt->fourcc;
+ if (!coda_format_is_yuv(fmt->fourcc))
+ f->flags |= V4L2_FMT_FLAG_COMPRESSED;
return 0;
}