From patchwork Thu Jun 26 01:05:51 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Longerbeam X-Patchwork-Id: 4425171 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 063169F433 for ; Thu, 26 Jun 2014 01:08:07 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2E70620377 for ; Thu, 26 Jun 2014 01:08:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6A89C20384 for ; Thu, 26 Jun 2014 01:08:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932396AbaFZBHx (ORCPT ); Wed, 25 Jun 2014 21:07:53 -0400 Received: from mail-pd0-f176.google.com ([209.85.192.176]:50299 "EHLO mail-pd0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932317AbaFZBHf (ORCPT ); Wed, 25 Jun 2014 21:07:35 -0400 Received: by mail-pd0-f176.google.com with SMTP id ft15so2321461pdb.7 for ; Wed, 25 Jun 2014 18:07:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=dyNTJiyKU9xywoQxuKykY3uUthUtQcDLEATkI6fgsWk=; b=zSv3lqbFGPw5nCnWgEViZ89jwyWFztokoryB+gwWullSofbmimW2e08rWxkqyQXEqL xYMwHf1KBb1kMuhzX9HqbB9Ojfduh7EMcS+qh7NZ3HYgJ55d399pjRcgL0DLkvaJDYV6 QieuAQAnOVH4yxVsU/aN4Egfo0peOFRe6gyiNlzyNPhpJ/+t9Bs6QmHz2SKbByPr0B2x wa6g7vl7eupwtVRlZPAQOMxDTCmn6ZqXxs+dD/g5In7yvg2G/qXdDXP81QC4Iif/Iagf WSqm3W7Cas+1+hHpt1d54VSYG15IGF1YuDfTk0M+PxL0RXlgfYqjJyl5n8r+uGvQc26F Bo9g== X-Received: by 10.69.10.164 with SMTP id eb4mr16568657pbd.35.1403744854779; Wed, 25 Jun 2014 18:07:34 -0700 (PDT) Received: from mothership.mgc.mentorg.com (c-50-152-159-227.hsd1.ca.comcast.net. [50.152.159.227]) by mx.google.com with ESMTPSA id gg3sm7139010pbc.34.2014.06.25.18.07.34 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 25 Jun 2014 18:07:34 -0700 (PDT) From: Steve Longerbeam X-Google-Original-From: Steve Longerbeam To: linux-media@vger.kernel.org Cc: Steve Longerbeam Subject: [PATCH 24/28] gpu: ipu-cpmem: Add ipu_cpmem_set_rotation() Date: Wed, 25 Jun 2014 18:05:51 -0700 Message-Id: <1403744755-24944-25-git-send-email-steve_longerbeam@mentor.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1403744755-24944-1-git-send-email-steve_longerbeam@mentor.com> References: <1403744755-24944-1-git-send-email-steve_longerbeam@mentor.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_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 Adds ipu_cpmem_set_rotation(). Signed-off-by: Steve Longerbeam --- drivers/gpu/ipu-v3/ipu-cpmem.c | 10 ++++++++++ include/video/imx-ipu-v3.h | 2 ++ 2 files changed, 12 insertions(+) diff --git a/drivers/gpu/ipu-v3/ipu-cpmem.c b/drivers/gpu/ipu-v3/ipu-cpmem.c index 2d1b376..f52e4b4 100644 --- a/drivers/gpu/ipu-v3/ipu-cpmem.c +++ b/drivers/gpu/ipu-v3/ipu-cpmem.c @@ -64,6 +64,7 @@ struct ipu_cpmem { #define IPU_FIELD_BNDM IPU_CPMEM_WORD(0, 114, 3) #define IPU_FIELD_BM IPU_CPMEM_WORD(0, 117, 2) #define IPU_FIELD_ROT IPU_CPMEM_WORD(0, 119, 1) +#define IPU_FIELD_ROT_HF_VF IPU_CPMEM_WORD(0, 119, 3) #define IPU_FIELD_HF IPU_CPMEM_WORD(0, 120, 1) #define IPU_FIELD_VF IPU_CPMEM_WORD(0, 121, 1) #define IPU_FIELD_THE IPU_CPMEM_WORD(0, 122, 1) @@ -273,6 +274,15 @@ void ipu_cpmem_set_block_mode(struct ipuv3_channel *ch) } EXPORT_SYMBOL_GPL(ipu_cpmem_set_block_mode); +void ipu_cpmem_set_rotation(struct ipuv3_channel *ch, + enum ipu_rotate_mode rot) +{ + u32 temp_rot = bitrev8(rot) >> 5; + + ipu_ch_param_write_field(ch, IPU_FIELD_ROT_HF_VF, temp_rot); +} +EXPORT_SYMBOL_GPL(ipu_cpmem_set_rotation); + int ipu_cpmem_set_format_rgb(struct ipuv3_channel *ch, const struct ipu_rgb *rgb) { diff --git a/include/video/imx-ipu-v3.h b/include/video/imx-ipu-v3.h index 066b10d..3d3cea0 100644 --- a/include/video/imx-ipu-v3.h +++ b/include/video/imx-ipu-v3.h @@ -233,6 +233,8 @@ void ipu_cpmem_interlaced_scan(struct ipuv3_channel *ch, int stride); void ipu_cpmem_set_axi_id(struct ipuv3_channel *ch, u32 id); void ipu_cpmem_set_burstsize(struct ipuv3_channel *ch, int burstsize); void ipu_cpmem_set_block_mode(struct ipuv3_channel *ch); +void ipu_cpmem_set_rotation(struct ipuv3_channel *ch, + enum ipu_rotate_mode rot); int ipu_cpmem_set_format_rgb(struct ipuv3_channel *ch, const struct ipu_rgb *rgb); int ipu_cpmem_set_format_passthrough(struct ipuv3_channel *ch, int width);