All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: dri-devel@lists.freedesktop.org
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Subject: [PATCH 07/15] drm: omapdrm: gem: Remove omap_drm_private has_dmm field
Date: Sat,  5 Dec 2015 00:27:11 +0200	[thread overview]
Message-ID: <1449268039-24682-8-git-send-email-laurent.pinchart@ideasonboard.com> (raw)
In-Reply-To: <1449268039-24682-1-git-send-email-laurent.pinchart@ideasonboard.com>

The field is set to true iff the usergart field is not NULL. Test
usergart instead.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 drivers/gpu/drm/omapdrm/omap_drv.c   | 2 +-
 drivers/gpu/drm/omapdrm/omap_drv.h   | 1 -
 drivers/gpu/drm/omapdrm/omap_fbdev.c | 2 +-
 drivers/gpu/drm/omapdrm/omap_gem.c   | 5 ++---
 drivers/gpu/drm/omapdrm/omap_plane.c | 2 +-
 5 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/omapdrm/omap_drv.c b/drivers/gpu/drm/omapdrm/omap_drv.c
index 69be482e8d47..83d63d71062c 100644
--- a/drivers/gpu/drm/omapdrm/omap_drv.c
+++ b/drivers/gpu/drm/omapdrm/omap_drv.c
@@ -303,7 +303,7 @@ static int omap_modeset_init_properties(struct drm_device *dev)
 {
 	struct omap_drm_private *priv = dev->dev_private;
 
-	if (priv->has_dmm) {
+	if (priv->usergart) {
 		dev->mode_config.rotation_property =
 			drm_mode_create_rotation_property(dev,
 				BIT(DRM_ROTATE_0) | BIT(DRM_ROTATE_90) |
diff --git a/drivers/gpu/drm/omapdrm/omap_drv.h b/drivers/gpu/drm/omapdrm/omap_drv.h
index 718f032aa052..97fcb892fdd7 100644
--- a/drivers/gpu/drm/omapdrm/omap_drv.h
+++ b/drivers/gpu/drm/omapdrm/omap_drv.h
@@ -100,7 +100,6 @@ struct omap_drm_private {
 	struct list_head obj_list;
 
 	struct omap_drm_usergart *usergart;
-	bool has_dmm;
 
 	/* properties: */
 	struct drm_property *zorder_prop;
diff --git a/drivers/gpu/drm/omapdrm/omap_fbdev.c b/drivers/gpu/drm/omapdrm/omap_fbdev.c
index db4aa35accfc..9fb15de1207f 100644
--- a/drivers/gpu/drm/omapdrm/omap_fbdev.c
+++ b/drivers/gpu/drm/omapdrm/omap_fbdev.c
@@ -132,7 +132,7 @@ static int omap_fbdev_create(struct drm_fb_helper *helper,
 			mode_cmd.width * ((sizes->surface_bpp + 7) / 8),
 			mode_cmd.width, sizes->surface_bpp);
 
-	fbdev->ywrap_enabled = priv->has_dmm && ywrap_enabled;
+	fbdev->ywrap_enabled = priv->usergart && ywrap_enabled;
 	if (fbdev->ywrap_enabled) {
 		/* need to align pitch to page size if using DMM scrolling */
 		mode_cmd.pitches[0] = PAGE_ALIGN(mode_cmd.pitches[0]);
diff --git a/drivers/gpu/drm/omapdrm/omap_gem.c b/drivers/gpu/drm/omapdrm/omap_gem.c
index 391bc7378f9f..8e3b415aa43b 100644
--- a/drivers/gpu/drm/omapdrm/omap_gem.c
+++ b/drivers/gpu/drm/omapdrm/omap_gem.c
@@ -787,7 +787,7 @@ int omap_gem_get_paddr(struct drm_gem_object *obj,
 
 	mutex_lock(&obj->dev->struct_mutex);
 
-	if (remap && is_shmem(obj) && priv->has_dmm) {
+	if (remap && is_shmem(obj) && priv->usergart) {
 		if (omap_obj->paddr_cnt == 0) {
 			struct page **pages;
 			uint32_t npages = obj->size >> PAGE_SHIFT;
@@ -1393,7 +1393,7 @@ struct drm_gem_object *omap_gem_new(struct drm_device *dev,
 
 	obj = &omap_obj->base;
 
-	if ((flags & OMAP_BO_SCANOUT) && !priv->has_dmm) {
+	if ((flags & OMAP_BO_SCANOUT) && !priv->usergart) {
 		/* attempt to allocate contiguous memory if we don't
 		 * have DMM for remappign discontiguous buffers
 		 */
@@ -1521,7 +1521,6 @@ void omap_gem_init(struct drm_device *dev)
 	}
 
 	priv->usergart = usergart;
-	priv->has_dmm = true;
 }
 
 void omap_gem_deinit(struct drm_device *dev)
diff --git a/drivers/gpu/drm/omapdrm/omap_plane.c b/drivers/gpu/drm/omapdrm/omap_plane.c
index 11d406b160e1..1c6ec7080f16 100644
--- a/drivers/gpu/drm/omapdrm/omap_plane.c
+++ b/drivers/gpu/drm/omapdrm/omap_plane.c
@@ -208,7 +208,7 @@ void omap_plane_install_properties(struct drm_plane *plane,
 	struct drm_device *dev = plane->dev;
 	struct omap_drm_private *priv = dev->dev_private;
 
-	if (priv->has_dmm) {
+	if (priv->usergart) {
 		struct drm_property *prop = dev->mode_config.rotation_property;
 
 		drm_object_attach_property(obj, prop, 0);
-- 
2.4.10

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

  parent reply	other threads:[~2015-12-04 22:27 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-04 22:27 [PATCH 00/15] omapdrm: Implement dma_buf import Laurent Pinchart
2015-12-04 22:27 ` [PATCH 01/15] drm: omapdrm: Fix plane state free in plane reset handler Laurent Pinchart
2015-12-09 12:43   ` Tomi Valkeinen
2015-12-13 20:39     ` Laurent Pinchart
2015-12-14  7:59       ` Tomi Valkeinen
2015-12-04 22:27 ` [PATCH 02/15] drm: omapdrm: Make fbdev emulation optional Laurent Pinchart
2015-12-04 22:27 ` [PATCH 03/15] drm: omapdrm: gem: Remove unused function prototypes Laurent Pinchart
2015-12-04 22:27 ` [PATCH 04/15] drm: omapdrm: gem: Remove forward declarations Laurent Pinchart
2015-12-04 22:27 ` [PATCH 05/15] drm: omapdrm: gem: Group functions by purpose Laurent Pinchart
2015-12-04 22:27 ` [PATCH 06/15] drm: omapdrm: gem: Move global usergart variable to omap_drm_private Laurent Pinchart
2015-12-04 22:27 ` Laurent Pinchart [this message]
2015-12-04 22:27 ` [PATCH 08/15] drm: omapdrm: gem: Mask out private flags passed from userspace Laurent Pinchart
2015-12-07 14:13   ` Emil Velikov
2015-12-14 20:33     ` Laurent Pinchart
2015-12-16 17:33       ` Emil Velikov
2015-12-16 23:27         ` Rob Clark
2015-12-04 22:27 ` [PATCH 09/15] drm: omapdrm: gem: Clean up GEM objects memory flags Laurent Pinchart
2015-12-04 22:27 ` [PATCH 10/15] drm: omapdrm: gem: Free the correct memory object Laurent Pinchart
2015-12-14 11:45   ` Tomi Valkeinen
2015-12-14 19:52     ` Laurent Pinchart
2015-12-04 22:27 ` [PATCH 11/15] drm: omapdrm: gem: Don't free mmap offset twice Laurent Pinchart
2015-12-04 22:27 ` [PATCH 12/15] drm: omapdrm: gem: Simplify error handling when creating GEM object Laurent Pinchart
2015-12-04 22:27 ` [PATCH 13/15] drm: omapdrm: gem: Remove check for impossible condition Laurent Pinchart
2015-12-04 22:27 ` [PATCH 14/15] drm: omapdrm: gem: Refactor GEM object allocation Laurent Pinchart
2015-12-04 22:27 ` [PATCH 15/15] drm: omapdrm: gem: Implement dma_buf import Laurent Pinchart
2015-12-05 15:40   ` Daniel Vetter
2015-12-05 22:24     ` Laurent Pinchart

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=1449268039-24682-8-git-send-email-laurent.pinchart@ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=dri-devel@lists.freedesktop.org \
    --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.