From patchwork Fri Jul 20 20:43:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 10538331 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 4A1F76029B for ; Fri, 20 Jul 2018 20:45:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 37E7328EA5 for ; Fri, 20 Jul 2018 20:45:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2BEC028ED9; Fri, 20 Jul 2018 20:45:12 +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 BB64D28EA5 for ; Fri, 20 Jul 2018 20:45:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728273AbeGTVfH (ORCPT ); Fri, 20 Jul 2018 17:35:07 -0400 Received: from mail-yw0-f193.google.com ([209.85.161.193]:37469 "EHLO mail-yw0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728265AbeGTVfG (ORCPT ); Fri, 20 Jul 2018 17:35:06 -0400 Received: by mail-yw0-f193.google.com with SMTP id w76-v6so4813749ywg.4 for ; Fri, 20 Jul 2018 13:45:10 -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=q2pY327X7pPhvOMmULLifK9ITN1PN57wbAvTQpjThWY=; b=YGa+jGwGHY6mzy5LJsH6wGpHadZMyqxCsWTyJX8YP1y7E1VxfSRG2b3Iw20ZdYiaNj 8fhezAwgj20Ip0x+SDpcS5Jpks7Hs14/Dq2w8W9eUwiyxYWzSxLlV+AxMjw1jDmhv21b TupKzGePXAlA2i0DadVf97e0aukjKuD5JOqGY= 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=q2pY327X7pPhvOMmULLifK9ITN1PN57wbAvTQpjThWY=; b=LN1pCmLR8IwM4RLv9wnBMHtqteOdobZNzc3V/LhSzMZ7PlMoNuylBqlqza+nxp3qGj NSjD9t/hhZ+HdHs18IKT6xhBXTXk+VRTc5TPeWfFkVhNE5E8X+jFlpIIeaK6uRZ2GGey RjbCGGXMV96iHOg5ERYnsPAk35UlC+OzwCxCF90Q3vkytF2XPFkJ1Zky0NM0/P8VruNp Sa4cgU5DzmWfwumPRkLs8oVQnU2tM2zoBEoB0rKS9bI49jxtwb9H6WrdFOHl6ad3AhJI S0NPIAdRTze/soJFaH+niv656eyN+DdNbvwbGnKu8rLZag/1uUL6mr680kS95/JPHqcC 6AyA== X-Gm-Message-State: AOUpUlFFaq357CH6U/tXOhRZwNUdjES+AQRvoPvCCp8D5v8EoeGmc/8F sVuQjpH/ZLHOC7TGO7XnoJpncA== X-Google-Smtp-Source: AAOMgpdSj6JdFxPucQb98o4K41VHA5u9aVvbWYNABJNL0cJSQo92UWrzMnro0rG3895J5J//k8o4sw== X-Received: by 2002:a81:84cb:: with SMTP id u194-v6mr1810928ywf.246.1532119510128; Fri, 20 Jul 2018 13:45:10 -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.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 20 Jul 2018 13:45:09 -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 13/19] drm/msm: #define MDP version numbers Date: Fri, 20 Jul 2018 16:43:04 -0400 Message-Id: <20180720204315.19054-14-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 Useful for incoming DPU support Changes in v3: - None Signed-off-by: Jeykumar Sankaran [seanpaul split this from the dpu megapatch] Signed-off-by: Sean Paul --- drivers/gpu/drm/msm/msm_drv.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c index b73acdd52931..67816543a0d7 100644 --- a/drivers/gpu/drm/msm/msm_drv.c +++ b/drivers/gpu/drm/msm/msm_drv.c @@ -267,6 +267,9 @@ static int msm_drm_uninit(struct device *dev) return 0; } +#define KMS_MDP4 4 +#define KMS_MDP5 5 + static int get_mdp_ver(struct platform_device *pdev) { struct device *dev = &pdev->dev; @@ -411,11 +414,11 @@ static int msm_drm_init(struct device *dev, struct drm_driver *drv) msm_gem_shrinker_init(ddev); switch (get_mdp_ver(pdev)) { - case 4: + case KMS_MDP4: kms = mdp4_kms_init(ddev); priv->kms = kms; break; - case 5: + case KMS_MDP5: kms = mdp5_kms_init(ddev); break; default: @@ -1162,8 +1165,8 @@ static int msm_pdev_remove(struct platform_device *pdev) } static const struct of_device_id dt_match[] = { - { .compatible = "qcom,mdp4", .data = (void *)4 }, /* MDP4 */ - { .compatible = "qcom,mdss", .data = (void *)5 }, /* MDP5 MDSS */ + { .compatible = "qcom,mdp4", .data = (void *)KMS_MDP4 }, + { .compatible = "qcom,mdss", .data = (void *)KMS_MDP5 }, {} }; MODULE_DEVICE_TABLE(of, dt_match);