From patchwork Mon Dec 17 01:47:59 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Martin Peres X-Patchwork-Id: 1885741 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork1.kernel.org (Postfix) with ESMTP id 263A53FCD5 for ; Mon, 17 Dec 2012 01:55:43 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A9491E6073 for ; Sun, 16 Dec 2012 17:55:42 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org X-Greylist: delayed 399 seconds by postgrey-1.32 at gabe; Sun, 16 Dec 2012 17:55:29 PST Received: from ensi-bourges.fr (mail.ensi-bourges.fr [195.221.38.25]) by gabe.freedesktop.org (Postfix) with ESMTP id DAD6BE5C48 for ; Sun, 16 Dec 2012 17:55:29 -0800 (PST) Received: (qmail 5121 invoked from network); 17 Dec 2012 01:45:46 -0000 Received: from unknown (HELO cathaou.dartybox.com) (Authenticated?user?:martin.peres@[89.159.199.232]) (envelope-sender ) by mail.ensi-bourges.fr (qmail-ldap-1.03) with AES256-SHA encrypted SMTP for ; 17 Dec 2012 01:45:46 -0000 From: martin.peres@free.fr To: dri-devel@lists.freedesktop.org Subject: [PATCH 1/4] drm: Fix DRM_MINOR limits for control and render nodes Date: Mon, 17 Dec 2012 02:47:59 +0100 Message-Id: <1355708882-10814-1-git-send-email-martin.peres@free.fr> X-Mailer: git-send-email 1.8.0.2 In-Reply-To: <50CE7868.4040205@free.fr> References: <50CE7868.4040205@free.fr> MIME-Version: 1.0 Cc: Martin Peres X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org From: Kristian Høgsberg 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. v2: fix a off-by-one overlap as suggested by ihadzic@research.bell-labs.com Signed-off-by: Martin Peres --- 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 c236fd2..b56e977 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 + 63; } else if (type == DRM_MINOR_RENDER) { base += 128; - limit = base + 255; + limit = base + 63; } again: