From patchwork Thu Mar 24 11:06:28 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Airlie X-Patchwork-Id: 658521 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p2OB6ddw017235 for ; Thu, 24 Mar 2011 11:06:59 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B361B9F017 for ; Thu, 24 Mar 2011 04:06:38 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-vx0-f177.google.com (mail-vx0-f177.google.com [209.85.220.177]) by gabe.freedesktop.org (Postfix) with ESMTP id 22CED9EFD4 for ; Thu, 24 Mar 2011 04:06:29 -0700 (PDT) Received: by vxd2 with SMTP id 2so7731810vxd.36 for ; Thu, 24 Mar 2011 04:06:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=PMgRgNc0qqdvVF55y4MXkVQuZCrdI8jfQOaj/sR0kIQ=; b=OAdcYegNRNvNvCpdPbXd/Lk6lFmSHHNlpXIv4fCQlY2yvLIX7o6q0OGl8J6ZP1fp3n PVI105oVm0oYypXleI+KG8Q6mqn9crivCT+NRNgSok1qfIucbi7J3p6fj957/UZpaYgJ WJRsbrkXzmT0EHOpQXsjbjGvSI+rIER+iQ3K0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=QAS6vaXalLTvrsvjCv8/DGsbywB/7GuCpSSk3swQMKIQyqFgzawFH/kOvRIx6qBI25 LgOSOtbfoOqRydMIzhCbFJRYtjc7nFGAxsaqR825KddOl/XSfqZUUsxBTu60+afZNz9P QLI3X0wBCZRNhowhZLKY0vmU78KQUDILKBrNE= MIME-Version: 1.0 Received: by 10.52.18.74 with SMTP id u10mr7275884vdd.216.1300964788349; Thu, 24 Mar 2011 04:06:28 -0700 (PDT) Received: by 10.220.125.23 with HTTP; Thu, 24 Mar 2011 04:06:28 -0700 (PDT) In-Reply-To: <1300880747.16522.13.camel@thor.local> References: <1300864998.3522.71.camel@thor.local> <1300868532.3522.81.camel@thor.local> <1300880747.16522.13.camel@thor.local> Date: Thu, 24 Mar 2011 21:06:28 +1000 Message-ID: Subject: Re: [git pull] drm fixes From: Dave Airlie To: =?ISO-8859-1?Q?Michel_D=E4nzer?= Cc: torvalds@linux-foundation.org, linux-kernel@vger.kernel.org, DRI mailing list X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.11 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 X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 24 Mar 2011 11:06:59 +0000 (UTC) From 2fbd71354b13f31c6a408b6eedcefd4ee8d1d3fa Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Thu, 24 Mar 2011 20:54:35 +1000 Subject: [PATCH] drm/vblank: update recently added vbl interface to be more future proof. This makes the interface a bit cleaner by leaving a single gap in the vblank bit space instead of creating two gaps. Suggestions from Michel on mailing list/irc. Signed-off-by: Dave Airlie --- drivers/gpu/drm/drm_ioctl.c | 2 +- include/drm/drm.h | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm/drm_ioctl.c index 3617b4c..904d7e9 100644 --- a/drivers/gpu/drm/drm_ioctl.c +++ b/drivers/gpu/drm/drm_ioctl.c @@ -280,7 +280,7 @@ int drm_getcap(struct drm_device *dev, void *data, struct drm_file *file_priv) if (dev->driver->dumb_create) req->value = 1; break; - case DRM_CAP_HIGH_CRTC: + case DRM_CAP_VBLANK_HIGH_CRTC: req->value = 1; break; default: diff --git a/include/drm/drm.h b/include/drm/drm.h index 99cd074..4be33b4 100644 --- a/include/drm/drm.h +++ b/include/drm/drm.h @@ -463,14 +463,15 @@ struct drm_irq_busid { enum drm_vblank_seq_type { _DRM_VBLANK_ABSOLUTE = 0x0, /**< Wait for specific vblank sequence number */ _DRM_VBLANK_RELATIVE = 0x1, /**< Wait for given number of vblanks */ + /* bits 1-6 are reserved for high crtcs */ + _DRM_VBLANK_HIGH_CRTC_MASK = 0x0000003e, _DRM_VBLANK_EVENT = 0x4000000, /**< Send event instead of blocking */ _DRM_VBLANK_FLIP = 0x8000000, /**< Scheduled buffer swap should flip */ _DRM_VBLANK_NEXTONMISS = 0x10000000, /**< If missed, wait for next vblank */ _DRM_VBLANK_SECONDARY = 0x20000000, /**< Secondary display controller */ _DRM_VBLANK_SIGNAL = 0x40000000 /**< Send signal instead of blocking, unsupported */ }; -#define _DRM_VBLANK_HIGH_CRTC_SHIFT 16 -#define _DRM_VBLANK_HIGH_CRTC_MASK 0x001F0000 +#define _DRM_VBLANK_HIGH_CRTC_SHIFT 1 #define _DRM_VBLANK_TYPES_MASK (_DRM_VBLANK_ABSOLUTE | _DRM_VBLANK_RELATIVE) #define _DRM_VBLANK_FLAGS_MASK (_DRM_VBLANK_EVENT | _DRM_VBLANK_SIGNAL | \ @@ -755,7 +756,7 @@ struct drm_event_vblank { }; #define DRM_CAP_DUMB_BUFFER 0x1 -#define DRM_CAP_HIGH_CRTC 0x2 +#define DRM_CAP_VBLANK_HIGH_CRTC 0x2 /* typedef area */ #ifndef __KERNEL__ -- 1.7.1