From patchwork Thu Oct 10 11:59:58 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: 175776 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp2181730ill; Thu, 10 Oct 2019 05:00:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqzXdD9uPXXy3J1pP61O+jBpCX+A7fZPT7B9MfI1APC/F9oyAYZVElSE5pvOBnZckPNWqTOO X-Received: by 2002:a17:902:6acb:: with SMTP id i11mr8772807plt.273.1570708824934; Thu, 10 Oct 2019 05:00:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570708824; cv=none; d=google.com; s=arc-20160816; b=xQpn+mDwE358/NXuYr0RjkT9P5+B8XdUAkZY9adC59+2uy5byubhW/PdyZnMted8M4 N6sXFJROOGdu6RMo1PwVVKQ9TCzNdiiHRE807uBZn+RLp4V0M4dcslXM9CFq5+pDhrDW fhzvFcnodAW9WcaVwQdTpemAJXJNBoW0qReVizRKCJ5WrhUf0/CZH/zgMAMtdHTcuulr ttG5S96M+LwjOX5NxFOBcjo0YNxfLHtiTbelepEninVdmQ6BaB/+fKeAsW6pRPCjjMlE 3v35c843gYR3cCGC+UXZKADmAYv+ov6K/CA8Vb0UlAfpFOl+FQB3bLQsFzIeTaUNA3l/ X8bA== 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=Uno8w35FnwFjAAWqWtcRMV0auUG/TUfnImT+tXNes6o=; b=exzetoL9/9jNofkLijg2dYkCniYXD0MXqw1Dbxo4HDvo6DFeYlPby4mA3ftTD2R8Oq 5hTXdKhf5UqHnfRACsGySv5c7UqXCr+/54BjxWobJXah4Cln1jS4voGYkUFlV9FzBOEQ OXkvxQpcw4fWj5kMgbDxvf/xi0ydXO5uQEuw5TZf4lX32CsttzRxC4Y3g7xjtzQ5nMuG HEdtphdcylvnv+dPEZpXilbD6FWppIonQgD8vKPT081jRga1nkxzBt7cWS1+nqeyZcbh i7aZv+yCoeLoge4jz691b1qHjZjO8T9hjqQl7n6so/0Oyk/u/UE0g4o5w+5qkFvz75Nm YD2g== 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 131.252.210.177 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. [131.252.210.177]) by mx.google.com with ESMTPS id h27si3660125pgm.481.2019.10.10.05.00.24 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 10 Oct 2019 05:00:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 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 7017F893E8; Thu, 10 Oct 2019 12:00:21 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) by gabe.freedesktop.org (Postfix) with ESMTPS id C4ECD6EB21 for ; Thu, 10 Oct 2019 12:00:18 +0000 (UTC) Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id x9AC0E20043506; Thu, 10 Oct 2019 07:00:14 -0500 Received: from DFLE103.ent.ti.com (dfle103.ent.ti.com [10.64.6.24]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x9AC0Eia029493 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 10 Oct 2019 07:00:14 -0500 Received: from DFLE109.ent.ti.com (10.64.6.30) by DFLE103.ent.ti.com (10.64.6.24) 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 07:00:14 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE109.ent.ti.com (10.64.6.30) 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 07:00:10 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id x9AC0DMT121821; Thu, 10 Oct 2019 07:00:14 -0500 From: Jean-Jacques Hiblot To: , , Subject: [PATCH v5 6/8] drm/omap: cleanup OMAP_BO_SCANOUT use Date: Thu, 10 Oct 2019 13:59:58 +0200 Message-ID: <20191010120000.1421-7-jjhiblot@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191010120000.1421-1-jjhiblot@ti.com> References: <20191010120000.1421-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=1570708814; bh=WO7S52qVjOi/md3ys9yvPOEVZOSvBlURQm/5m1MTQPg=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=duHllezZz41eIOIGAyDjySC+OV8vVcUsgn/glW5Zfyu9V+e0NVSEPO3niXzc9sVYu qOjDtCjg0wEuCAamXjbnuDqLbMLTsrCOr4UZ0vNgb7mhgrSLlt3pdBv9QGcpHwn1Do KSBRUcvI3cia/pit05hWCSj+JfvnWEL5YhJfJw98= 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: jjhiblot@ti.com, 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 4e8fcfdff3a0..27e0a2f8508a 100644 --- a/drivers/gpu/drm/omapdrm/omap_gem.c +++ b/drivers/gpu/drm/omapdrm/omap_gem.c @@ -1155,7 +1155,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; /* @@ -1166,9 +1165,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)) {