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: 9239021 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 41E8F600CB for ; Wed, 20 Jul 2016 07:51:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 35625277D9 for ; Wed, 20 Jul 2016 07:51:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2A7882793D; Wed, 20 Jul 2016 07:51:45 +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=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DC8D72787C for ; Wed, 20 Jul 2016 07:51:44 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D5E656E786; Wed, 20 Jul 2016 07:51:15 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pf0-x242.google.com (mail-pf0-x242.google.com [IPv6:2607:f8b0:400e:c00::242]) by gabe.freedesktop.org (Postfix) with ESMTPS id B32D16E3A2 for ; Wed, 20 Jul 2016 01:11:25 +0000 (UTC) Received: by mail-pf0-x242.google.com with SMTP id y134so2336699pfg.3 for ; Tue, 19 Jul 2016 18:11:25 -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=A1PV1DJ138plmCa3zJqBaiukJy/LZwyN6+1d6lz33OcD0BTV4bIPeecXKAGYOBWU3e UKh2WXBcENKxo0nE0NR+aF4zytWQARjRrXG9Thg57PtM1kbjWtk8sdVb6MVOSOCx+UgF deVyIR5tQ59Y9GnRpng+YxgDGsBF8cA/5fP3ERE7pASAYYbh9LVPS6NmZbV/h62ee00C Efy3cjWuE6rhmN+CHxecGtyqJChKR9m/hqE9Adaac0JOFBTuezDPgKTsqk2lRL3qdMYS t8u4+uhUvLmEgfQEvlE6UeqeuHFo4SG1ccMG12gDQD9cEElVkDirpglbN9VyIalX+J8y 99eQ== X-Gm-Message-State: ALyK8tLryDxQLuSz95PzHgI+vsWdDNHxvcnOlD+LD562+vdKvXD7sngMVWEjj+qavEU9yg== 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 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> X-Mailman-Approved-At: Wed, 20 Jul 2016 07:51:13 +0000 Cc: linux-fbdev@vger.kernel.org, Steve Longerbeam , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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);