From patchwork Fri Oct 31 22:54:09 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Longerbeam X-Patchwork-Id: 5207341 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 EA3AEC11AC for ; Fri, 31 Oct 2014 23:56:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1B32320172 for ; Fri, 31 Oct 2014 23:56:52 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 1FB1C201B9 for ; Fri, 31 Oct 2014 23:56:51 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3AEB26E857; Fri, 31 Oct 2014 16:56:39 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pa0-f49.google.com (mail-pa0-f49.google.com [209.85.220.49]) by gabe.freedesktop.org (Postfix) with ESMTP id BD3116E847 for ; Fri, 31 Oct 2014 15:57:09 -0700 (PDT) Received: by mail-pa0-f49.google.com with SMTP id lj1so8467947pab.8 for ; Fri, 31 Oct 2014 15:57:09 -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=X4tL5KOHprcKrW4gVRnHe0I09NHj/bI/eMJRKBMxLEc=; b=rEO/amtBO9LLTVtWBVTy/vl8WgvqG26pP9Y2m2lGn0Ry6DFvh7GMvzUPbvyepeZ21W 5uGpWv10VEk5mGVRN03SCf1Ra23egPw2LJj7jCkRyAgJisuQT7AAiTUHXdtC8yT7JTs4 5rtbmvE9t2Erqtnuu4DYPI2w+bn9AHesbpHq5ZkrqUcMqPROULpDWydZWGaIxl6WGmhn s/ff8yFPKiM7smTb7MIe/vbV5C9LT0GNr+L1PvmSpQT1eQCmWfdknTToHSlbXyBx1EMV eh7iKPUdiJO5yci0OEeZDMWOFwf23W2LgpMlRzgX/oVVXwtBPy7oUU1UHJ+dYP0ELPRx yoQA== X-Received: by 10.68.69.76 with SMTP id c12mr27105787pbu.59.1414796229660; Fri, 31 Oct 2014 15:57:09 -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.08 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 31 Oct 2014 15:57:09 -0700 (PDT) From: Steve Longerbeam X-Google-Original-From: Steve Longerbeam To: dri-devel@lists.freedesktop.org Subject: [PATCH 26/72] gpu: ipu-v3: Enumerate the DC channel names Date: Fri, 31 Oct 2014 15:54:09 -0700 Message-Id: <1414796095-10107-27-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 Define the names of the DC channels, and reference them in ipu-dc. Signed-off-by: Steve Longerbeam --- drivers/gpu/ipu-v3/ipu-dc.c | 6 ++---- include/video/imx-ipu-v3.h | 7 +++++++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/ipu-v3/ipu-dc.c b/drivers/gpu/ipu-v3/ipu-dc.c index 6a3e429..23b6e2c 100644 --- a/drivers/gpu/ipu-v3/ipu-dc.c +++ b/drivers/gpu/ipu-v3/ipu-dc.c @@ -83,8 +83,6 @@ #define DC_WR_CH_CONF_PROG_DI_ID (1 << 2) #define DC_WR_CH_CONF_PROG_DISP_ID(i) (((i) & 0x1) << 3) -#define IPU_DC_NUM_CHANNELS 10 - struct ipu_dc_priv; /* some pre-defined maps */ @@ -394,9 +392,9 @@ void ipu_dc_disable_channel(struct ipu_dc *dc) u32 val; /* TODO: Handle MEM_FG_SYNC differently from MEM_BG_SYNC */ - if (dc->chno == 1) + if (dc->chno == IPU_DC_CHANNEL_SYNC) irq = priv->dc_irq; - else if (dc->chno == 5) + else if (dc->chno == IPU_DC_CHANNEL_DP_SYNC) irq = priv->dp_irq; else return; diff --git a/include/video/imx-ipu-v3.h b/include/video/imx-ipu-v3.h index 0eb7468..d2f621d 100644 --- a/include/video/imx-ipu-v3.h +++ b/include/video/imx-ipu-v3.h @@ -239,6 +239,13 @@ struct ipu_dc_if_map { u32 v4l2_fmt; }; +#define IPU_DC_CHANNEL_DP_SYNC 5 /* sync main+aux planes */ +#define IPU_DC_CHANNEL_SYNC 1 /* sync single plane (no DP) */ +#define IPU_DC_CHANNEL_DP_ASYNC 6 /* async main+aux planes */ +#define IPU_DC_CHANNEL_ASYNC 2 /* async single plane (no DP) */ +#define IPU_DC_CHANNEL_READ 0 /* DC read channel */ +#define IPU_DC_NUM_CHANNELS 10 + struct ipu_dc; struct ipu_di; struct ipu_dc *ipu_dc_get(struct ipu_soc *ipu, int channel);