From patchwork Thu Oct 10 09:34:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Jacques Hiblot X-Patchwork-Id: 175740 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp2030378ill; Thu, 10 Oct 2019 02:35:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqws7uijluQQG/m4yFWylkK0hho/j7Rve1rcbzsrLHLTB9K4Srsu9abgujD07QhTxDJpSU4+ X-Received: by 2002:a62:386:: with SMTP id 128mr9900213pfd.110.1570700128524; Thu, 10 Oct 2019 02:35:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570700128; cv=none; d=google.com; s=arc-20160816; b=fA+kCNPidELKOhLz6SCa49bpnDZtbslTesoZeIWOTx0LmGJr27VUwX0GvD40mAQ3vf X1IUDua+VBAHcC8StC4biWjUdkz+ZKh+yLt2c+6Y+f/+rAfOxyB4xEp1UVGN5/0d+kZm dpOnveGBnSaDGPlnBoVe9ZUKzYGyPH1J6bcBzbpRFjo81gVr8awrRD6JTgDJxpz/ZB4k y5ZxnPolcskKPy/QJcYIsVgIPd8Q5qRbH2eFxhG6P1r0J6rZOVYeVItzoCUvmCiOWTCz vKxq8H7wKXi/KLSuYqg2z/Hu8zgyjQN8NCgFSIfKJoX/pVPcaBQsN4ewxYbnwg1M+v3u AWWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:references:in-reply-to:message-id:date :subject:to:from:delivered-to; bh=9oMtJYlwWy+rQBXUVjKJ7vCzE5IAPHTOgofQu/AW6VY=; b=wFdwSSufjyS2Y2+VHy2fpIgsd2lknfFz69QhfKGtFAvMqZFDmEObF7XLVQqILcWd00 TIii2uM0xC41RJzQQhLqbE6hVTWfQjTuShNGbmUJRCF+g7EnDIGfhp/QpXInDiSJ4GW0 +Bf40A6GuCl6Q8ikSRGLAqJ9QbvVv8IPoEnjrKlsSwyn/h9eK4kvFKDqY0b4L3nSa+MP yoRxmKQtmeOlw/9L4MVBvwlHC1PnZQZT8PwUvcmu4y1REKwDvWo4QZvVky1mwtbdX32J sqIfW9RdoO4Yp+/kyls2k5y0TCkXjRvV5O1PigM5r4TTFnlv/aFJsSXrli882BlEt/JA /JBw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [2610:10:20:722:a800:ff:fe36:1795]) by mx.google.com with ESMTPS id x7si1058269plv.113.2019.10.10.02.35.28 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 10 Oct 2019 02:35:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) client-ip=2610:10:20:722:a800:ff:fe36:1795; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4EBE06EAE6; Thu, 10 Oct 2019 09:35:22 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) by gabe.freedesktop.org (Postfix) with ESMTPS id F2FC16EAE1 for ; Thu, 10 Oct 2019 09:35:16 +0000 (UTC) Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id x9A9ZEgg120192; Thu, 10 Oct 2019 04:35:14 -0500 Received: from DLEE110.ent.ti.com (dlee110.ent.ti.com [157.170.170.21]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTP id x9A9ZEnO078376; Thu, 10 Oct 2019 04:35:14 -0500 Received: from DLEE110.ent.ti.com (157.170.170.21) by DLEE110.ent.ti.com (157.170.170.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Thu, 10 Oct 2019 04:35:14 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DLEE110.ent.ti.com (157.170.170.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Thu, 10 Oct 2019 04:35:14 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id x9A9ZD9Q101119; Thu, 10 Oct 2019 04:35:13 -0500 From: Jean-Jacques Hiblot To: , , Subject: [PATCH v4 6/8] drm/omap: cleanup OMAP_BO_SCANOUT use Date: Thu, 10 Oct 2019 11:34:43 +0200 Message-ID: <20191010093445.11069-7-jjhiblot@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191010093445.11069-1-jjhiblot@ti.com> References: <20191010093445.11069-1-jjhiblot@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1570700114; bh=rT7lgp+iPdYWoFNcHP+SFY8dLqrQJTrJ5/YLc1B0CJ4=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=dS632yV1TMb1G2dlEWwbMwn21ZUHbUNf9OsuLk8Aoe4hTm+3q1d4OpSlZLru87DrQ u9DJSICgE+/tFuZ+nh+whmarXxgqGNWU2Ek6TjJ/7JQX5KEph731m9CEHqnJpO7Ddx KpU3NeeHRJDz/rt8hw1dgZX063ORvGklznqC4RIY= 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: jsarha@ti.com, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Tomi Valkeinen omap_gem_new() has a comment about OMAP_BO_SCANOUT which does not make sense. Also, for the TILER case, we drop OMAP_BO_SCANOUT flag for some reason. It's not clear what the original purpose of OMAP_BO_SCANOUT is, but presuming it means "scanout buffer, something that can be consumed by DSS", this patch cleans up the above issues. Signed-off-by: Tomi Valkeinen Reviewed-by: Jean-Jacques Hiblot --- drivers/gpu/drm/omapdrm/omap_gem.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/omapdrm/omap_gem.c b/drivers/gpu/drm/omapdrm/omap_gem.c index 07dba300ec07..5c4cdf618347 100644 --- a/drivers/gpu/drm/omapdrm/omap_gem.c +++ b/drivers/gpu/drm/omapdrm/omap_gem.c @@ -1153,7 +1153,6 @@ struct drm_gem_object *omap_gem_new(struct drm_device *dev, * Tiled buffers are always shmem paged backed. When they are * scanned out, they are remapped into DMM/TILER. */ - flags &= ~OMAP_BO_SCANOUT; flags |= OMAP_BO_MEM_SHMEM; /* @@ -1164,9 +1163,8 @@ struct drm_gem_object *omap_gem_new(struct drm_device *dev, flags |= tiler_get_cpu_cache_flags(); } else if ((flags & OMAP_BO_SCANOUT) && !priv->has_dmm) { /* - * OMAP_BO_SCANOUT hints that the buffer doesn't need to be - * tiled. However, to lower the pressure on memory allocation, - * use contiguous memory only if no TILER is available. + * If we don't have DMM, we must allocate scanout buffers + * from contiguous DMA memory. */ flags |= OMAP_BO_MEM_DMA_API; } else if (!(flags & OMAP_BO_MEM_DMABUF)) {