From patchwork Sun Jul 31 19:42:16 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Longerbeam X-Patchwork-Id: 9253441 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6078D608A1 for ; Sun, 31 Jul 2016 19:43:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5317528489 for ; Sun, 31 Jul 2016 19:43:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 480FC2840B; Sun, 31 Jul 2016 19:43:39 +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=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID 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 B56CB28489 for ; Sun, 31 Jul 2016 19:43:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751513AbcGaTnV (ORCPT ); Sun, 31 Jul 2016 15:43:21 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:35155 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750923AbcGaTnT (ORCPT ); Sun, 31 Jul 2016 15:43:19 -0400 Received: by mail-pf0-f195.google.com with SMTP id h186so8866439pfg.2; Sun, 31 Jul 2016 12:42:42 -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=r90F+47N/bh1MDK7b5CJSciB9h38BftfQ2jIEvzZoqk=; b=sxNiOC2d9oaVtAmxsCjr9lvHQ18goNCu05IDZrPLUu9HAW2G3va+9ScKCRs+BlHCl/ cxr+NjGKC7s99wAhsYU0XxACQwMCnMivbHEibQFfDU/v2B1mo3zaCWbo4T/MoMymOR1s bejIt3Dx8qho1ooywreGKiItBWyghsefc8x4TvWPgt71lKewIS6wZjOJy1ZdzxZRyYei m8+mGDYnrIqIMNJezZps5Iw3cz5ZrUlpgQ6jbeI91iubnodzOwzTW3sNf0KzHvhPFu2u gJIv/OapiN+8K/vOuQcP3zpdZJa3a0mZxCx5KE7EmFmlmEVu25tt1+Dhfu7lDR6bFA6g 9cRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=r90F+47N/bh1MDK7b5CJSciB9h38BftfQ2jIEvzZoqk=; b=eN8tUMEQElEGKe5QFIK0gft/1MSzqD40XqHsNuaFYaAGwXv8ARy/T/0utSk6Fandmw kWBg0PvNxfiolC4SvM7i4BMJDCkLRFbD6dnrJ91920Gh+e/26cAWisHGkHd5Del/GES1 Brqbyftxx+N88PBRfRrXlOWVrfQSbC6tHlBUP+48isJiRNWce0gxvtdo72zXrx1xzWuf V7TQr5vubMFFzwPygdSTwAsWCEiAniik2jjNmugUL20d4fcmEUKJvaWFM6fTQU7/EWqX o5tRv4m8mv8N5Lz2sWJ2OllMMFILpXPk0mPHQU7qloRNx/fTRTlMpUDrN+OU07V/hvNw gxOA== X-Gm-Message-State: AEkoouvv7Wnlhxiiu4LEPKRksW8OZdD2ttvWANVvFTJEWnh1e4k5m97sFoZYTQlAkNLGnQ== X-Received: by 10.98.38.4 with SMTP id m4mr88858000pfm.47.1469994161639; Sun, 31 Jul 2016 12:42:41 -0700 (PDT) Received: from mothership.sklembedded.com (c-73-241-2-21.hsd1.ca.comcast.net. [73.241.2.21]) by smtp.googlemail.com with ESMTPSA id wp4sm39906381pab.15.2016.07.31.12.42.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 31 Jul 2016 12:42:41 -0700 (PDT) From: Steve Longerbeam X-Google-Original-From: Steve Longerbeam To: p.zabel@pengutronix.de, plagnioj@jcrosoft.com, tomi.valkeinen@ti.com Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-fbdev@vger.kernel.org, Steve Longerbeam Subject: [PATCH v3 01/12] gpu: ipu-cpmem: Add ipu_cpmem_set_uv_offset() Date: Sun, 31 Jul 2016 12:42:16 -0700 Message-Id: <1469994147-17549-2-git-send-email-steve_longerbeam@mentor.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1469994147-17549-1-git-send-email-steve_longerbeam@mentor.com> References: <1469994147-17549-1-git-send-email-steve_longerbeam@mentor.com> Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Adds ipu_cpmem_set_uv_offset(), to set planar U/V offsets. Signed-off-by: Steve Longerbeam --- v3: no changes v2: no changes --- drivers/gpu/ipu-v3/ipu-cpmem.c | 7 +++++++ include/video/imx-ipu-v3.h | 1 + 2 files changed, 8 insertions(+) diff --git a/drivers/gpu/ipu-v3/ipu-cpmem.c b/drivers/gpu/ipu-v3/ipu-cpmem.c index 6494a4d..a36c35e 100644 --- a/drivers/gpu/ipu-v3/ipu-cpmem.c +++ b/drivers/gpu/ipu-v3/ipu-cpmem.c @@ -253,6 +253,13 @@ void ipu_cpmem_set_buffer(struct ipuv3_channel *ch, int bufnum, dma_addr_t buf) } EXPORT_SYMBOL_GPL(ipu_cpmem_set_buffer); +void ipu_cpmem_set_uv_offset(struct ipuv3_channel *ch, u32 u_off, u32 v_off) +{ + ipu_ch_param_write_field(ch, IPU_FIELD_UBO, u_off / 8); + ipu_ch_param_write_field(ch, IPU_FIELD_VBO, v_off / 8); +} +EXPORT_SYMBOL_GPL(ipu_cpmem_set_uv_offset); + void ipu_cpmem_interlaced_scan(struct ipuv3_channel *ch, int stride) { ipu_ch_param_write_field(ch, IPU_FIELD_SO, 1); diff --git a/include/video/imx-ipu-v3.h b/include/video/imx-ipu-v3.h index 7adeaae..69c8658 100644 --- a/include/video/imx-ipu-v3.h +++ b/include/video/imx-ipu-v3.h @@ -184,6 +184,7 @@ void ipu_cpmem_set_resolution(struct ipuv3_channel *ch, int xres, int yres); void ipu_cpmem_set_stride(struct ipuv3_channel *ch, int stride); void ipu_cpmem_set_high_priority(struct ipuv3_channel *ch); void ipu_cpmem_set_buffer(struct ipuv3_channel *ch, int bufnum, dma_addr_t buf); +void ipu_cpmem_set_uv_offset(struct ipuv3_channel *ch, u32 u_off, u32 v_off); 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);