dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Clark <robdclark@gmail.com>
To: dri-devel@lists.freedesktop.org
Subject: [PATCH 07/11] drm: small property creation cleanup
Date: Thu, 18 Dec 2014 16:01:52 -0500	[thread overview]
Message-ID: <1418936516-10754-8-git-send-email-robdclark@gmail.com> (raw)
In-Reply-To: <1418936516-10754-1-git-send-email-robdclark@gmail.com>

Getting ready to add a lot more standard properties for atomic.

Signed-off-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 drivers/gpu/drm/drm_crtc.c | 27 +++++++++++++++++----------
 1 file changed, 17 insertions(+), 10 deletions(-)

diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
index 859dddf..6aae35a 100644
--- a/drivers/gpu/drm/drm_crtc.c
+++ b/drivers/gpu/drm/drm_crtc.c
@@ -1325,33 +1325,40 @@ EXPORT_SYMBOL(drm_plane_force_disable);
 
 static int drm_mode_create_standard_connector_properties(struct drm_device *dev)
 {
-	struct drm_property *edid;
-	struct drm_property *dpms;
-	struct drm_property *dev_path;
+	struct drm_property *prop;
 
 	/*
 	 * Standard properties (apply to all connectors)
 	 */
-	edid = drm_property_create(dev, DRM_MODE_PROP_BLOB |
+	prop = drm_property_create(dev, DRM_MODE_PROP_BLOB |
 				   DRM_MODE_PROP_IMMUTABLE,
 				   "EDID", 0);
-	dev->mode_config.edid_property = edid;
+	if (!prop)
+		return -ENOMEM;
+	dev->mode_config.edid_property = prop;
 
-	dpms = drm_property_create_enum(dev, 0,
+	prop = drm_property_create_enum(dev, 0,
 				   "DPMS", drm_dpms_enum_list,
 				   ARRAY_SIZE(drm_dpms_enum_list));
-	dev->mode_config.dpms_property = dpms;
+	if (!prop)
+		return -ENOMEM;
+	dev->mode_config.dpms_property = prop;
 
-	dev_path = drm_property_create(dev,
+	prop = drm_property_create(dev,
 				       DRM_MODE_PROP_BLOB |
 				       DRM_MODE_PROP_IMMUTABLE,
 				       "PATH", 0);
-	dev->mode_config.path_property = dev_path;
+	if (!prop)
+		return -ENOMEM;
+	dev->mode_config.path_property = prop;
 
-	dev->mode_config.tile_property = drm_property_create(dev,
+	prop = drm_property_create(dev,
 							     DRM_MODE_PROP_BLOB |
 							     DRM_MODE_PROP_IMMUTABLE,
 							     "TILE", 0);
+	if (!prop)
+		return -ENOMEM;
+	dev->mode_config.tile_property = prop;
 
 	return 0;
 }
-- 
2.1.0

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

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

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-18 21:01 [PATCH 00/11] Atomic Properties (v2) Rob Clark
2014-12-18 21:01 ` [PATCH 01/11] drm: add atomic_set_property wrappers Rob Clark
2014-12-18 21:01 ` [PATCH 02/11] drm: add atomic_get_property Rob Clark
2014-12-18 21:01 ` [PATCH 03/11] drm: tweak getconnector locking Rob Clark
2014-12-18 21:01 ` [PATCH 04/11] drm: refactor getproperties/getconnector Rob Clark
2014-12-18 21:01 ` [PATCH 05/11] drm: add atomic properties Rob Clark
2014-12-18 21:01 ` [PATCH 06/11] drm/atomic: atomic_check functions Rob Clark
2014-12-18 21:01 ` Rob Clark [this message]
2014-12-18 21:01 ` [PATCH 08/11] drm/atomic: atomic plane properties Rob Clark
2014-12-18 21:01 ` [PATCH 09/11] drm/atomic: atomic connector properties Rob Clark
2014-12-18 21:01 ` [PATCH 10/11] drm/msm: atomic property support Rob Clark
2014-12-18 21:01 ` [PATCH 11/11] drm: Atomic modeset ioctl Rob Clark
2014-12-18 22:01   ` [PATCH] drm/atomic: Hide drm.ko internal interfaces 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=1418936516-10754-8-git-send-email-robdclark@gmail.com \
    --to=robdclark@gmail.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