From patchwork Wed Jul 3 15:55:34 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: 168459 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp1913092ilk; Thu, 4 Jul 2019 00:26:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqxDO066Al86nJV1n/+yKsARvAAyVjTVrQpP5I6LbG3+h38Hop+2RzxrQ1QSB2GsBmNw15Qk X-Received: by 2002:a17:902:145:: with SMTP id 63mr2365318plb.55.1562225219808; Thu, 04 Jul 2019 00:26:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562225219; cv=none; d=google.com; s=arc-20160816; b=0k28LGvvfCP4P2xc7H/fPi1HLVLlJxbZ3aUICVh+GSluwNM3Aw8qWzCCdrbUQplVHA DyBzdxdMVZJbojLnHbLR+JzuEIO8pm/j4gmtRk/kfF09nE7p+rSipiCBU/7xaNKPO6vB ySCDYKCIIVFHUoLVUMssQD4j/0nEBfsazMpz9xmYgSipmGCSGcErLZIIIfuz/gpyjkbz 0otyccJ0bQcavWHRKNMmPikCvRDRiLQ7pLcNn6gxjCA5+tLLJd29bfAIfzH4hE013l65 vFR4HTKhVj+a5CEtN0fXIP/8TPKNAgF72dI62gzr3lFK51ccOgVoSUqCoEkdakGeEpu8 3/mw== 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=xQyQQ+zT78T4zTZuaPio8lLVny8n5pOY39necmc700I=; b=Vm3cvqQBtreJZkAfLyi/7NAKn/l0cNChOCZ0vol923Xe+KhBWza6RdAk8sOPjUeqUg NFfZsjMlmGnRxPx8MqIV2YKJq87+T5B3gLDRIJ2baIgvEN1XgBCcFLq5/ueReXNJ6UBO XniFhlkdKncVXbBuy0oKKox5cW9MpZ0jGllVALAZx2YMEPPWW5FkkUDBM0Tj/9iiY+wL SdB1p0J5FEdiT7jnhJWCH+PTGsFU9+2+/2aq5T+D8X90aFGiQZLhm2O87SSBoL4z2zJC GFQq7OKQy2jnuvlBZKIWDbaV/Se/4TrLLKPS2sn9rqd8T8jYz9T/w6OXYkh53Qm3eI67 jAlg== 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 u141si4908630pgb.317.2019.07.04.00.26.59 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 04 Jul 2019 00:26:59 -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 95D516E2C7; Thu, 4 Jul 2019 07:25:57 +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 7B8936E170 for ; Wed, 3 Jul 2019 15:55:50 +0000 (UTC) Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id x63FtnSY059912; Wed, 3 Jul 2019 10:55:49 -0500 Received: from DFLE108.ent.ti.com (dfle108.ent.ti.com [10.64.6.29]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x63FtnS1099253 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 3 Jul 2019 10:55:49 -0500 Received: from DFLE110.ent.ti.com (10.64.6.31) by DFLE108.ent.ti.com (10.64.6.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Wed, 3 Jul 2019 10:55:49 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DFLE110.ent.ti.com (10.64.6.31) 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; Wed, 3 Jul 2019 10:55:49 -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 x63Ftmfh070173; Wed, 3 Jul 2019 10:55:48 -0500 From: Jean-Jacques Hiblot To: , , , Subject: [PATCH 6/8] drm/omap: cleanup OMAP_BO_SCANOUT use Date: Wed, 3 Jul 2019 17:55:34 +0200 Message-ID: <20190703155536.28339-7-jjhiblot@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190703155536.28339-1-jjhiblot@ti.com> References: <20190703155536.28339-1-jjhiblot@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Mailman-Approved-At: Thu, 04 Jul 2019 07:25:13 +0000 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1562169349; bh=7UwLPsTaqTpgEG43Nf3PGzeENx2dY3tR3yya2Cm0naI=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=D5Ap1g8AkIuLLtwXoXjBdRcSGtFBLR9H3FfIKnuxpXmHUTZa25V4VNOBr/yxc4aH9 NpsvaxArF7nnKYFbFznDVh9pddJp4s8nSUT4MnJPORee8o6LOjx9OeKfGLS+WyKfO2 eHElgSKvNG1N7JVno+S9+ISZJymAoI+Vw8pmFqq4= 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 f6a4d1a70bf6..539eec05b1c2 100644 --- a/drivers/gpu/drm/omapdrm/omap_gem.c +++ b/drivers/gpu/drm/omapdrm/omap_gem.c @@ -1152,7 +1152,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; /* @@ -1163,9 +1162,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)) {