From patchwork Mon Jul 1 17:39:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeffrey Hugo X-Patchwork-Id: 11026713 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F151C13B1 for ; Mon, 1 Jul 2019 20:58:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E397B26538 for ; Mon, 1 Jul 2019 20:58:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D482A2849B; Mon, 1 Jul 2019 20:58:56 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id CBA5C28306 for ; Mon, 1 Jul 2019 20:58:55 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 02F9E89C68; Mon, 1 Jul 2019 20:58:33 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pl1-x643.google.com (mail-pl1-x643.google.com [IPv6:2607:f8b0:4864:20::643]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4F41889C89; Mon, 1 Jul 2019 17:39:10 +0000 (UTC) Received: by mail-pl1-x643.google.com with SMTP id 9so6945624ple.5; Mon, 01 Jul 2019 10:39:10 -0700 (PDT) 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=DQhkAGsy/6JPfkNxr2zd1jyzBxMaKFsuRKGwZutl7JA=; b=VDGjJs+yntemoI6xeOHSMVcLz9QyAP8a+wiOJju91YtRo4PhpLEZHv7vAEqgLctwJt NYrCVxQSRuKFIf/QIQatsBG36DExp0gre3ry+BXIqtx3b3lC8L5Zh1ftvbD6QGLsSZZT cm63ppnzbl36fS0M9t8+syOmsFQyelo882bA8EAW+JSOe515uiJ2QLpWD4DuOD13PV5p d7AGGLRSvSkOjV+uj+at4DJl6DefZ1nNLJsgPhzVsPEpPD3dZv8IUmNKXHpZI4j+mT8X kpZin9KVTQnXmiut5QUH9NUFEBgEWioBk/sQVTeAxL8+YLb36+HQUucKvPV2dvAHvX/R J8XQ== X-Gm-Message-State: APjAAAVOZ/1aBdDhV+axl5huF6TZcdW/cZwrMjjFvVgE24kNFmBzfeIl mWqK+t4mXVePKfXA9K0GMI2V2eBy X-Google-Smtp-Source: APXvYqwRhIXWsH30plxtznqtrwdmPDUuYj3MEWHr4h3Gg5fNdDluDo1HsfjxDICGKCzzl3XaEDGNjQ== X-Received: by 2002:a17:902:6b0c:: with SMTP id o12mr29372672plk.113.1562002750002; Mon, 01 Jul 2019 10:39:10 -0700 (PDT) Received: from aw-bldr-10.qualcomm.com (i-global254.qualcomm.com. [199.106.103.254]) by smtp.gmail.com with ESMTPSA id j21sm11847091pfh.86.2019.07.01.10.39.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 01 Jul 2019 10:39:09 -0700 (PDT) From: Jeffrey Hugo To: robdclark@gmail.com, sean@poorly.run, airlied@linux.ie, daniel@ffwll.ch Subject: [PATCH] drm/msm/mdp5: Use drm_device for creating gem address space Date: Mon, 1 Jul 2019 10:39:07 -0700 Message-Id: <20190701173907.15494-1-jeffrey.l.hugo@gmail.com> X-Mailer: git-send-email 2.17.1 X-Mailman-Approved-At: Mon, 01 Jul 2019 20:58:29 +0000 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=DQhkAGsy/6JPfkNxr2zd1jyzBxMaKFsuRKGwZutl7JA=; b=vMWOV/3HGgdAF44jQmXJfaAWcFy7psRn6BhV081TbnqYfVHuWi7qeLTNGWMWGbBnNj ihG+iWJVihKUZUp/Njk1DMAR/86Gbx6123S+32Qmd/xMqBNn4TDFHwHHiz/VzVJhfP0m jze3vu1Jr9qht/LfQKtEz7pny3bb0ieCY7cmfTFxMQpxgJe0iC1BaGv6OE9a02LDABlS zQWGTJJNIx0qXNLVOM5AwKg/hRwbD8FDxCoqb76qeha/aK/e9L5HNkqHPsiNjfvNNSiS Y4DWjvViqOvQyJvQo/Wp2uMmH/FcgEurUloeS2OHUDKPItEDb1kt2VPdnoB8i7WXCdwl eqIw== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jeffrey Hugo , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, bjorn.andersson@linaro.org, freedreno@lists.freedesktop.org MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Creating the msm gem address space requires a reference to the dev where the iommu is located. The driver currently assumes this is the same as the platform device, which breaks when the iommu is outside of the platform device. Use the drm_device instead, which happens to always have a reference to the proper device. Signed-off-by: Jeffrey Hugo --- drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c b/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c index 4a60f5fca6b0..1347a5223918 100644 --- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c +++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c @@ -702,7 +702,7 @@ struct msm_kms *mdp5_kms_init(struct drm_device *dev) mdelay(16); if (config->platform.iommu) { - aspace = msm_gem_address_space_create(&pdev->dev, + aspace = msm_gem_address_space_create(dev->dev, config->platform.iommu, "mdp5"); if (IS_ERR(aspace)) { ret = PTR_ERR(aspace);