From patchwork Fri Oct 31 22:54:43 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Longerbeam X-Patchwork-Id: 5207801 Return-Path: X-Original-To: patchwork-dri-devel@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 9D3919F387 for ; Fri, 31 Oct 2014 23:57:35 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D8E6B2010E for ; Fri, 31 Oct 2014 23:57:34 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 07F4720173 for ; Fri, 31 Oct 2014 23:57:34 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 53C9B6E877; Fri, 31 Oct 2014 16:56:59 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pd0-f177.google.com (mail-pd0-f177.google.com [209.85.192.177]) by gabe.freedesktop.org (Postfix) with ESMTP id 0166A898E1 for ; Fri, 31 Oct 2014 15:57:37 -0700 (PDT) Received: by mail-pd0-f177.google.com with SMTP id v10so8035077pde.22 for ; Fri, 31 Oct 2014 15:57:37 -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=5USQSahK8aw0mXucNPSfR0AyH+ohaBY3aN+HRB0ge8g=; b=Aw/Zg1tBuO11OfCxpeDsxIWy6MA6yUvWDzwE6su8zor0oMiOMPWufktCoLZbH0xHkv 5eGh5LLKk+sAbNHdWzJRwhOcEVUYo2KQ8sEZMffKTXU1DniEGA6PwV9nabucpYM123de V1ePp3PT4nRUN9weRRM0qD+DhVN336CX0cJMeh1FPGRyVaSZUkZkYQBOPKbqTvAflauB 6vUKjG1asoj+/Wiug72dXYj8z8jqR1PeZ7sWwzxaaoiZZFCgW1vJeS8ndQnQnSE37+kW rM2CY/oQUKIiGtb55PnAlMdJGSO5UYBJbAkPCAN7S4upAvlKcgRUxY9xQqj3E49Zg1FE jbnA== X-Received: by 10.68.242.67 with SMTP id wo3mr26999949pbc.95.1414796257887; Fri, 31 Oct 2014 15:57:37 -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.37 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 31 Oct 2014 15:57:37 -0700 (PDT) From: Steve Longerbeam X-Google-Original-From: Steve Longerbeam To: dri-devel@lists.freedesktop.org Subject: [PATCH 60/72] imx-drm: ipuv3-crtc: Set the crtc device name Date: Fri, 31 Oct 2014 15:54:43 -0700 Message-Id: <1414796095-10107-61-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:32 -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 Set the i.mx crtc device name to a more meaningful crtc[0-3], which matches the device tree phandle names. Signed-off-by: Steve Longerbeam --- drivers/staging/imx-drm/ipuv3-crtc.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/staging/imx-drm/ipuv3-crtc.c b/drivers/staging/imx-drm/ipuv3-crtc.c index bd158d6..316e5bf 100644 --- a/drivers/staging/imx-drm/ipuv3-crtc.c +++ b/drivers/staging/imx-drm/ipuv3-crtc.c @@ -80,6 +80,7 @@ struct ipu_crtc { struct device *ipu_dev; /* our ipu */ struct ipu_soc *ipu; struct device_node *port; /* our port */ + int id; /* this crtc's id */ const struct ipu_channels *ch; @@ -545,7 +546,7 @@ static int ipu_crtc_init(struct ipu_crtc *ipu_crtc, struct drm_device *drm) { struct device_node *np = ipu_crtc->dev->of_node; - int id, primary_pipe, overlay_pipe; + int primary_pipe, overlay_pipe; int ret; ret = ipu_get_resources(ipu_crtc, np); @@ -563,7 +564,7 @@ static int ipu_crtc_init(struct ipu_crtc *ipu_crtc, goto err_put_resources; } - id = imx_drm_crtc_id(ipu_crtc->imx_crtc); + ipu_crtc->id = imx_drm_crtc_id(ipu_crtc->imx_crtc); primary_pipe = imx_drm_primary_plane_pipe(ipu_crtc->imx_crtc); ret = ipu_plane_init(&ipu_crtc->plane[0], drm, @@ -571,7 +572,7 @@ static int ipu_crtc_init(struct ipu_crtc *ipu_crtc, primary_pipe, ipu_crtc->ch->dma[0], ipu_crtc->ch->dp[0], - BIT(id), true); + BIT(ipu_crtc->id), true); if (ret) { dev_err(ipu_crtc->dev, "init primary plane failed with %d\n", ret); @@ -593,7 +594,7 @@ static int ipu_crtc_init(struct ipu_crtc *ipu_crtc, overlay_pipe, ipu_crtc->ch->dma[1], ipu_crtc->ch->dp[1], - BIT(id), false); + BIT(ipu_crtc->id), false); ipu_crtc->have_overlay = ret ? false : true; } @@ -625,6 +626,7 @@ static int ipu_drm_bind(struct device *dev, struct device *master, void *data) return ret; dev_set_drvdata(dev, ipu_crtc); + dev_set_name(dev, "crtc%d", ipu_crtc->id); return 0; }