dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: ville.syrjala@linux.intel.com
To: intel-gfx@lists.freedesktop.org
Cc: Sagar Kamble <sagar.a.kamble@intel.com>, dri-devel@lists.freedesktop.org
Subject: [PATCH 1/5] drm: Pass name to drm_rotation_property_create()
Date: Wed, 12 Feb 2014 23:15:00 +0200	[thread overview]
Message-ID: <1392239704-21776-2-git-send-email-ville.syrjala@linux.intel.com> (raw)
In-Reply-To: <1392239704-21776-1-git-send-email-ville.syrjala@linux.intel.com>

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Allow rotation properties to have custom names.

TODO: maybe squash into "drm: Add drm_mode_create_rotation_property()"

Cc: Sagar Kamble <sagar.a.kamble@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/drm_crtc.c           | 3 ++-
 drivers/gpu/drm/i915/intel_display.c | 2 +-
 drivers/gpu/drm/i915/intel_sprite.c  | 2 +-
 drivers/gpu/drm/omapdrm/omap_plane.c | 2 +-
 include/drm/drm_crtc.h               | 1 +
 5 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
index fe04889..7077676 100644
--- a/drivers/gpu/drm/drm_crtc.c
+++ b/drivers/gpu/drm/drm_crtc.c
@@ -4179,6 +4179,7 @@ void drm_mode_config_cleanup(struct drm_device *dev)
 EXPORT_SYMBOL(drm_mode_config_cleanup);
 
 struct drm_property *drm_mode_create_rotation_property(struct drm_device *dev,
+						       const char *name,
 						       unsigned int supported_rotations)
 {
 	static const struct drm_prop_enum_list props[] = {
@@ -4190,7 +4191,7 @@ struct drm_property *drm_mode_create_rotation_property(struct drm_device *dev,
 		{ DRM_REFLECT_Y,  "reflect-y" },
 	};
 
-	return drm_property_create_bitmask(dev, 0, "rotation",
+	return drm_property_create_bitmask(dev, 0, name,
 					   props, ARRAY_SIZE(props),
 					   supported_rotations);
 }
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 050b249..bab17fd 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -10401,7 +10401,7 @@ static void intel_crtc_init(struct drm_device *dev, int pipe)
 	if (INTEL_INFO(dev)->gen >= 4) {
 		if (!dev_priv->rotation_property)
 			dev_priv->rotation_property =
-				drm_mode_create_rotation_property(dev,
+				drm_mode_create_rotation_property(dev, "rotation",
 								BIT(DRM_ROTATE_0) |
 								BIT(DRM_ROTATE_180));
 		if (dev_priv->rotation_property)
diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c
index 7dcce4e..2936007 100644
--- a/drivers/gpu/drm/i915/intel_sprite.c
+++ b/drivers/gpu/drm/i915/intel_sprite.c
@@ -1216,7 +1216,7 @@ intel_plane_init(struct drm_device *dev, enum pipe pipe, int plane)
 
 	if (!dev_priv->rotation_property)
 		dev_priv->rotation_property =
-			drm_mode_create_rotation_property(dev,
+			drm_mode_create_rotation_property(dev, "rotation",
 							  BIT(DRM_ROTATE_0) |
 							  BIT(DRM_ROTATE_180));
 
diff --git a/drivers/gpu/drm/omapdrm/omap_plane.c b/drivers/gpu/drm/omapdrm/omap_plane.c
index e4a3fd1..72b9dc7 100644
--- a/drivers/gpu/drm/omapdrm/omap_plane.c
+++ b/drivers/gpu/drm/omapdrm/omap_plane.c
@@ -300,7 +300,7 @@ void omap_plane_install_properties(struct drm_plane *plane,
 	if (priv->has_dmm) {
 		prop = priv->rotation_prop;
 		if (!prop) {
-			prop = drm_mode_create_rotation_property(dev,
+			prop = drm_mode_create_rotation_property(dev, "rotation",
 					BIT(DRM_ROTATE_0) | BIT(DRM_ROTATE_90) |
 					BIT(DRM_ROTATE_180) | BIT(DRM_ROTATE_270) |
 					BIT(DRM_REFLECT_X) | BIT(DRM_REFLECT_Y));
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
index e1c0aba..ee84a4a 100644
--- a/include/drm/drm_crtc.h
+++ b/include/drm/drm_crtc.h
@@ -1185,6 +1185,7 @@ extern int drm_format_horz_chroma_subsampling(uint32_t format);
 extern int drm_format_vert_chroma_subsampling(uint32_t format);
 extern const char *drm_get_format_name(uint32_t format);
 extern struct drm_property *drm_mode_create_rotation_property(struct drm_device *dev,
+							      const char *name,
 							      unsigned int supported_rotations);
 extern unsigned int drm_rotation_simplify(unsigned int rotation,
 					  unsigned int supported_rotations);
-- 
1.8.3.2

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

  reply	other threads:[~2014-02-12 21:15 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-12 21:14 [PATCH 0/5] drm/i915: Full pipe rotation & rotation property name bikeshedding ville.syrjala
2014-02-12 21:15 ` ville.syrjala [this message]
2014-02-13 10:42   ` [PATCH 1/5] drm: Pass name to drm_rotation_property_create() Sagar Arun Kamble
2014-02-12 21:15 ` [PATCH 2/5] drm/i915: Rename primary plane rotation property to "plane-rotation" ville.syrjala
2014-02-13 12:37   ` Sagar Arun Kamble
2014-02-13 13:46     ` Ville Syrjälä
2014-02-13 14:06       ` Ville Syrjälä
2014-02-13 14:20         ` [Intel-gfx] " Chris Wilson
2014-02-13 14:40           ` Ville Syrjälä
2014-02-12 21:15 ` [PATCH 3/5] drm: Add drm_rotation_chain() ville.syrjala
2014-02-12 21:15 ` [PATCH 4/5] drm/i915: Add rotation support for the cursor plane ville.syrjala
2014-02-14 11:01   ` Sagar Arun Kamble
2014-02-14 11:39     ` Ville Syrjälä
2014-02-17 17:23       ` Sagar Arun Kamble
2014-02-17 17:51         ` Ville Syrjälä
2014-02-18  7:49           ` Sagar Arun Kamble
2014-02-18  9:23             ` Ville Syrjälä
2014-02-18 10:09               ` Sagar Arun Kamble
2014-02-12 21:15 ` [PATCH 5/5] drm/i915: Add full pipe rotation ville.syrjala
2014-02-19 10:25   ` Sagar Arun Kamble
2014-02-12 23:17 ` [PATCH 0/5] drm/i915: Full pipe rotation & rotation property name bikeshedding Chris Wilson
2014-02-13  8:51   ` Ville Syrjälä
2014-02-13 11:20 ` Chris Wilson
2014-02-13 11:58   ` Ville Syrjälä

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=1392239704-21776-2-git-send-email-ville.syrjala@linux.intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=sagar.a.kamble@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox