From patchwork Mon Oct 7 11:25:53 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: 175325 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp4143496ill; Mon, 7 Oct 2019 04:26:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqxi5QCgTAckn1ZXBpgKUEPjl2NP9aKc8w01EnDkS8nHAmNXhc0sy48wjAhXDFz6QnsdpWla X-Received: by 2002:a62:5a85:: with SMTP id o127mr33339138pfb.212.1570447579394; Mon, 07 Oct 2019 04:26:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570447579; cv=none; d=google.com; s=arc-20160816; b=cfFeRIlX4ggmJfXx8IbiPIZel2V76ryCpVxObGOHRihNfXmXbXBIqcSLDdIu5k7jwy 6GmqQm/I1j4LAaVBfvZ2HsOj7YE0QmSg3s79mkCiBicLJVgiluteRMlxkbfK0DqxfXZl mfqOiv/KY6XQFapdvb9XuG+3lD/3juOO531QNs6CARdGhpFYKGKTqSXFIaoY9fL71H1o vlgIxnEHP7EN8DdVh2XO6+9Q6RXMMxQuAz16g1bxc5+ok31itKAUQkNQEmQPTJ7rAJMa eg5V8nLx/t2op9D+h5k7fFU1XybuuRdKZ9io2mIPr1s+o3McTVFY5HXaBmpmaKFrGJqo H1kQ== 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=NucwM2FILWLZwbb9OaIqxUZPc4VAv22BPMwZxCCKKS8=; b=YBMtQWVJQilzlaTvh4kJqUbyAa/bWqnbWA9TPCFQL2lc51gy8R2m68oT8d9Vhqu9lS +YYaBWPh0zDnt39FSDSZPAsPOwP3hzO5WUw74G3e8KSnHB5XwuqB7POW/BZ5lcdDu11a THL8Mu6EMHZDyNem0EmykqDJXqWPgDsi2ZSzVgKu0+mFiqHyrajW4PpV3e9yY1Ess1DA DroYS81pLw1naeYnjXDRLlc1y+OKGXMcVBsONPEFJn6TETWoNwxCua+g/hgVW709Z+ED Lqp95Ug/fiSFy2/+uA3AA5DPCeRJPU2ZPg0/n8+lHQ+uLRla2C+HqUBYKUdagowqyC60 PWBg== 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 l17si8327900pgt.540.2019.10.07.04.26.19 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 07 Oct 2019 04:26:19 -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 AB8B16E570; Mon, 7 Oct 2019 11:26:13 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) by gabe.freedesktop.org (Postfix) with ESMTPS id 162A26E55C for ; Mon, 7 Oct 2019 11:26:10 +0000 (UTC) Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id x97BQ8GM012430; Mon, 7 Oct 2019 06:26:08 -0500 Received: from DLEE112.ent.ti.com (dlee112.ent.ti.com [157.170.170.23]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x97BQ83u124991 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 7 Oct 2019 06:26:08 -0500 Received: from DLEE113.ent.ti.com (157.170.170.24) by DLEE112.ent.ti.com (157.170.170.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Mon, 7 Oct 2019 06:26:05 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE113.ent.ti.com (157.170.170.24) 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, 7 Oct 2019 06:26:05 -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 x97BQ7x8112537; Mon, 7 Oct 2019 06:26:07 -0500 From: Jean-Jacques Hiblot To: , , Subject: [PATCH v3 6/8] drm/omap: cleanup OMAP_BO_SCANOUT use Date: Mon, 7 Oct 2019 13:25:53 +0200 Message-ID: <20191007112555.25278-7-jjhiblot@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191007112555.25278-1-jjhiblot@ti.com> References: <20191007112555.25278-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=1570447568; bh=CbuNmEnB2erZcSKsNRA3W8NuhRVjnNwkokITxNfB2pE=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=uc0+Wdm5t5Pg/vz4t9p6ULRCA5pRQ/TSj0nQePXnS6uiaZL6OKTs+Fl0cVK3q50o8 Cyjy188eePKKT+cboHEukDwVpaU7LCR7Rb3fW9AlNYiKo1PKRS73JvvFdeTSeoC/hx Um68OnyeTVMZlPFwBlPZaCom6ouKQdyRzbCBzePI= 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 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)) {