From patchwork Wed Nov 14 22:24:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Marek X-Patchwork-Id: 10683659 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 2B26813B5 for ; Thu, 15 Nov 2018 08:14:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1D91B2C342 for ; Thu, 15 Nov 2018 08:14:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 122722C35E; Thu, 15 Nov 2018 08:14:05 +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,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 CD4C12C342 for ; Thu, 15 Nov 2018 08:14:04 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A44296E5EC; Thu, 15 Nov 2018 08:13:46 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qk1-x741.google.com (mail-qk1-x741.google.com [IPv6:2607:f8b0:4864:20::741]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2C6E36E585 for ; Wed, 14 Nov 2018 22:27:40 +0000 (UTC) Received: by mail-qk1-x741.google.com with SMTP id d135so28775007qkc.12 for ; Wed, 14 Nov 2018 14:27:40 -0800 (PST) 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:in-reply-to :references; bh=ku7VxA8FM86Lma6NsAxIOdj6TL4xUq0CE5op1FFIL2A=; b=VeSYEK03cqpXnT0VaoHO9NgwiOm6dQOmVlCZHjZXWKIXp5SSHB+82KEhS8arhi0k74 7kyLQsPHkRvQSa8T0Zx5jSTdbo++Fon6+JehqVCLBMuzhacx23jrGRS+pG2UQQc7LeFj Se3MPOxjqdzR/bcZBSG23SG+pgyUTxZtCHAlk1VTdqc4UVbfAt2h7Rb3jTRstYxMaSGW wzdPf6rlD70cUXJSgkn/MyfU+gmzBcbd6jwVOs4exY9G1m+0Kg31ngMY0HAd6XNn3/wE WdPpNCUPyAZVY36b+t05GKrq19i+P/VT3gUPKNZw2kxTINVgq7QlK6bk4S4zvp57/Xz5 MERw== X-Gm-Message-State: AGRZ1gL+Frhre4ZYfnw2Oy6sadbL02KVSzJ05Sx/zDrAG0S48EHUfONX 2LZCz4PAwCLTQDNguxHJ8h+kjg== X-Google-Smtp-Source: AJdET5cDIMBh+0P2Ef6R3pYpaRq45vsTwRqsBsc5J/Tff14rT8XZnetqjqTHp7kf5dNd4SnaMjjIXg== X-Received: by 2002:a0c:981b:: with SMTP id c27mr3949195qvd.184.1542234459427; Wed, 14 Nov 2018 14:27:39 -0800 (PST) Received: from localhost.localdomain (modemcable014.247-57-74.mc.videotron.ca. [74.57.247.14]) by smtp.gmail.com with ESMTPSA id 24sm24067595qkp.65.2018.11.14.14.27.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Nov 2018 14:27:38 -0800 (PST) From: Jonathan Marek To: freedreno@lists.freedesktop.org Subject: [PATCH 4/9] drm/msm: use contiguous vram for MSM_BO_SCANOUT when possible Date: Wed, 14 Nov 2018 17:24:11 -0500 Message-Id: <20181114222418.15960-4-jonathan@marek.ca> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181114222418.15960-1-jonathan@marek.ca> References: <20181114222418.15960-1-jonathan@marek.ca> X-Mailman-Approved-At: Thu, 15 Nov 2018 08:13:45 +0000 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: David Airlie , "open list:DRM DRIVER FOR MSM ADRENO GPU" , open list , "open list:DRM DRIVER FOR MSM ADRENO GPU" MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Makes it possible to have MMU for GPU but not display. Signed-off-by: Jonathan Marek --- drivers/gpu/drm/msm/msm_gem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/msm_gem.c b/drivers/gpu/drm/msm/msm_gem.c index d97f6ecb0531..6657453a3a58 100644 --- a/drivers/gpu/drm/msm/msm_gem.c +++ b/drivers/gpu/drm/msm/msm_gem.c @@ -914,7 +914,7 @@ static struct drm_gem_object *_msm_gem_new(struct drm_device *dev, if (!iommu_present(&platform_bus_type)) use_vram = true; - else if ((flags & MSM_BO_STOLEN) && priv->vram.size) + else if ((flags & (MSM_BO_STOLEN | MSM_BO_SCANOUT)) && priv->vram.size) use_vram = true; printk("_msm_gem_new %u bytes use_vram=%u\n", size, use_vram);