From patchwork Wed Jul 20 01:11:00 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Longerbeam X-Patchwork-Id: 9238643 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 0B6766075D for ; Wed, 20 Jul 2016 01:15:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F0CA02624C for ; Wed, 20 Jul 2016 01:15:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E4F722787C; Wed, 20 Jul 2016 01:15:10 +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 6B66B2624C for ; Wed, 20 Jul 2016 01:15:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752500AbcGTBOt (ORCPT ); Tue, 19 Jul 2016 21:14:49 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:33558 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752370AbcGTBLX (ORCPT ); Tue, 19 Jul 2016 21:11:23 -0400 Received: by mail-pf0-f195.google.com with SMTP id i6so2343615pfe.0; Tue, 19 Jul 2016 18:11:23 -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=jEw7SNpbJxDhP8vAhW3zABhehqhxrFStrzC+BpKHIY4=; b=JQ/mJISnzqkLamy4VlRTpwj2mqPS3H8sts/JkmDHoVKi0lMmOVtQuRUoGtdibo3/g7 5yQ0Y6Geova4IerNUKgDrUVn4RXPeByAtjIhXSypK4B/+DFpFWmeHDJjItyc0C91a/rp 16B396Bp4VCyGGMrSxaCWjhwZYK344ab68P5ufELb6bZbpIJSe/L7WLsZw11HJjdBJt5 aUGEFRT3YWnhNTLcw2YiVOGpuwcqIVwo+WPIobwfpnJ5rsKb6cfaBURIZyKFbSwdeGAH aj4bDkGTvoTEWHKxrsOj4A0t89z9C7FrhKZhtx5OwfUiBn4tE2xpO07JitC85nZ8rjHu xZHQ== 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=jEw7SNpbJxDhP8vAhW3zABhehqhxrFStrzC+BpKHIY4=; b=Sw+eKzEfZdZG2GQl2dIgNcIpwFY1qgsdtQCGEiotaHfUeCGkbTJDFmppw5WF/jiAVd pMoHCE5VMDxDMLL3GmXP46RX+9oe9aTSPdpypU+5lMXqL2LdLENRYWuoahVNZGLppUm6 3L/Q+4luOUaKn8hR/iDg8nphYJBSOPfBxSvTd2hxgAYeAE3kv/yBRhQxe3q/aJlYQC0h rzbSz/WasRtxl95uhXbS9ATrhoJLVsVKh5wmoOb+uc00AliSjun1lgwYVyomq+B8pYi3 6hHmWhRrp9IaPxVJV69NqGYWwegVM7vOgnDXX/0TZgpuEl3q+3OsPtAGJ//CIuXPD75b hlAw== X-Gm-Message-State: ALyK8tKc88/12prtEyNBEIQNcQLAQ0YfG7y3y1Zgk41Rp9PmoEVjzbCgqhGbWgtM82cF7Q== X-Received: by 10.98.50.2 with SMTP id y2mr17445858pfy.138.1468977082874; Tue, 19 Jul 2016 18:11:22 -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 d1sm84277pas.48.2016.07.19.18.11.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 19 Jul 2016 18:11:22 -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-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, Steve Longerbeam Subject: [PATCH v2 02/13] gpu: ipu-cpmem: Add ipu_cpmem_set_uv_offset() Date: Tue, 19 Jul 2016 18:11:00 -0700 Message-Id: <1468977071-29240-3-git-send-email-steve_longerbeam@mentor.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1468977071-29240-1-git-send-email-steve_longerbeam@mentor.com> References: <1467932621-358-1-git-send-email-steve_longerbeam@mentor.com> <1468977071-29240-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 --- 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 a7a28db..48c8dc5 100644 --- a/include/video/imx-ipu-v3.h +++ b/include/video/imx-ipu-v3.h @@ -194,6 +194,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);