From: Matt Roper <matthew.d.roper@intel.com>
To: dri-devel@lists.freedesktop.org
Subject: [PATCHv4 08/13] drm: Add plane type property (v2)
Date: Thu, 27 Mar 2014 17:44:33 -0700 [thread overview]
Message-ID: <1395967478-30549-9-git-send-email-matthew.d.roper@intel.com> (raw)
In-Reply-To: <1395967478-30549-1-git-send-email-matthew.d.roper@intel.com>
Add a plane type property to allow userspace to distinguish plane types.
v2: Driver-specific churn eliminated now that drm_plane_init() and
drm_universal_plane_init() were separated out in a previous patch.
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
---
drivers/gpu/drm/drm_crtc.c | 23 +++++++++++++++++++++++
include/drm/drm_crtc.h | 1 +
2 files changed, 24 insertions(+)
diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
index 42aea88..0c70101 100644
--- a/drivers/gpu/drm/drm_crtc.c
+++ b/drivers/gpu/drm/drm_crtc.c
@@ -121,6 +121,13 @@ static const struct drm_prop_enum_list drm_dpms_enum_list[] =
DRM_ENUM_NAME_FN(drm_get_dpms_name, drm_dpms_enum_list)
+static const struct drm_prop_enum_list drm_plane_type_enum_list[] =
+{
+ { DRM_PLANE_TYPE_OVERLAY, "Overlay" },
+ { DRM_PLANE_TYPE_PRIMARY, "Primary" },
+ { DRM_PLANE_TYPE_CURSOR, "Cursor" },
+};
+
/*
* Optional properties
*/
@@ -1165,6 +1172,21 @@ static int drm_mode_create_standard_connector_properties(struct drm_device *dev)
return 0;
}
+static int drm_mode_create_standard_plane_properties(struct drm_device *dev)
+{
+ struct drm_property *type;
+
+ /*
+ * Standard properties (apply to all planes)
+ */
+ type = drm_property_create_enum(dev, DRM_MODE_PROP_IMMUTABLE,
+ "type", drm_plane_type_enum_list,
+ ARRAY_SIZE(drm_plane_type_enum_list));
+ dev->mode_config.plane_type_property = type;
+
+ return 0;
+}
+
/**
* drm_mode_create_dvi_i_properties - create DVI-I specific connector properties
* @dev: DRM device
@@ -4566,6 +4588,7 @@ void drm_mode_config_init(struct drm_device *dev)
drm_modeset_lock_all(dev);
drm_mode_create_standard_connector_properties(dev);
+ drm_mode_create_standard_plane_properties(dev);
drm_modeset_unlock_all(dev);
/* Just to be sure */
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
index 201d8c2..4c4f792 100644
--- a/include/drm/drm_crtc.h
+++ b/include/drm/drm_crtc.h
@@ -771,6 +771,7 @@ struct drm_mode_config {
struct list_head property_blob_list;
struct drm_property *edid_property;
struct drm_property *dpms_property;
+ struct drm_property *plane_type_property;
/* DVI-I properties */
struct drm_property *dvi_i_subconnector_property;
--
1.8.5.1
next prev parent reply other threads:[~2014-03-28 0:44 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-28 0:44 [PATCHv4 00/13] Universal plane preparation patches Matt Roper
2014-03-28 0:44 ` [PATCHv4 01/13] drm: Add support for multiple plane types (v2) Matt Roper
2014-03-28 0:44 ` [PATCHv4 02/13] drm/exynos: Restrict plane loops to only operate on overlay planes (v2) Matt Roper
2014-03-28 0:44 ` [PATCHv4 03/13] drm/i915: " Matt Roper
2014-03-28 0:44 ` [PATCHv4 04/13] drm/shmobile: Restrict plane loops to only operate on legacy planes Matt Roper
2014-03-28 15:50 ` Laurent Pinchart
2014-03-28 17:52 ` Daniel Vetter
2014-03-28 17:53 ` Daniel Vetter
2014-04-01 15:27 ` Laurent Pinchart
2014-04-01 21:43 ` Daniel Vetter
2014-03-28 0:44 ` [PATCHv4 05/13] drm: Make drm_crtc_check_viewport non-static Matt Roper
2014-03-28 0:44 ` [PATCHv4 06/13] drm: Add primary plane helpers (v2) Matt Roper
2014-03-28 8:32 ` Daniel Vetter
2014-03-28 15:48 ` Laurent Pinchart
2014-03-28 17:54 ` Daniel Vetter
2014-04-01 15:25 ` Laurent Pinchart
2014-04-01 1:03 ` Matt Roper
2014-04-01 7:45 ` Daniel Vetter
2014-04-01 11:45 ` Rob Clark
2014-04-01 12:33 ` Daniel Vetter
2014-04-01 19:46 ` Dave Airlie
2014-04-01 21:47 ` Daniel Vetter
2014-04-01 1:04 ` Rob Clark
2014-03-28 0:44 ` [PATCHv4 07/13] drm: Add drm_universal_plane_init() Matt Roper
2014-03-28 0:44 ` Matt Roper [this message]
2014-03-28 0:44 ` [PATCHv4 09/13] drm: Add plane max width/height properties Matt Roper
2014-03-28 8:21 ` Daniel Vetter
2014-03-28 0:44 ` [PATCHv4 10/13] drm: Add drm_crtc_init_with_planes() Matt Roper
2014-03-28 9:11 ` Daniel Vetter
2014-03-28 17:56 ` Daniel Vetter
2014-03-28 0:44 ` [PATCHv4 11/13] drm/msm: Switch to universal plane API's Matt Roper
2014-03-28 0:44 ` [PATCHv4 12/13] drm: Replace crtc fb with primary plane fb (v3) Matt Roper
2014-03-28 8:40 ` Daniel Vetter
2014-03-28 0:44 ` [PATCHv4 13/13] drm: Remove unused drm_crtc->fb Matt Roper
2014-03-28 8:15 ` [Intel-gfx] [PATCHv4 00/13] Universal plane preparation patches Daniel Vetter
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=1395967478-30549-9-git-send-email-matthew.d.roper@intel.com \
--to=matthew.d.roper@intel.com \
--cc=dri-devel@lists.freedesktop.org \
/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