From patchwork Fri Mar 1 13:24:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 10835323 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 A89B31390 for ; Fri, 1 Mar 2019 13:24:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9798E2DD97 for ; Fri, 1 Mar 2019 13:24:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8C3532EE31; Fri, 1 Mar 2019 13:24:37 +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=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 38A502DD97 for ; Fri, 1 Mar 2019 13:24:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387569AbfCANYb (ORCPT ); Fri, 1 Mar 2019 08:24:31 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:50518 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728259AbfCANYa (ORCPT ); Fri, 1 Mar 2019 08:24:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Sender:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=xh22J4XA+hjblSGFGgRDqvYC0M0Uy/7E1aW07Lwqh1s=; b=cwib5UptaN11AONipJCEFyCasm XdwKP/T4V3XVJj97HX6fyT/nUwmd7rHZpgJXd74DQLmJOx/wW/cqF4hgAc5+vDs5FxPYnBPm6khMW MJ8xMDd1SYBuVlpXmSTCZJ6MrPE1+G8MAN1mCNp58jHnJjz2dTETimv7R9n6P1rl+wHPecUBDt7sK WCDjIRepNG1w8NgTVQSkaiqVP6Jv0rcNKq/DejApQxsBfADmiDHcmUpdx1+3w+IDytECKzU9pVulD yaQYe5svCzhnZ5C8ZSqRTSwUuY0n4CyGd7mxKHqYz0xDLdTptTWCJRsk6ETJGlUSHX0CSvNd5uwy8 52Gu+kpA==; Received: from 177.41.113.159.dynamic.adsl.gvt.net.br ([177.41.113.159] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1gzi9N-0003xy-SX; Fri, 01 Mar 2019 13:24:29 +0000 Received: from mchehab by bombadil.infradead.org with local (Exim 4.92) (envelope-from ) id 1gzi9L-0002ND-Pl; Fri, 01 Mar 2019 10:24:27 -0300 From: Mauro Carvalho Chehab To: Linux Media Mailing List Cc: Mauro Carvalho Chehab , Mauro Carvalho Chehab , Hans Verkuil , Ezequiel Garcia Subject: [PATCH 03/10] media: vim2m: ensure that width is multiple of two Date: Fri, 1 Mar 2019 10:24:19 -0300 Message-Id: <6786af5ad640e0e7caace2168e8a24323434f382.1551446121.git.mchehab+samsung@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The copy logic assumes that the data width is multiple of two, as this is needed in order to support YUYV. There's no reason to force it to be 8-pixel aligned, as 2-pixel alignment is enough. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/platform/vim2m.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/vim2m.c b/drivers/media/platform/vim2m.c index 17d40cec2d95..fb736356ee6b 100644 --- a/drivers/media/platform/vim2m.c +++ b/drivers/media/platform/vim2m.c @@ -50,7 +50,7 @@ MODULE_PARM_DESC(default_transtime, "default transaction time in ms"); #define MIN_H 32 #define MAX_W 640 #define MAX_H 480 -#define DIM_ALIGN_MASK 7 /* 8-byte alignment for line length */ +#define DIM_ALIGN_MASK 1 /* 2-byte alignment */ /* Flags that indicate a format can be used for capture/output */ #define MEM2MEM_CAPTURE (1 << 0)