From patchwork Thu Jul 7 23:03:27 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Longerbeam X-Patchwork-Id: 9220013 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 7AD5960574 for ; Fri, 8 Jul 2016 05:26:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6D1412840B for ; Fri, 8 Jul 2016 05:26:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6161228411; Fri, 8 Jul 2016 05:26:32 +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 EDF3F2840B for ; Fri, 8 Jul 2016 05:26:31 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 59F626E871; Fri, 8 Jul 2016 05:26:20 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pf0-x243.google.com (mail-pf0-x243.google.com [IPv6:2607:f8b0:400e:c00::243]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1366B6E003 for ; Thu, 7 Jul 2016 23:04:15 +0000 (UTC) Received: by mail-pf0-x243.google.com with SMTP id t190so2907463pfb.2 for ; Thu, 07 Jul 2016 16:04:15 -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=I3ODE9u14+hBY2/kEsd90rBLJZPWxgaVLicVZZcU38tRMHHNP5URZdr9FGAd2hVvyQ aag73e6L+5uJnRPoCVuU5fu7QFH+C25N59FwOZatYd1hSDg58K9PQn9ACdqJy/UJ5aAa VBmix5XLsUeQ/zGsLOjx20q0otrOUh8zIIQt4BkXcsmA5CN+oNdyHOQU2iPPk5BXH8wr /8OSzqvwwDxVz7F2Z9YcnRJuWjO+dvuFKJDu3JZPU+FBaCPpHoestWtzwMOK5R89HCdb +eKVAYH86ZsQ+ZKcRr3goXYaAXWR3Lmb7y8Pf6idVPnPVITfvUR85rNfljHquoyx1r7i Wgaw== 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=MZvExjEHLcSYXMBelGakdQpatItSVsFcnLH2GXVw26o8gWTRNM8tskQMQkwykPa8gz kxJHY868L9XhylDWxEGVAd/SucjnL5qc+tsAVaGshdSL1shjijAYG8G8R5LYYjxOubOd ajzne8Mrl5rxkwkArOD+EwhYt5J4rQz8H1BUQT76MbALIzC+/f+uydDApm+1kpeQ7R25 6vghp4cm0FkkLuSYutortYUhV1+ZTimFtNfshtsug/4/ae27O9/AKxPpA8DavVabp04u 81VzDIbgAJrzE9VFkU4kWaT4yOo8qM1+m/XMGUsZII+RmxwvDZGdjbx558SeYrOfH0uh JkXA== X-Gm-Message-State: ALyK8tIFzyJyGGm6fou4+8xaLWwqFX7Bq9AQBMVaLgekzpZHNyh1ehPGJ9ZtWpXgf/DH2Q== X-Received: by 10.98.10.148 with SMTP id 20mr4496006pfk.154.1467932654373; Thu, 07 Jul 2016 16:04:14 -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 z29sm6846719pff.0.2016.07.07.16.04.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 07 Jul 2016 16:04:13 -0700 (PDT) From: Steve Longerbeam X-Google-Original-From: Steve Longerbeam To: p.zabel@pengutronix.de Subject: [PATCH 02/16] gpu: ipu-cpmem: Add ipu_cpmem_set_uv_offset() Date: Thu, 7 Jul 2016 16:03:27 -0700 Message-Id: <1467932621-358-3-git-send-email-steve_longerbeam@mentor.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1467932621-358-1-git-send-email-steve_longerbeam@mentor.com> References: <1467932621-358-1-git-send-email-steve_longerbeam@mentor.com> X-Mailman-Approved-At: Fri, 08 Jul 2016 05:26:19 +0000 Cc: 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 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);