From patchwork Fri Jul 20 20:43:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 10538339 X-Patchwork-Delegate: agross@codeaurora.org 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 E11996029B for ; Fri, 20 Jul 2018 20:45:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CEC6B28ECC for ; Fri, 20 Jul 2018 20:45:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C23D228EDA; Fri, 20 Jul 2018 20:45:32 +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=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4AC2528ECC for ; Fri, 20 Jul 2018 20:45:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726974AbeGTVf1 (ORCPT ); Fri, 20 Jul 2018 17:35:27 -0400 Received: from mail-yw0-f193.google.com ([209.85.161.193]:42421 "EHLO mail-yw0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728088AbeGTVf1 (ORCPT ); Fri, 20 Jul 2018 17:35:27 -0400 Received: by mail-yw0-f193.google.com with SMTP id y203-v6so4812117ywd.9 for ; Fri, 20 Jul 2018 13:45:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references; bh=0pa3BvZMGDXzJbXLFV/AjlUmDWOLKiIinECZnr+uvUs=; b=gyI6U3s2SZtHeEcga+bN4gN0dkXtebqOjEbqXXdDmxw0dJ9bI5x24CcKCxeBwuPPrq deI2bImZj9jcU1oLZCZt0jrKFpLaDKnppnqKfTMHtsOA4LZfvZkMqUEK9ZLY6x39VQet dF/uvPFLt8beUaYU3h4UIUgpsXXIYZC84N6Ow= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=0pa3BvZMGDXzJbXLFV/AjlUmDWOLKiIinECZnr+uvUs=; b=C4rA3Nv+tb4BP45mifRmMMYEZUeQAxamJEAM6sYfXGTmAqTbokvIIRKoZSiUkMNTlV 0MNDmQDLQDc2gm6QGVhdUQTWIPZRQ0Ke3YbNkdzwDpmpfL0frA6xHomYO4c/cKxGrXB6 NrxPmfVDSE0ho34+uQIlQ9GqxDYF3Kc29s+LN0ZXGjpjiiVJmPNmWI8K0uHfZR70DMwJ wYQcrXDnjNOfeulNDqrF21ODUjXaI/H46fDHz6Oyp14nV5FZ4dpnMzt8BxKQ4T8ZpTd0 2DV85maEg5KzK6Jc6Hh+vchQXnDE+8QNIps+PtPE0plYJL1ffBPdpUPgIx1QhSFRpEA9 f3GQ== X-Gm-Message-State: AOUpUlErChVYlX9CPbOo9NZuTnMbOtuGi5QbwXPK1hYDwiDnDM55jdBw 2NY9YJQJJv3Q3/XTeTh7vrUw6Q== X-Google-Smtp-Source: AAOMgpeiHcOWVHAuf8dbKzMFHwTM9+SaTsVetKnx9HdtBFV9Wc0FdMkXM2uGloTyUQ68XDrgKIocqw== X-Received: by 2002:a81:5545:: with SMTP id j66-v6mr1812197ywb.336.1532119530720; Fri, 20 Jul 2018 13:45:30 -0700 (PDT) Received: from rosewood.cam.corp.google.com ([2620:0:1013:11:ad55:b1db:adfe:3b9f]) by smtp.gmail.com with ESMTPSA id a2-v6sm2453831ywm.7.2018.07.20.13.45.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 20 Jul 2018 13:45:30 -0700 (PDT) From: Sean Paul To: abhinavk@codeaurora.org, architt@codeaurora.org, chandanu@codeaurora.org, jsanka@codeaurora.org, jcrouse@codeaurora.org, ryadav@codeaurora.org, seanpaul@chromium.org, skolluku@codeaurora.org, dri-devel@lists.freedesktop.org, robdclark@gmail.com, airlied@linux.ie, freedreno@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, nganji@codeaurora.org, hoegsberg@chromium.org, dovizu@chromium.org, robh+dt@kernel.org Subject: [PATCH v3 15/19] drm/msm: #define MAX_ in msm_drv.h Date: Fri, 20 Jul 2018 16:43:06 -0400 Message-Id: <20180720204315.19054-16-seanpaul@chromium.org> X-Mailer: git-send-email 2.18.0.233.g985f88cf7e-goog In-Reply-To: <20180720204315.19054-1-seanpaul@chromium.org> References: <20180720204315.19054-1-seanpaul@chromium.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Jeykumar Sankaran dpu uses these elsewhere in the driver (in addition to increasing MAX_PLANES, that'll come later), so pull them out into #define. Changes in v3: - None Signed-off-by: Jeykumar Sankaran [seanpaul pulled this out of the dpu megapatch] Signed-off-by: Sean Paul --- drivers/gpu/drm/msm/msm_drv.h | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/msm/msm_drv.h b/drivers/gpu/drm/msm/msm_drv.h index fa0376b0f42b..3b206ae6423f 100644 --- a/drivers/gpu/drm/msm/msm_drv.h +++ b/drivers/gpu/drm/msm/msm_drv.h @@ -54,6 +54,12 @@ struct msm_fence_context; struct msm_gem_address_space; struct msm_gem_vma; +#define MAX_CRTCS 8 +#define MAX_PLANES 16 +#define MAX_ENCODERS 8 +#define MAX_BRIDGES 8 +#define MAX_CONNECTORS 8 + struct msm_file_private { rwlock_t queuelock; struct list_head submitqueues; @@ -117,19 +123,19 @@ struct msm_drm_private { struct workqueue_struct *wq; unsigned int num_planes; - struct drm_plane *planes[16]; + struct drm_plane *planes[MAX_PLANES]; unsigned int num_crtcs; - struct drm_crtc *crtcs[8]; + struct drm_crtc *crtcs[MAX_CRTCS]; unsigned int num_encoders; - struct drm_encoder *encoders[8]; + struct drm_encoder *encoders[MAX_ENCODERS]; unsigned int num_bridges; - struct drm_bridge *bridges[8]; + struct drm_bridge *bridges[MAX_BRIDGES]; unsigned int num_connectors; - struct drm_connector *connectors[8]; + struct drm_connector *connectors[MAX_CONNECTORS]; /* Properties */ struct drm_property *plane_property[PLANE_PROP_MAX_NUM];