[Intel-gfx] [PATCH 3/2] drm/i915: add GETPARAM request for page flipping

Jesse Barnes jbarnes at virtuousgeek.org
Tue Nov 17 20:35:10 CET 2009


From c27e509840589cf4c175f615ec6e3d48e05944c5 Mon Sep 17 00:00:00 2001
From: Jesse Barnes <jbarnes at jbarnes-desktop.localdomain>
Date: Wed, 18 Nov 2009 04:31:47 +0000
Subject: [PATCH] drm/i915: add GETPARAM request for page flipping

Add a GETPARAM request for checking if page flipping is supported.
Useful for the 2D driver to enable the flipping path.

Signed-off-by: Jesse Barnes <jbarnes at virtuousgeek.org>
---
 drivers/gpu/drm/i915/i915_dma.c |    3 +++
 include/drm/i915_drm.h          |    1 +
 2 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index 093146b..419b399 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -810,6 +810,9 @@ static int i915_getparam(struct drm_device *dev, void *data,
 	case I915_PARAM_HAS_OVERLAY:
 		value = dev_priv->overlay ? 1 : 0;
 		break;
+	case I915_PARAM_HAS_PAGEFLIPPING:
+		value = 1;
+		break;
 	default:
 		DRM_DEBUG_DRIVER("Unknown parameter %d\n",
 					param->param);
diff --git a/include/drm/i915_drm.h b/include/drm/i915_drm.h
index c900499..1b4f3a5 100644
--- a/include/drm/i915_drm.h
+++ b/include/drm/i915_drm.h
@@ -271,6 +271,7 @@ typedef struct drm_i915_irq_wait {
 #define I915_PARAM_HAS_GEM               5
 #define I915_PARAM_NUM_FENCES_AVAIL      6
 #define I915_PARAM_HAS_OVERLAY           7
+#define I915_PARAM_HAS_PAGEFLIPPING      8
 
 typedef struct drm_i915_getparam {
 	int param;
-- 
1.6.1.3




More information about the Intel-gfx mailing list