[prev in list] [next in list] [prev in thread] [next in thread]
List: dri-patches
Subject: drm: Branch 'vblank-rework' - 2 commits
From: jbarnes () kemper ! freedesktop ! org (Jesse Barnes)
Date: 2007-11-01 22:02:53
Message-ID: 20071101220253.41B1110096 () kemper ! freedesktop ! org
[Download RAW message or body]
linux-core/drm_irq.c | 15 +++++++++------
shared-core/drm.h | 2 +-
2 files changed, 10 insertions(+), 7 deletions(-)
New commits:
commit 128a8f7ea20af2549e448157b431d5c1f90f37c3
Author: Jesse Barnes <jesse.barnes@intel.com>
Date: Thu Nov 1 15:02:26 2007 -0700
Use unsigned long instead of u64 in drm_modeset_ctl_t
A bad idea, ABI-wise, but we're going to be changing this structure anyway
before we merge upstream, so just fix the build for now.
diff --git a/shared-core/drm.h b/shared-core/drm.h
index 3092e53..cbd6a94 100644
--- a/shared-core/drm.h
+++ b/shared-core/drm.h
@@ -565,7 +565,7 @@ typedef enum {
* \sa drmModesetCtl().
*/
typedef struct drm_modeset_ctl {
- u64 arg;
+ unsigned long arg;
drm_modeset_ctl_cmd_t cmd;
} drm_modeset_ctl_t;
commit 00d60265570c866261c09fd3397d5853a1ce196a
Author: Jesse Barnes <jesse.barnes@intel.com>
Date: Thu Nov 1 12:50:03 2007 -0700
Cleanup vblank_init and fix drm_irq_install
The vblank_init function wanted a couple of cleanups.
Also, drm_irq_install wasn't checking the new return value of irq_postinstall.
If it returns a failure, assume IRQs didn't get set up and take appropriate
action.
diff --git a/linux-core/drm_irq.c b/linux-core/drm_irq.c
index e917e7e..4aa58d7 100644
--- a/linux-core/drm_irq.c
+++ b/linux-core/drm_irq.c
@@ -85,7 +85,7 @@ int drm_vblank_init(struct drm_device *dev, int num_crtcs)
{
int i, ret = -ENOMEM;
- setup_timer(&dev->vblank_disable_timer, vblank_disable_fn,\
+ setup_timer(&dev->vblank_disable_timer, vblank_disable_fn,
(unsigned long)dev);
spin_lock_init(&dev->vbl_lock);
atomic_set(&dev->vbl_signal_pending, 0);
@@ -111,18 +111,16 @@ int drm_vblank_init(struct drm_device *dev, int num_crtcs)
if (!dev->vblank_refcount)
goto err;
- dev->last_vblank = drm_calloc(1, sizeof(u32) * num_crtcs,
- DRM_MEM_DRIVER);
+ dev->last_vblank = drm_calloc(num_crtcs, sizeof(u32), DRM_MEM_DRIVER);
if (!dev->last_vblank)
goto err;
- dev->vblank_premodeset = drm_calloc(1, sizeof(u32) * num_crtcs,
+ dev->vblank_premodeset = drm_calloc(num_crtcs, sizeof(u32),
DRM_MEM_DRIVER);
if (!dev->vblank_premodeset)
goto err;
- dev->vblank_offset = drm_calloc(1, sizeof(u32) * num_crtcs,
- DRM_MEM_DRIVER);
+ dev->vblank_offset = drm_calloc(num_crtcs, sizeof(u32), DRM_MEM_DRIVER);
if (!dev->vblank_offset)
goto err;
@@ -210,6 +208,11 @@ int drm_irq_install(struct drm_device * dev)
/* After installing handler */
ret = dev->driver->irq_postinstall(dev);
+ if (ret < 0) {
+ mutex_lock(&dev->struct_mutex);
+ dev->irq_enabled = 0;
+ mutex_unlock(&dev->struct_mutex);
+ }
return ret;
}
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
--
_______________________________________________
Dri-patches mailing list
Dri-patches@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-patches
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic