Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp2484096ybi; Mon, 1 Jul 2019 12:47:26 -0700 (PDT) X-Google-Smtp-Source: APXvYqz3pbLJKbNToKJlz+8QomXkMwFuidzOcD++C3LyCREK0NSHnTc1QcXihb/s8zZAvT7KjqkZ X-Received: by 2002:a63:360d:: with SMTP id d13mr17238948pga.80.1562010446605; Mon, 01 Jul 2019 12:47:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562010446; cv=none; d=google.com; s=arc-20160816; b=QaMgeGa+V6Hivjt7Pn7Sbwgd/FPoDg9xqdyG045KQKpy7T2aaYV6P8MjeD4UinpsGY FNj8r5XlUD2uJaBdPiQVUJ9+vcv/rP8Ng7hwotOs6c4If+IOUWVzZ+vpKHK1GFK/VQ4V 2LVNV9FNkYY88L63eviZNoBXDUoBmkzO8/vFIbqzd+THCKTkmF7er3RLqmGVu+HdTQdH c2pbLW2ls60pHerC1AmZCWx/XOP/ypaK6dNsDHpVgfLKR43ORRcLMWVu1/FJMJ6xyF9j qgVtCPljt4NiMyiZvuoIPhuno5rbDV5X2wVwuxuZ7l0vdVzqUVouXuYFhcYSdO8NrT6O uNFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=wYt+ewXSszrhV0/c2X8NnRDiNI3d5oiddfdOVtTGEv4=; b=BbSdGfO7WZPAayfnIW8gMq7vTyeIgJEoElDA7Or6iiDAFUEOHpSnkZsWRhnY+ILqav rcFSK3I9jQvX/LlHe+PA1WsQOpIZW5nSf6RxG2QED1MUIiI90KWhrkG1uDJNukTAgQMs oHyACCKau0GcGas8QgpnKjUZ4Jg3zsjxUAhTzy63oncOGL9SPvNFAKXKIe9t7c9aD01Q eY9X8iAqEcWeC8z5WtLORibvs5tZa7FoK2v/biT16w8/x7nOCY7NpaAoz3VuckNrILeG 18dqQKUby97KrEsGVo8zWUgD+PGiXsoJmnP9aKNzDPasNULFTJJzaJ5/NLEfW7M0t+Io +TYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=OTEwuu7v; 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=pass (p=NONE sp=QUARANTINE 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 d18si10441401pll.238.2019.07.01.12.47.11; Mon, 01 Jul 2019 12:47:26 -0700 (PDT) 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=pass header.i=@gmail.com header.s=20161025 header.b=OTEwuu7v; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726678AbfGATpz (ORCPT + 99 others); Mon, 1 Jul 2019 15:45:55 -0400 Received: from mail-ed1-f67.google.com ([209.85.208.67]:45774 "EHLO mail-ed1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726586AbfGATpz (ORCPT ); Mon, 1 Jul 2019 15:45:55 -0400 Received: by mail-ed1-f67.google.com with SMTP id a14so24919748edv.12; Mon, 01 Jul 2019 12:45:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=wYt+ewXSszrhV0/c2X8NnRDiNI3d5oiddfdOVtTGEv4=; b=OTEwuu7vihjB71E/nIGCfIEuAUae12z379sL2OcZplfhBCkJ/5py4ReiPBH3cOGMcC wSbZsO2UpnITz4pleUww2L0E48/p3edkgBngqpQNrigk/GfTILqWzT6hblKHq2gFqjpC ZURhOgAcj4++trVqK9lWHNPhdwYVWZIVc3ZHDOq7HXgrBANMYzyJrPYQxwScRoQjD+7K gWJ6JFpAhoAyNe6DFinGjvg4MhF7N/9roWXA8yCzip8uK83RsuZHDqNqrE8RpA0VypzW SuQeAkaoYTjHsKUCBJZi8TL52/sF3AYgrdjQeC9pGl9r8QSYtzyaliB6XgWqblyo0D8y V1Zw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=wYt+ewXSszrhV0/c2X8NnRDiNI3d5oiddfdOVtTGEv4=; b=HBhrflUx//3WH+5J2nmWrYCSJD3VtP2jZaBIsMmLQ/3sU3E2TvnUpM8aufSOoLYuzT hjo3lqzf7n1fAAh1WzsAPa1zfQ+iOS6z3v9HOG82j2Y1IhRpEi7iGl4HHIgz+9GQbwR4 l4+frBEVL9eYUYhvfAtjo3miyq+hBb8ttFOuSFXipCTcAgOiCUfvQ6FV6rxxEIUxdO93 JP4Hh4pXgrN4bFAdc7AnNrKtVa0OYWIHR6CgagF9dK48wbnY/zmKjpzNLQ4QbGXoTo3v TEzUYv8OR7B8dnLIspQn2n6sDGdG2RN8xDYKEWSeLXfGhwdsHwVUbrC45hOfxRwR7w9q dQgw== X-Gm-Message-State: APjAAAUM5b84wUxyf1qgPMMLsWqX2XGeIfgUdfdxDACKTa7fxrFQrmzl bEFlbgCkEApE+Udqe2RQbm7iRU2KGeqbFKIAMIM= X-Received: by 2002:a50:8bfd:: with SMTP id n58mr31055135edn.272.1562010353531; Mon, 01 Jul 2019 12:45:53 -0700 (PDT) MIME-Version: 1.0 References: <20190701173907.15494-1-jeffrey.l.hugo@gmail.com> In-Reply-To: <20190701173907.15494-1-jeffrey.l.hugo@gmail.com> From: Rob Clark Date: Mon, 1 Jul 2019 12:45:38 -0700 Message-ID: Subject: Re: [PATCH] drm/msm/mdp5: Use drm_device for creating gem address space To: Jeffrey Hugo Cc: Sean Paul , David Airlie , Daniel Vetter , Bjorn Andersson , linux-arm-msm , dri-devel , freedreno , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 1, 2019 at 10:39 AM Jeffrey Hugo wrote: > > 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"); hmm, do you have a tree somewhere with your dt files? This makes me think the display iommu is hooked up somewhere differently compared to, say, msm8916.dtsi BR, -R > if (IS_ERR(aspace)) { > ret = PTR_ERR(aspace); > -- > 2.17.1 >