From patchwork Thu Jun 26 01:05:48 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Longerbeam X-Patchwork-Id: 4425151 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 5B32C9F2C8 for ; Thu, 26 Jun 2014 01:08:05 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6A75720381 for ; Thu, 26 Jun 2014 01:08:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8E7B22037B for ; Thu, 26 Jun 2014 01:08:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757480AbaFZBHy (ORCPT ); Wed, 25 Jun 2014 21:07:54 -0400 Received: from mail-pa0-f46.google.com ([209.85.220.46]:41185 "EHLO mail-pa0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932276AbaFZBHc (ORCPT ); Wed, 25 Jun 2014 21:07:32 -0400 Received: by mail-pa0-f46.google.com with SMTP id eu11so2431445pac.33 for ; Wed, 25 Jun 2014 18:07:32 -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=44yPw498m5I0/yHxBCIZVW8qeDENQApilj3JWr67DIo=; b=eJ0VLF1HpfBhZwA2Kdtzkn5LX1jQ06zHCcXXUIVXuWq/9rbDfoAULWQ72TbfYVkMcw 9ouAzxcPlMnTlQovGXBOPEpXy2DOeKfkpaGDCdnAw3Vc+sLkfUoTwQn1k2OR+UM+95tq BLNqYIgnV0FXb8AEXP/XxUylxRSGJBWn0Wy/Nh9ga1A1QHZOoT1wNihqNhFxgSy2oWFg yq7S5MLULJ6W3+I1dDG3gNpK+PXsIPX5/vPsD4bqfGYz6oxllPXv3I1bhFY+h9t5T+VV NEMhKP3WQva4Hadrd95MPtQg8q2ql0Tw6XL7YPB7C41OV/VecJSDeNF11CWqHUf1TnJD qrHA== X-Received: by 10.66.254.166 with SMTP id aj6mr16872875pad.11.1403744852393; Wed, 25 Jun 2014 18:07:32 -0700 (PDT) Received: from mothership.mgc.mentorg.com (c-50-152-159-227.hsd1.ca.comcast.net. [50.152.159.227]) by mx.google.com with ESMTPSA id gg3sm7139010pbc.34.2014.06.25.18.07.31 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 25 Jun 2014 18:07:31 -0700 (PDT) From: Steve Longerbeam X-Google-Original-From: Steve Longerbeam To: linux-media@vger.kernel.org Cc: Steve Longerbeam Subject: [PATCH 21/28] staging: imx-drm: Convert to new ipu_cpmem API Date: Wed, 25 Jun 2014 18:05:48 -0700 Message-Id: <1403744755-24944-22-git-send-email-steve_longerbeam@mentor.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1403744755-24944-1-git-send-email-steve_longerbeam@mentor.com> References: <1403744755-24944-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-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The ipu_cpmem_*() calls now take a channel pointer instead of a pointer into cpmem for that channel. Signed-off-by: Steve Longerbeam --- drivers/staging/imx-drm/ipuv3-plane.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/drivers/staging/imx-drm/ipuv3-plane.c b/drivers/staging/imx-drm/ipuv3-plane.c index 6f393a1..6ffe1bb 100644 --- a/drivers/staging/imx-drm/ipuv3-plane.c +++ b/drivers/staging/imx-drm/ipuv3-plane.c @@ -62,7 +62,6 @@ static inline int calc_bandwidth(int width, int height, unsigned int vref) int ipu_plane_set_base(struct ipu_plane *ipu_plane, struct drm_framebuffer *fb, int x, int y) { - struct ipu_ch_param __iomem *cpmem; struct drm_gem_cma_object *cma_obj; unsigned long eba; @@ -75,13 +74,12 @@ int ipu_plane_set_base(struct ipu_plane *ipu_plane, struct drm_framebuffer *fb, dev_dbg(ipu_plane->base.dev->dev, "phys = %pad, x = %d, y = %d", &cma_obj->paddr, x, y); - cpmem = ipu_get_cpmem(ipu_plane->ipu_ch); - ipu_cpmem_set_stride(cpmem, fb->pitches[0]); + ipu_cpmem_set_stride(ipu_plane->ipu_ch, fb->pitches[0]); eba = cma_obj->paddr + fb->offsets[0] + fb->pitches[0] * y + (fb->bits_per_pixel >> 3) * x; - ipu_cpmem_set_buffer(cpmem, 0, eba); - ipu_cpmem_set_buffer(cpmem, 1, eba); + ipu_cpmem_set_buffer(ipu_plane->ipu_ch, 0, eba); + ipu_cpmem_set_buffer(ipu_plane->ipu_ch, 1, eba); /* cache offsets for subsequent pageflips */ ipu_plane->x = x; @@ -97,7 +95,6 @@ int ipu_plane_mode_set(struct ipu_plane *ipu_plane, struct drm_crtc *crtc, uint32_t src_x, uint32_t src_y, uint32_t src_w, uint32_t src_h) { - struct ipu_ch_param __iomem *cpmem; struct device *dev = ipu_plane->base.dev->dev; int ret; @@ -175,10 +172,9 @@ int ipu_plane_mode_set(struct ipu_plane *ipu_plane, struct drm_crtc *crtc, return ret; } - cpmem = ipu_get_cpmem(ipu_plane->ipu_ch); - ipu_ch_param_zero(cpmem); - ipu_cpmem_set_resolution(cpmem, src_w, src_h); - ret = ipu_cpmem_set_fmt(cpmem, fb->pixel_format); + ipu_cpmem_zero(ipu_plane->ipu_ch); + ipu_cpmem_set_resolution(ipu_plane->ipu_ch, src_w, src_h); + ret = ipu_cpmem_set_fmt(ipu_plane->ipu_ch, fb->pixel_format); if (ret < 0) { dev_err(dev, "unsupported pixel format 0x%08x\n", fb->pixel_format);