From patchwork Tue Jun 14 22:48:58 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Longerbeam X-Patchwork-Id: 9177083 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 64FC46021C for ; Tue, 14 Jun 2016 22:51:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 55DC9282F9 for ; Tue, 14 Jun 2016 22:51:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4AFDC2833B; Tue, 14 Jun 2016 22:51:20 +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 E9B81282F9 for ; Tue, 14 Jun 2016 22:51:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752993AbcFNWvQ (ORCPT ); Tue, 14 Jun 2016 18:51:16 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:34663 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751560AbcFNWvG (ORCPT ); Tue, 14 Jun 2016 18:51:06 -0400 Received: by mail-pf0-f196.google.com with SMTP id 66so305630pfy.1 for ; Tue, 14 Jun 2016 15:51:06 -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=ITd56mteBCW4UBLGKmSOr+DCiveIbicKzuqKdNn96RQ=; b=i8McGMCegPtAkDo9NaUqnP7/Leh9N3+412mjT7QjcY1XZqMu6dhvYUUfCF2sJgbUOn fdw+LCROKOxdgFpDd4zI7WHe8aFEb4KY77vLgCiEBSKAK0+o3fD5meXsU4AS6daQ9Mpg nykTTEm6mvdm2/3oNHmQwGQjnI/rejOiFBwhmACfPV6mAK3dAvVFwsDQ6sGFlQe9NFlE yZUxZehmVjaujbcSmvk91NVVjgk0U7R7wWlRsbz+8qQ/kPcakJxvZjfasT20wQZyCyNg ZK6zf0AwmO2qIJPijnyZYEBdwjECR1C/3DEdF+hUrRLrFjqehTjB6EdH3vwt0hhgpKfc 6ifA== 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=ITd56mteBCW4UBLGKmSOr+DCiveIbicKzuqKdNn96RQ=; b=atOcPOjF+E1jzB39NoZCYfvxsJLzBzRFVFywH7Kdha2ZAPJvqjVPnCs2WvoBvJtWYL 5xorWviWkOT/SJbabemZkSgJ4QQ6X54D/wGVEMscqwRsXMWxyun6FSgpw5eHbKHyEHJR l1ah3r+AWZ7xQxrd5E2VoBZQshoWG8kAoSIUgDe6WjHUqjjj+U63nvbv1i+C1VzaJXEv 39+2IeA4s8oWUr0yIki/USkLJGprkmVm16Yu10aaq+v+4l0J+x66R3Cc6P92YKjS1x8y Ewhoz6mvQczrAuu3X+ATWGnxW0EKXLRro+XzpwKOujE+70Ed/Cj7rbz99xxGEvtNlT2V Jksw== X-Gm-Message-State: ALyK8tL5JS7vb9HrYHPRtqbSwA2XSouUmLND84UQHiThARDCNhb+VaWsxDnujZo/E/hWbA== X-Received: by 10.98.69.81 with SMTP id s78mr46826pfa.63.1465944665494; Tue, 14 Jun 2016 15:51:05 -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 v184sm47829999pfb.24.2016.06.14.15.51.04 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 14 Jun 2016 15:51:04 -0700 (PDT) From: Steve Longerbeam X-Google-Original-From: Steve Longerbeam To: linux-media@vger.kernel.org Cc: Steve Longerbeam Subject: [PATCH 02/38] gpu: ipu-cpmem: Add ipu_cpmem_set_uv_offset() Date: Tue, 14 Jun 2016 15:48:58 -0700 Message-Id: <1465944574-15745-3-git-send-email-steve_longerbeam@mentor.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1465944574-15745-1-git-send-email-steve_longerbeam@mentor.com> References: <1465944574-15745-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-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 22662a1..904fd12 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);