Received: by 10.223.176.5 with SMTP id f5csp805630wra; Sat, 3 Feb 2018 10:41:51 -0800 (PST) X-Google-Smtp-Source: AH8x227fNLMejG7SyTZjuZwkL2thQAHm42ILNJ0423AunOp8fpx9pB/4hDQeFQ5YdmfEVbJBoxRA X-Received: by 10.101.81.197 with SMTP id i5mr34817324pgq.220.1517683311411; Sat, 03 Feb 2018 10:41:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517683311; cv=none; d=google.com; s=arc-20160816; b=JPulwzFf5ueGrfl+tp718naX7CYv7Z+GMD+DPrgUNIjNkB9VxkU7Yqx0ipnTfJ8Sod 9+/JVBj5jKAjju8CBf3DusaCGRUJ1JtFs6zg5WsaY013lRVBmwoXEtan/xUQioNjI91m MNGEB/shx5nuMGXtpyKwET69Ut1fiLIsGyqELOSZdBZCpt6OV9QqjD03i9j+keVbCjwV 96WrWCnF4y1uUSqJFUx+Zu+LqZth8l4/0T2ilS5i7XH/+aEA17qQruCQRHEuReM8AQzf +pMC7R8HW4KaQ10v9oc/d/IQlPKeq+yjXSIWfhT98oTOgwssS5JqKbSlUmfrHMnSsDlV fJ8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:message-id:date:subject:cc:from :dkim-signature:arc-authentication-results; bh=sXJMbdrfUhKOVrmvPcju2BUpk4yMoWY+f7u3pB3GC84=; b=p/jZQsuUZm9lmbYO8Njq2tgr5WRkxtJr+Drvixe6IvO/iSTL9YpigPz1TJSXTr98AK RccFAioxVmVjaLAvljvKiq/Cb6x2+Rqm6XHWx5JCSk1Obowx6xSgr89t2uLhjoyJqRO5 wzwpkn10IsNk83zDSFD+No9HukV/JEF0jmDHBEh8gT/gN4DMi0HVmpDxdGcSIosg8PXm LimkLIDYnLK3ATOi0HD2P071Cuxq4cFeBNstn4jgRQ6I1egtD4HDv7VKFr+aOxTUoCNP /aKcvsFpFpUQTzjkOMa2Dbqk3y8PNezfHSPnEOp8st3QvZW9pUQDIUE1OkUeGgew/0JU TVZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=biwo8XYJ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l19si1622330pgc.166.2018.02.03.10.41.37; Sat, 03 Feb 2018 10:41:51 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=biwo8XYJ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754984AbeBCSkO (ORCPT + 99 others); Sat, 3 Feb 2018 13:40:14 -0500 Received: from mail-qt0-f195.google.com ([209.85.216.195]:41260 "EHLO mail-qt0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752948AbeBCSio (ORCPT ); Sat, 3 Feb 2018 13:38:44 -0500 Received: by mail-qt0-f195.google.com with SMTP id r13so1510658qtm.8; Sat, 03 Feb 2018 10:38:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=sXJMbdrfUhKOVrmvPcju2BUpk4yMoWY+f7u3pB3GC84=; b=biwo8XYJBDu5pHg/DeQFKPHiYZBYLQ/4A79z08X18qjgmN90WAezv53ouJeuwTXvFc jAq5VQEtlegATJWDus+pOlmq6xvPTg7HRiaWNKUR3EKfApH1mYMgJhXdfxWk9Z+hiEU6 CLowRs83WnOe0g1OX19LGcfvHWVnhd1oKSG6m2NTniFl555MlMbvPIS8yrRZTRAhtoMA uBLwZLCENQWt0B1Bx2Uq+Fs4ErDCFOhmk5KbH6IcbUeoH6/U1fSEeR/X2mw5ThqE2wB1 yzyp+0oQVT1/HBOHOlstnCqsoegsdOjbCu7pBEc1DZP0B2rS/Chr9vKL4ONYiGkMr2SY 7yoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=sXJMbdrfUhKOVrmvPcju2BUpk4yMoWY+f7u3pB3GC84=; b=SwwEAZB3CPg0K97DErXhFZtlms7YYn2Uu3cjnAtZsJ7ZY5vzJXf+as7VoOjpXK+9/Q b8My/Vv5n0VP1bVmWWV3Trhah+IvlM967ZtnVn0aTHsdimmqqnECZXjZCex1mxCijwev EvXI7tXBWkdaZo2XkRlwV/bicFv2r1wdehBTHayxQvHlQAq7y9Vydm4irPDw7FA+jqTl 3onHe4dndj1SajMmESPhl4aodrrZtgYZD8ie+2tPor+PLn+blJ7/i0mHQLzKW6fG0H2d z5jEFr96/yOah0CHBrA6waNLHhKU1vzsqcYE3Um6qA3LD1hK56z0VndTS+L6my1iMq4R ZxXw== X-Gm-Message-State: AKwxyte2N8pCvxV1vJM87pOg+TR9dk+mnf8y+K+qLolF9fW4Nc5p6Q7j lsV72PV+iVDzaAfbU0kJaQ== X-Received: by 10.200.40.165 with SMTP id i34mr68072695qti.176.1517683123294; Sat, 03 Feb 2018 10:38:43 -0800 (PST) Received: from localhost.localdomain (host86-147-130-186.range86-147.btcentralplus.com. [86.147.130.186]) by smtp.googlemail.com with ESMTPSA id p4sm3234093qkc.33.2018.02.03.10.38.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 03 Feb 2018 10:38:42 -0800 (PST) From: Craig Tatlor Cc: ctatlor97@gmail.com, Rob Clark , David Airlie , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH] drm/msm: Call msm_init_vram before binding the gpu Date: Sat, 3 Feb 2018 18:38:26 +0000 Message-Id: <20180203183826.25760-1-ctatlor97@gmail.com> X-Mailer: git-send-email 2.15.1 To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org vram.size is needed when binding a gpu without an iommu and is defined in msm_init_vram(), so run that before binding it. Signed-off-by: Craig Tatlor --- drivers/gpu/drm/msm/msm_drv.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c index bdf0fe754f7b..82d4126ca017 100644 --- a/drivers/gpu/drm/msm/msm_drv.c +++ b/drivers/gpu/drm/msm/msm_drv.c @@ -400,6 +400,14 @@ static int msm_drm_init(struct device *dev, struct drm_driver *drv) drm_mode_config_init(ddev); + ret = msm_init_vram(ddev); + if (ret) { + msm_mdss_destroy(ddev); + kfree(priv); + drm_dev_unref(ddev); + return ret; + } + /* Bind all our sub-components: */ ret = component_bind_all(dev, ddev); if (ret) { @@ -409,10 +417,6 @@ static int msm_drm_init(struct device *dev, struct drm_driver *drv) return ret; } - ret = msm_init_vram(ddev); - if (ret) - goto fail; - msm_gem_shrinker_init(ddev); switch (get_mdp_ver(pdev)) { -- 2.15.1