From patchwork Mon Jul 9 17:31:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 10515375 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 F2B55600CA for ; Mon, 9 Jul 2018 17:34:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DAD1228D0D for ; Mon, 9 Jul 2018 17:34:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CF08628DD3; Mon, 9 Jul 2018 17:34:52 +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 3D23528DD2 for ; Mon, 9 Jul 2018 17:34:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933537AbeGIRev (ORCPT ); Mon, 9 Jul 2018 13:34:51 -0400 Received: from mail-yb0-f195.google.com ([209.85.213.195]:44812 "EHLO mail-yb0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933489AbeGIReu (ORCPT ); Mon, 9 Jul 2018 13:34:50 -0400 Received: by mail-yb0-f195.google.com with SMTP id a2-v6so7497326ybe.11 for ; Mon, 09 Jul 2018 10:34:50 -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=kUrIJoWl3tRYrmD3uOYTNKmzeW7tSsgBoaekUKX5Z8Y=; b=earxjMuNuVCnNDWyztdA9jKNt+MjUSQ7y45/tIm/7QTMJ4ZuBgODMz6TbO4M3w2HS4 iWnAQCTAiJzsC78vzdckrIxieof9H/sVqsKahPslrxC2GyP+Z0+quqmMq79mWvqyENRH dd3gOOYsWLAwRKYcJhSPgJiRfmlP8UO3Mtk4w= 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=kUrIJoWl3tRYrmD3uOYTNKmzeW7tSsgBoaekUKX5Z8Y=; b=XGWuENs+Ry29aG4nKdnw9Ap8AS5vYHudSi3XErjPIFsPjrmnLBPlaI2m1gEpy8Wtr5 rSacq8MYBnJIdhimW3zhqK7oFsO3IctwPo/Sypb4DTZ/wMwtvCYbDuQI790gnXn5BCA8 bzs4cp/3YcHEUsVIWmYOf9unMimFjC9DE75JTf/D0+NR7qLlFxKoFSQkR/VypLvN3qZ/ 4wjQq7A3eXS/EM8v0iIb2LOy0UPJ6xRJEH8VU6xaYeI8v/qsDXhxmfHx0gGL5/W6hNtq Lnc7pX4aW7pQK00Ieopks/T0lOVbtVhQBigA86uxPobkF8Tu0CIGxARwDX/SiK95TloP MLAg== X-Gm-Message-State: APt69E0BBtp+aiO/v+SGMiIsnfyedK0P4u+jBNYcL36veBzn7CszpZ/0 /ubru8IxGeO8BIRBVS05Y2fAfQ== X-Google-Smtp-Source: AAOMgpeif0RJ89AeP4U4FsRsGCf/y/5PjYXkiGgXW5JWxzsmtoHnCWpkUbGtYlVZQFczTJQnyAdT/A== X-Received: by 2002:a25:94c:: with SMTP id u12-v6mr11614333ybm.435.1531157690373; Mon, 09 Jul 2018 10:34:50 -0700 (PDT) Received: from rosewood.cam.corp.google.com ([2620:0:1013:11:ad55:b1db:adfe:3b9f]) by smtp.gmail.com with ESMTPSA id s206-v6sm5885495ywc.55.2018.07.09.10.34.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Jul 2018 10:34:49 -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 13/21] drm/msm: #define MDP version numbers Date: Mon, 9 Jul 2018 13:31:49 -0400 Message-Id: <20180709173200.238457-14-seanpaul@chromium.org> X-Mailer: git-send-email 2.18.0.203.gfac676dfb9-goog In-Reply-To: <20180709173200.238457-1-seanpaul@chromium.org> References: <20180709173200.238457-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 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);