From patchwork Mon Jul 8 10:45:18 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: 168611 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp6983058ilk; Mon, 8 Jul 2019 03:45:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqwkRS/4knEUiO+TMh4WP0PFHiR0blrHeupXB03WL7jLxNgVsi6r+x5crpfV429eT7Dm4QnU X-Received: by 2002:a65:5b8e:: with SMTP id i14mr22338503pgr.188.1562582742714; Mon, 08 Jul 2019 03:45:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562582742; cv=none; d=google.com; s=arc-20160816; b=R1EVbbOzjC0uUr5gR91s707mnyHbDJq6UOqJcRcd7e4tHpdB3HDRGCgAr3QWO5m/xU cXnBOFRa0zSJ6HLYr0KKE0oSLW/H58TKtB8AaVjNsqJkIZzVMTKmo+MjcLKPi+OY+CzF YOqRTJhSdZm5f+sCuJyWETKHj/+WMhmTC+Pu/Srd5s7webfDp9PS2OB4vt9iMLPj7ZdY NODaFQbLSZfOZHVVUqfSrbQgCHTy5saOWBK79k3F7DFaG5TAbmaz1xR4ux5a6drvKl69 iPIZey53pI+j1TbUkaxlrgdkr+fH4Dhstac/3lzV8yoSAtjq2dt9+wvV5zoC1WGShPfP SLYA== 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=hgU/NstP7VOFvoeAy12hsSmFpDbRa4eTawTTL48dplk=; b=Jm2u3rd3vP6YTySpMkVu0bswX2VM5nnE8VQyHbPHeOBNFUg4bsozvS0eP7Xue2UtkJ hX/9tYCvg5S5uZ8Bvp1FyP9c0bmcF10h2aoqbh7/6Lp9Qs8/kPZYm03wG4PF2V5syEnE CWmzkGmJA6npqxOOKqqksK+gjTwMSeEJtFJxcUpxZSfAXVO9RZpihpA81Jqdx/kBb7uk 8hQLS7+iHx8mc2iA2RbNxKs+aqN5byDv2K3RrEbzRIY4qUjVDkVtMPLZlUHsC97HRlym rXj+VRxhSerogEyQwUzEhZYhXzVvjNTyOoLZZikhLdO/AeSR+TqHVz9WuAR6KJPmH0Jr 1KtA== 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 k11si18077783pgb.427.2019.07.08.03.45.42 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 08 Jul 2019 03:45:42 -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 EB99289C82; Mon, 8 Jul 2019 10:45:39 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4D02D89C6E for ; Mon, 8 Jul 2019 10:45:36 +0000 (UTC) Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id x68AjYHQ005789; Mon, 8 Jul 2019 05:45:34 -0500 Received: from DLEE104.ent.ti.com (dlee104.ent.ti.com [157.170.170.34]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x68AjYQ1089707 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 8 Jul 2019 05:45:34 -0500 Received: from DLEE102.ent.ti.com (157.170.170.32) by DLEE104.ent.ti.com (157.170.170.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Mon, 8 Jul 2019 05:45:34 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE102.ent.ti.com (157.170.170.32) 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; Mon, 8 Jul 2019 05:45:34 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id x68AjXYV069997; Mon, 8 Jul 2019 05:45:34 -0500 From: Jean-Jacques Hiblot To: , , , Subject: [PATCH v2 6/8] drm/omap: cleanup OMAP_BO_SCANOUT use Date: Mon, 8 Jul 2019 12:45:18 +0200 Message-ID: <20190708104520.24217-7-jjhiblot@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190708104520.24217-1-jjhiblot@ti.com> References: <20190708104520.24217-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=1562582734; bh=SKYZVWcWwJ5ZLLgc5LOACp4zuj8TdGUjmf+/iSNIXL4=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=MgWtCpiGe0Ff1JBev6hWBr3jXgSH++mvGhP4zZbUf8pLNFMiYcFvvrNBBRxblGWVP X+IIfvaTdUOoJ/VPqpkq7zoCzsDt9RaevKzwpEEUyy6MxLH35iHvOmxmZ57j1qk078 AZMfgiyTy11ykYZ3z0dmEYzNaoyiSBKaCMaBY73Y= 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 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 --- 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)) {