From patchwork Tue Mar 14 20:35:43 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jyri Sarha X-Patchwork-Id: 9624459 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 4B899604A9 for ; Tue, 14 Mar 2017 20:36:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3E6A0285B7 for ; Tue, 14 Mar 2017 20:36:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 334FA285C5; Tue, 14 Mar 2017 20:36:39 +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_SIGNED, 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]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id EA2AE285B7 for ; Tue, 14 Mar 2017 20:36:38 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F32F86E7C0; Tue, 14 Mar 2017 20:36:37 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from fllnx209.ext.ti.com (fllnx209.ext.ti.com [198.47.19.16]) by gabe.freedesktop.org (Postfix) with ESMTPS id DA0CC6E06C for ; Tue, 14 Mar 2017 20:36:34 +0000 (UTC) Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by fllnx209.ext.ti.com (8.15.1/8.15.1) with ESMTP id v2EKZvmE020136; Tue, 14 Mar 2017 15:35:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1489523757; bh=2hQ8rXFbQQF+hQkN5AJLnja3zVHNUkRIl+5mwAnO4d4=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=d3HX51/PhQxm3h7MjA3eU2TraGrddHXvplL4Hptvlnq0UBN99y751OAtgLUcYZHVg HTFdLzgzXFc8x+Q5dKLid0gYAkRLrIz+P+swF06401QakV8bjkocnXCkEsciD+df0/ hL5x7p82wzqmD0ExUwJ52wpTBbxE8uV86YKeUA38= Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id v2EKZpC1014366; Tue, 14 Mar 2017 15:35:52 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.3.294.0; Tue, 14 Mar 2017 15:35:51 -0500 Received: from jadmar.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id v2EKZkWh007438; Tue, 14 Mar 2017 15:35:50 -0500 From: Jyri Sarha To: Subject: [PATCH 2/3] drm/omapdrm: Change possible_crtcs to possible_crtcs_for_planes Date: Tue, 14 Mar 2017 22:35:43 +0200 Message-ID: <0ff3b3fa288e4bf48b4e94f9006c385e79cac46f.1489523660.git.jsarha@ti.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: References: MIME-Version: 1.0 Cc: tomi.valkeinen@ti.com, Jyri Sarha , laurent.pinchart@ideasonboard.com 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: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Rename possible_crtcs local variable to possible_crtcs_for_planes in omap_modeset_init() and add a comment about its initialization. This is to make it more explicit what the variable is used for. Signed-off-by: Jyri Sarha --- drivers/gpu/drm/omapdrm/omap_drv.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/omapdrm/omap_drv.c b/drivers/gpu/drm/omapdrm/omap_drv.c index 17c40aa..3d30f29 100644 --- a/drivers/gpu/drm/omapdrm/omap_drv.c +++ b/drivers/gpu/drm/omapdrm/omap_drv.c @@ -320,7 +320,7 @@ static int omap_modeset_init(struct drm_device *dev) int num_crtcs = 0; int i, id = 0; int ret; - u32 possible_crtcs; + u32 possible_crtcs_for_planes; drm_mode_config_init(dev); @@ -338,7 +338,8 @@ static int omap_modeset_init(struct drm_device *dev) num_crtcs++; num_crtcs = min3(num_crtcs, num_mgrs, num_ovls); - possible_crtcs = (1 << num_crtcs) - 1; + /* All planes can be put to any CRTC */ + possible_crtcs_for_planes = (1 << num_crtcs) - 1; dssdev = NULL; @@ -401,7 +402,7 @@ static int omap_modeset_init(struct drm_device *dev) */ if (!channel_used(dev, channel)) { ret = omap_modeset_create_crtc(dev, id, channel, - possible_crtcs); + possible_crtcs_for_planes); if (ret < 0) { dev_err(dev->dev, "could not create CRTC (channel %u)\n", @@ -420,7 +421,7 @@ static int omap_modeset_init(struct drm_device *dev) struct drm_plane *plane; plane = omap_plane_init(dev, id, DRM_PLANE_TYPE_OVERLAY, - possible_crtcs); + possible_crtcs_for_planes); if (IS_ERR(plane)) return PTR_ERR(plane);