All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jean-Jacques Hiblot <jjhiblot@ti.com>
To: tomi.valkeinen@ti.com, airlied@linux.ie, daniel@ffwll.ch
Cc: jsarha@ti.com, dri-devel@lists.freedesktop.org
Subject: [PATCH v3 6/8] drm/omap: cleanup OMAP_BO_SCANOUT use
Date: Mon, 7 Oct 2019 13:25:53 +0200	[thread overview]
Message-ID: <20191007112555.25278-7-jjhiblot@ti.com> (raw)
In-Reply-To: <20191007112555.25278-1-jjhiblot@ti.com>

From: Tomi Valkeinen <tomi.valkeinen@ti.com>

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 <tomi.valkeinen@ti.com>
---
 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)) {
-- 
2.17.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2019-10-07 11:26 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-07 11:25 [PATCH v3 0/8] drm/omap: OMAP_BO flags Jean-Jacques Hiblot
2019-10-07 11:25 ` [PATCH v3 1/8] drm/omap: use refcount API to track the number of users of dma_addr Jean-Jacques Hiblot
2019-10-09 10:38   ` Tomi Valkeinen
2019-10-07 11:25 ` [PATCH v3 2/8] drm/omap: add omap_gem_unpin_locked() Jean-Jacques Hiblot
2019-10-08 15:54   ` [v3,2/8] " Jean-Jacques Hiblot
2019-10-07 11:25 ` [PATCH v3 3/8] drm/omap: accept NULL for dma_addr in omap_gem_pin Jean-Jacques Hiblot
2019-10-08 15:55   ` [v3,3/8] " Jean-Jacques Hiblot
2019-10-07 11:25 ` [PATCH v3 4/8] drm/omap: cleanup OMAP_BO flags Jean-Jacques Hiblot
2019-10-08 15:56   ` [v3,4/8] " Jean-Jacques Hiblot
2019-10-07 11:25 ` [PATCH v3 5/8] drm/omap: remove OMAP_BO_TILED define Jean-Jacques Hiblot
2019-10-08 15:56   ` [v3,5/8] " Jean-Jacques Hiblot
2019-10-07 11:25 ` Jean-Jacques Hiblot [this message]
2019-10-08 15:57   ` [v3,6/8] drm/omap: cleanup OMAP_BO_SCANOUT use Jean-Jacques Hiblot
2019-10-07 11:25 ` [PATCH v3 7/8] drm/omap: add omap_gem_validate_flags() Jean-Jacques Hiblot
2019-10-08 15:58   ` [v3,7/8] " Jean-Jacques Hiblot
2019-10-07 11:25 ` [PATCH v3 8/8] drm/omap: add OMAP_BO flags to affect buffer allocation Jean-Jacques Hiblot
2019-10-08 16:01   ` [v3,8/8] " Jean-Jacques Hiblot
2019-10-07 12:16 ` [PATCH v3 0/8] drm/omap: OMAP_BO flags Tomi Valkeinen
2019-10-08 16:08   ` Jean-Jacques Hiblot
2019-10-09  7:05     ` Tomi Valkeinen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191007112555.25278-7-jjhiblot@ti.com \
    --to=jjhiblot@ti.com \
    --cc=airlied@linux.ie \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jsarha@ti.com \
    --cc=tomi.valkeinen@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.