[PATCH 1/3] drm: Fix DRM_MINOR limits for control and render nodes

Kristian Høgsberg krh at bitplanet.net
Fri Sep 28 09:35:57 PDT 2012


We got the minor number base right, but limit is too big and causes the
minor numer ranges for the control and render nodes to overlap.

Signed-off-by: Kristian Høgsberg <krh at bitplanet.net>
---
 drivers/gpu/drm/drm_stub.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/drm_stub.c b/drivers/gpu/drm/drm_stub.c
index 21bcd4a..d6d5160 100644
--- a/drivers/gpu/drm/drm_stub.c
+++ b/drivers/gpu/drm/drm_stub.c
@@ -107,10 +107,10 @@ static int drm_minor_get_id(struct drm_device *dev, int type)
 
 	if (type == DRM_MINOR_CONTROL) {
                 base += 64;
-                limit = base + 127;
+                limit = base + 64;
         } else if (type == DRM_MINOR_RENDER) {
                 base += 128;
-                limit = base + 255;
+                limit = base + 64;
         }
 
 again:
-- 
1.7.10.2



More information about the dri-devel mailing list