From patchwork Thu Apr 19 23:46:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeykumar Sankaran X-Patchwork-Id: 10351697 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 8E6B060244 for ; Thu, 19 Apr 2018 23:46:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 869B22855D for ; Thu, 19 Apr 2018 23:46:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7B02028581; Thu, 19 Apr 2018 23:46:11 +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.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,T_DKIM_INVALID 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 1DA602855D for ; Thu, 19 Apr 2018 23:46:10 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0359A6E0B9; Thu, 19 Apr 2018 23:46:09 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from smtp.codeaurora.org (smtp.codeaurora.org [198.145.29.96]) by gabe.freedesktop.org (Postfix) with ESMTPS id CC8C46E0B9; Thu, 19 Apr 2018 23:46:08 +0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 69B7660A4E; Thu, 19 Apr 2018 23:46:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1524181568; bh=EhIQ1/ripBJhyZTxmoneVrONP5WLKYveTrc7v79EMrw=; h=From:To:Cc:Subject:Date:From; b=Y/szWLeIZt2KBgRK63re6bgTJQ/bI+fQ3NH6zCMeVVRV9eSRTn4RB0aZU5tlKt/LU A07Lik0OYabRJksn+x2FKArGXVfbYHTzh5VEb8xX93F27T5mpCyot9NUngLFaGxV2d EkDXKijV/jvYAURJ0VbyegRYmwk7eyHgENPHZvPI= Received: from jeykumar-linux.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: jsanka@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 8F84F601E6; Thu, 19 Apr 2018 23:46:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1524181567; bh=EhIQ1/ripBJhyZTxmoneVrONP5WLKYveTrc7v79EMrw=; h=From:To:Cc:Subject:Date:From; b=YLJKfct8wci4FAk1jHZQJPPcZo7c/TV385QTo0PrpHjPnGz09bJW5fV/9LVPVJasJ lYOjd5QnIeGGCK4q169wq4d4P4cn54AT/gqndU/0Bps7KjyV5VZ9UNpjjmwyEGiOyC Pj5mLNvRxpvoq7Vx1CdeKuwhn3qIGJrv8wDgOHxM= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 8F84F601E6 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=jsanka@codeaurora.org From: Jeykumar Sankaran To: dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-arm-msm@vger.kernel.org Subject: [DPU PATCH] drm/msm: populate aspace in msm_kms Date: Thu, 19 Apr 2018 16:46:02 -0700 Message-Id: <1524181562-7654-1-git-send-email-jsanka@codeaurora.org> X-Mailer: git-send-email 1.9.1 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: hoegsberg@google.com MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP display drivers may need to access aspace to allocate internal buffers (e.g. DSI to allocate cmd buffer) This change populates the needed info. Signed-off-by: Jeykumar Sankaran --- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c index 2c187e9..f6fea21 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c @@ -1835,8 +1835,6 @@ static int _dpu_kms_mmu_init(struct dpu_kms *dpu_kms) goto fail; } - dpu_kms->aspace[0] = aspace; - ret = aspace->mmu->funcs->attach(aspace->mmu, (const char **)iommu_ports, ARRAY_SIZE(iommu_ports)); @@ -1845,7 +1843,9 @@ static int _dpu_kms_mmu_init(struct dpu_kms *dpu_kms) msm_gem_address_space_put(aspace); goto fail; } + aspace->domain_attached = true; + dpu_kms->aspace[0] = aspace; #endif return 0; fail: @@ -2004,6 +2004,9 @@ static int dpu_kms_hw_init(struct msm_kms *kms) goto power_error; } + if (dpu_kms->aspace[0]) + kms->aspace = dpu_kms->aspace[0]; + #ifdef CONFIG_CHROME_REGDMA /* Initialize reg dma block which is a singleton */ rc = dpu_reg_dma_init(dpu_kms->reg_dma, dpu_kms->catalog,