From patchwork Sat Dec 7 23:35:37 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Clark X-Patchwork-Id: 3305331 Return-Path: X-Original-To: patchwork-linux-arm-msm@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 085929F3B8 for ; Sat, 7 Dec 2013 23:36:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 405D620328 for ; Sat, 7 Dec 2013 23:36:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 38A21202FE for ; Sat, 7 Dec 2013 23:36:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759144Ab3LGXgR (ORCPT ); Sat, 7 Dec 2013 18:36:17 -0500 Received: from mail-qe0-f46.google.com ([209.85.128.46]:43997 "EHLO mail-qe0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759139Ab3LGXgQ (ORCPT ); Sat, 7 Dec 2013 18:36:16 -0500 Received: by mail-qe0-f46.google.com with SMTP id a11so1725558qen.33 for ; Sat, 07 Dec 2013 15:36:16 -0800 (PST) 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=/QOA5/luO1aQ4RXQGPEc53RHqyE/IowqA1nH7p1t9a8=; b=QpFw/YoaV0qjxjHUFfI8cc+oObMQN0DY7UJ8Ojb94hPD3GkJME6zz5fSVgukkhfZGk /E6APXdzqhDlDdFELj0eMdmbY81/1+Nn4EXPgHpc7os1BeilUj9BWoH/7Li+0S6bOzmC HlQrh5d9UbUM2+LNzr91dUBO5pDAUeg1KGJlz/R9Mwtl8O9JoJZjcqzYNz7+LRbMckmQ wY67v2f49h1wgiWUghbqmX3onyI74KIwzIIRmyyH8dSZYMtc9pgKHHm1/nI9f68o1HJO vnZZE+eABwWxDDb4k9H0MGWN9XpikC2v9VvPc+gwLU5usFqKm+kEGjMdKOx2FGwIFCXk cwBw== X-Received: by 10.224.51.7 with SMTP id b7mr20758428qag.74.1386459375996; Sat, 07 Dec 2013 15:36:15 -0800 (PST) Received: from localhost (pool-108-20-244-90.bstnma.east.verizon.net. [108.20.244.90]) by mx.google.com with ESMTPSA id i7sm12243813qeo.7.2013.12.07.15.36.14 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 07 Dec 2013 15:36:15 -0800 (PST) From: Rob Clark To: dri-devel@lists.freedesktop.org Cc: linux-arm-msm@vger.kernel.org, Rob Clark Subject: [PATCH 05/13] drm/msm: add support for msm8060ab/bstem Date: Sat, 7 Dec 2013 18:35:37 -0500 Message-Id: <1386459345-17731-6-git-send-email-robdclark@gmail.com> X-Mailer: git-send-email 1.8.4.2 In-Reply-To: <1386459345-17731-1-git-send-email-robdclark@gmail.com> References: <1386459345-17731-1-git-send-email-robdclark@gmail.com> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham 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 This adds the necessary configuration for the APQ8060A SoC (dual-core krait + a320 gpu) as found on the bstem board. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/adreno/a3xx_gpu.c | 16 +++++++++++++--- drivers/gpu/drm/msm/hdmi/hdmi.c | 4 ++-- drivers/gpu/drm/msm/mdp4/mdp4_kms.c | 4 ++++ 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/msm/adreno/a3xx_gpu.c b/drivers/gpu/drm/msm/adreno/a3xx_gpu.c index 16fe15d..f4aa815 100644 --- a/drivers/gpu/drm/msm/adreno/a3xx_gpu.c +++ b/drivers/gpu/drm/msm/adreno/a3xx_gpu.c @@ -219,7 +219,7 @@ static int a3xx_hw_init(struct msm_gpu *gpu) /* Load PM4: */ ptr = (uint32_t *)(adreno_gpu->pm4->data); len = adreno_gpu->pm4->size / 4; - DBG("loading PM4 ucode version: %u", ptr[0]); + DBG("loading PM4 ucode version: %x", ptr[1]); gpu_write(gpu, REG_AXXX_CP_DEBUG, AXXX_CP_DEBUG_DYNAMIC_CLK_DISABLE | @@ -231,7 +231,7 @@ static int a3xx_hw_init(struct msm_gpu *gpu) /* Load PFP: */ ptr = (uint32_t *)(adreno_gpu->pfp->data); len = adreno_gpu->pfp->size / 4; - DBG("loading PFP ucode version: %u", ptr[0]); + DBG("loading PFP ucode version: %x", ptr[5]); gpu_write(gpu, REG_A3XX_CP_PFP_UCODE_ADDR, 0); for (i = 1; i < len; i++) @@ -469,7 +469,7 @@ static int a3xx_probe(struct platform_device *pdev) config.slow_rate = 27000000; config.bus_freq = 4; config.rev = ADRENO_REV(3, 2, 1, 0); - } else if (cpu_is_apq8064() || cpu_is_msm8960ab()) { + } else if (cpu_is_apq8064()) { config.fast_rate = 400000000; config.slow_rate = 27000000; config.bus_freq = 4; @@ -482,6 +482,16 @@ static int a3xx_probe(struct platform_device *pdev) else config.rev = ADRENO_REV(3, 2, 0, 0); + } else if (cpu_is_msm8960ab()) { + config.fast_rate = 400000000; + config.slow_rate = 320000000; + config.bus_freq = 4; + + if (SOCINFO_VERSION_MINOR(version) == 0) + config.rev = ADRENO_REV(3, 2, 1, 0); + else + config.rev = ADRENO_REV(3, 2, 1, 1); + } else if (cpu_is_msm8930()) { config.fast_rate = 400000000; config.slow_rate = 27000000; diff --git a/drivers/gpu/drm/msm/hdmi/hdmi.c b/drivers/gpu/drm/msm/hdmi/hdmi.c index 50d11df..32f26f8 100644 --- a/drivers/gpu/drm/msm/hdmi/hdmi.c +++ b/drivers/gpu/drm/msm/hdmi/hdmi.c @@ -122,7 +122,7 @@ int hdmi_init(struct drm_device *dev, struct drm_encoder *encoder) hdmi->mvs = devm_regulator_get(&pdev->dev, "8901_hdmi_mvs"); if (IS_ERR(hdmi->mvs)) - hdmi->mvs = devm_regulator_get(&pdev->dev, "hdmi_mvs"); + hdmi->mvs = devm_regulator_get(&pdev->dev, "8921_hdmi_mvs"); if (IS_ERR(hdmi->mvs)) { ret = PTR_ERR(hdmi->mvs); dev_err(dev->dev, "failed to get mvs regulator: %d\n", ret); @@ -230,7 +230,7 @@ static int hdmi_dev_probe(struct platform_device *pdev) config.ddc_data_gpio = 71; config.hpd_gpio = 72; config.pmic_gpio = 13 + NR_GPIO_IRQS; - } else if (cpu_is_msm8960()) { + } else if (cpu_is_msm8960() || cpu_is_msm8960ab()) { config.phy_init = hdmi_phy_8960_init; config.ddc_clk_gpio = 100; config.ddc_data_gpio = 101; diff --git a/drivers/gpu/drm/msm/mdp4/mdp4_kms.c b/drivers/gpu/drm/msm/mdp4/mdp4_kms.c index bab8cbc..2e2ae16 100644 --- a/drivers/gpu/drm/msm/mdp4/mdp4_kms.c +++ b/drivers/gpu/drm/msm/mdp4/mdp4_kms.c @@ -32,7 +32,9 @@ static int mdp4_hw_init(struct msm_kms *kms) pm_runtime_get_sync(dev->dev); + mdp4_enable(mdp4_kms); version = mdp4_read(mdp4_kms, REG_MDP4_VERSION); + mdp4_disable(mdp4_kms); major = FIELD(version, MDP4_VERSION_MAJOR); minor = FIELD(version, MDP4_VERSION_MINOR); @@ -328,9 +330,11 @@ struct msm_kms *mdp4_kms_init(struct drm_device *dev) * have left things on, in which case we'll start getting faults if * we don't disable): */ + mdp4_enable(mdp4_kms); mdp4_write(mdp4_kms, REG_MDP4_DTV_ENABLE, 0); mdp4_write(mdp4_kms, REG_MDP4_LCDC_ENABLE, 0); mdp4_write(mdp4_kms, REG_MDP4_DSI_ENABLE, 0); + mdp4_disable(mdp4_kms); mdelay(16); if (config->iommu) {