From patchwork Fri Oct 31 22:54:19 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Longerbeam X-Patchwork-Id: 5207751 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id C8280C11AD for ; Fri, 31 Oct 2014 23:57:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 10FFD20120 for ; Fri, 31 Oct 2014 23:57:30 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 31FAF20172 for ; Fri, 31 Oct 2014 23:57:29 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 914256E8AB; Fri, 31 Oct 2014 16:56:43 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pa0-f41.google.com (mail-pa0-f41.google.com [209.85.220.41]) by gabe.freedesktop.org (Postfix) with ESMTP id 285E56E847 for ; Fri, 31 Oct 2014 15:57:18 -0700 (PDT) Received: by mail-pa0-f41.google.com with SMTP id rd3so8576852pab.14 for ; Fri, 31 Oct 2014 15:57:18 -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=dJukcpujUAoOhZNAfArtuM4ukYp0BBTdjCYL8nvyHtw=; b=e0gS+imkcTuBvx6Bb6nArFF0fzA3+im9AtFRAzCSwKW47alanKHCd/66WY5yRZ6TlG wreZMdI4xsAWrxP7D4Z/r/52D4AZ7U/p5zdlBDxY9SMKaO8nLgkBLtr0bvRdhbTtqo/Z wtGTtfl3WUcuaiuCgsf22qPIHgD5edlU4WXfGvJ8C5IO3F/bzo8lSFGnEVv6MbVYlVGE OPGlIZmMuAwJbsNkuclwXbBaeENfe1y2XkBiedwTwpHqAoWEcOKffuw34ddzKzC3s+jP h8DBTIA4Ai7jOx8Lh36wEjj5BObmcC/nTi4jjGi4ucxU2c5TeJzK4J3zV6CXR/hfiwz4 jikg== X-Received: by 10.70.89.101 with SMTP id bn5mr13656366pdb.134.1414796238047; Fri, 31 Oct 2014 15:57:18 -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 ev8sm10870656pdb.28.2014.10.31.15.57.17 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 31 Oct 2014 15:57:17 -0700 (PDT) From: Steve Longerbeam X-Google-Original-From: Steve Longerbeam To: dri-devel@lists.freedesktop.org Subject: [PATCH 36/72] gpu: ipu-cpmem: Support YVU422 Date: Fri, 31 Oct 2014 15:54:19 -0700 Message-Id: <1414796095-10107-37-git-send-email-steve_longerbeam@mentor.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1414796095-10107-1-git-send-email-steve_longerbeam@mentor.com> References: <1414796095-10107-1-git-send-email-steve_longerbeam@mentor.com> X-Mailman-Approved-At: Fri, 31 Oct 2014 16:56:31 -0700 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-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable 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 Add simple hooks to support YVU422 in cpmem. Signed-off-by: Steve Longerbeam --- drivers/gpu/ipu-v3/ipu-cpmem.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/ipu-v3/ipu-cpmem.c b/drivers/gpu/ipu-v3/ipu-cpmem.c index a53b242..b05a5e8 100644 --- a/drivers/gpu/ipu-v3/ipu-cpmem.c +++ b/drivers/gpu/ipu-v3/ipu-cpmem.c @@ -413,6 +413,7 @@ void ipu_cpmem_set_yuv_planar_full(struct ipuv3_channel *ch, ipu_ch_param_write_field(ch, IPU_FIELD_VBO, v_offset / 8); break; case DRM_FORMAT_YVU420: + case DRM_FORMAT_YVU422: ipu_ch_param_write_field(ch, IPU_FIELD_SLUV, (stride / 2) - 1); ipu_ch_param_write_field(ch, IPU_FIELD_UBO, v_offset / 8); ipu_ch_param_write_field(ch, IPU_FIELD_VBO, u_offset / 8); @@ -443,6 +444,7 @@ void ipu_cpmem_set_yuv_planar(struct ipuv3_channel *ch, u32 drm_fourcc, u_offset, v_offset); break; case DRM_FORMAT_YUV422: + case DRM_FORMAT_YVU422: uv_stride = stride / 2; u_offset = stride * height; v_offset = u_offset + (uv_stride * height); @@ -627,6 +629,7 @@ int ipu_cpmem_set_image(struct ipuv3_channel *ch, struct ipu_image *image) u_offset, v_offset); break; case DRM_FORMAT_YUV422: + case DRM_FORMAT_YVU422: offset = Y_OFFSET(pix, image->rect.left, image->rect.top); u_offset = U2_OFFSET(pix, image->rect.left, image->rect.top) - offset;