dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] small OCD cleanups
@ 2014-11-26  1:33 Rob Clark
  2014-11-26  1:33 ` [PATCH 1/2] drm: fix indentation Rob Clark
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Rob Clark @ 2014-11-26  1:33 UTC (permalink / raw)
  To: dri-devel

A couple small OCD cleanups I noticed, which my other work-in-progress
propertification/atomic-ioctl patches are on top of.  No dependency on
any atomic stuff, so might as well hit 'send'.

Rob Clark (2):
  drm: fix indentation
  drm: use mode_object_find helpers

 drivers/gpu/drm/drm_crtc.c | 13 ++++---------
 include/drm/drmP.h         |  2 +-
 2 files changed, 5 insertions(+), 10 deletions(-)

-- 
1.9.3

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/2] drm: fix indentation
  2014-11-26  1:33 [PATCH 0/2] small OCD cleanups Rob Clark
@ 2014-11-26  1:33 ` Rob Clark
  2014-11-26  1:33 ` [PATCH 2/2] drm: use mode_object_find helpers Rob Clark
  2014-11-26  7:31 ` [PATCH 0/2] small OCD cleanups Daniel Vetter
  2 siblings, 0 replies; 4+ messages in thread
From: Rob Clark @ 2014-11-26  1:33 UTC (permalink / raw)
  To: dri-devel

Signed-off-by: Rob Clark <robdclark@gmail.com>
---
 include/drm/drmP.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index be776fb..8ba35c6 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -809,7 +809,7 @@ struct drm_device {
 	struct drm_local_map *agp_buffer_map;
 	unsigned int agp_buffer_token;
 
-        struct drm_mode_config mode_config;	/**< Current mode config */
+	struct drm_mode_config mode_config;	/**< Current mode config */
 
 	/** \name GEM information */
 	/*@{ */
-- 
1.9.3

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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] drm: use mode_object_find helpers
  2014-11-26  1:33 [PATCH 0/2] small OCD cleanups Rob Clark
  2014-11-26  1:33 ` [PATCH 1/2] drm: fix indentation Rob Clark
@ 2014-11-26  1:33 ` Rob Clark
  2014-11-26  7:31 ` [PATCH 0/2] small OCD cleanups Daniel Vetter
  2 siblings, 0 replies; 4+ messages in thread
From: Rob Clark @ 2014-11-26  1:33 UTC (permalink / raw)
  To: dri-devel

Signed-off-by: Rob Clark <robdclark@gmail.com>
---
 drivers/gpu/drm/drm_crtc.c | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
index 589a921..9972cc8 100644
--- a/drivers/gpu/drm/drm_crtc.c
+++ b/drivers/gpu/drm/drm_crtc.c
@@ -2392,7 +2392,6 @@ int drm_mode_setplane(struct drm_device *dev, void *data,
 		      struct drm_file *file_priv)
 {
 	struct drm_mode_set_plane *plane_req = data;
-	struct drm_mode_object *obj;
 	struct drm_plane *plane;
 	struct drm_crtc *crtc = NULL;
 	struct drm_framebuffer *fb = NULL;
@@ -2415,14 +2414,12 @@ int drm_mode_setplane(struct drm_device *dev, void *data,
 	 * First, find the plane, crtc, and fb objects.  If not available,
 	 * we don't bother to call the driver.
 	 */
-	obj = drm_mode_object_find(dev, plane_req->plane_id,
-				   DRM_MODE_OBJECT_PLANE);
-	if (!obj) {
+	plane = drm_plane_find(dev, plane_req->plane_id);
+	if (!plane) {
 		DRM_DEBUG_KMS("Unknown plane ID %d\n",
 			      plane_req->plane_id);
 		return -ENOENT;
 	}
-	plane = obj_to_plane(obj);
 
 	if (plane_req->fb_id) {
 		fb = drm_framebuffer_lookup(dev, plane_req->fb_id);
@@ -2432,14 +2429,12 @@ int drm_mode_setplane(struct drm_device *dev, void *data,
 			return -ENOENT;
 		}
 
-		obj = drm_mode_object_find(dev, plane_req->crtc_id,
-					   DRM_MODE_OBJECT_CRTC);
-		if (!obj) {
+		crtc = drm_crtc_find(dev, plane_req->crtc_id);
+		if (!crtc) {
 			DRM_DEBUG_KMS("Unknown crtc ID %d\n",
 				      plane_req->crtc_id);
 			return -ENOENT;
 		}
-		crtc = obj_to_crtc(obj);
 	}
 
 	/*
-- 
1.9.3

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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 0/2] small OCD cleanups
  2014-11-26  1:33 [PATCH 0/2] small OCD cleanups Rob Clark
  2014-11-26  1:33 ` [PATCH 1/2] drm: fix indentation Rob Clark
  2014-11-26  1:33 ` [PATCH 2/2] drm: use mode_object_find helpers Rob Clark
@ 2014-11-26  7:31 ` Daniel Vetter
  2 siblings, 0 replies; 4+ messages in thread
From: Daniel Vetter @ 2014-11-26  7:31 UTC (permalink / raw)
  To: Rob Clark; +Cc: dri-devel

On Tue, Nov 25, 2014 at 08:33:09PM -0500, Rob Clark wrote:
> A couple small OCD cleanups I noticed, which my other work-in-progress
> propertification/atomic-ioctl patches are on top of.  No dependency on
> any atomic stuff, so might as well hit 'send'.

Both merged into my fixup pile, thanks.
-Daniel

> 
> Rob Clark (2):
>   drm: fix indentation
>   drm: use mode_object_find helpers
> 
>  drivers/gpu/drm/drm_crtc.c | 13 ++++---------
>  include/drm/drmP.h         |  2 +-
>  2 files changed, 5 insertions(+), 10 deletions(-)
> 
> -- 
> 1.9.3
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-11-26  7:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-26  1:33 [PATCH 0/2] small OCD cleanups Rob Clark
2014-11-26  1:33 ` [PATCH 1/2] drm: fix indentation Rob Clark
2014-11-26  1:33 ` [PATCH 2/2] drm: use mode_object_find helpers Rob Clark
2014-11-26  7:31 ` [PATCH 0/2] small OCD cleanups Daniel Vetter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox