Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/external/bsd/drm/dist convert all crtc values passed in ...
details: https://anonhg.NetBSD.org/src/rev/87277d817fb8
branches: trunk
changeset: 762601:87277d817fb8
user: mrg <mrg%NetBSD.org@localhost>
date: Thu Feb 24 07:59:44 2011 +0000
description:
convert all crtc values passed in from userland to be unsigned instead
of signed. there's still some more internal to the i915 driver that
should be converted.
tested on a radeon x1550.
diffstat:
sys/external/bsd/drm/dist/bsd-core/drmP.h | 16 ++++++++--------
sys/external/bsd/drm/dist/bsd-core/drm_irq.c | 19 ++++++++++---------
sys/external/bsd/drm/dist/shared-core/i915_drv.h | 8 ++++----
sys/external/bsd/drm/dist/shared-core/i915_irq.c | 8 ++++----
sys/external/bsd/drm/dist/shared-core/mach64_drv.h | 6 +++---
sys/external/bsd/drm/dist/shared-core/mach64_irq.c | 8 ++++----
sys/external/bsd/drm/dist/shared-core/mga_drv.h | 6 +++---
sys/external/bsd/drm/dist/shared-core/mga_irq.c | 6 +++---
sys/external/bsd/drm/dist/shared-core/r128_drv.h | 6 +++---
sys/external/bsd/drm/dist/shared-core/r128_irq.c | 6 +++---
sys/external/bsd/drm/dist/shared-core/radeon_drv.h | 6 +++---
sys/external/bsd/drm/dist/shared-core/radeon_irq.c | 8 ++++----
sys/external/bsd/drm/dist/shared-core/via_drv.h | 6 +++---
sys/external/bsd/drm/dist/shared-core/via_irq.c | 8 ++++----
14 files changed, 59 insertions(+), 58 deletions(-)
diffs (truncated from 429 to 300 lines):
diff -r b20101197194 -r 87277d817fb8 sys/external/bsd/drm/dist/bsd-core/drmP.h
--- a/sys/external/bsd/drm/dist/bsd-core/drmP.h Thu Feb 24 07:51:16 2011 +0000
+++ b/sys/external/bsd/drm/dist/bsd-core/drmP.h Thu Feb 24 07:59:44 2011 +0000
@@ -728,9 +728,9 @@
int (*irq_postinstall)(struct drm_device *dev);
void (*irq_uninstall)(struct drm_device *dev);
irqreturn_t (*irq_handler)(DRM_IRQ_ARGS);
- u32 (*get_vblank_counter)(struct drm_device *dev, int crtc);
- int (*enable_vblank)(struct drm_device *dev, int crtc);
- void (*disable_vblank)(struct drm_device *dev, int crtc);
+ u32 (*get_vblank_counter)(struct drm_device *dev, unsigned int crtc);
+ int (*enable_vblank)(struct drm_device *dev, unsigned int crtc);
+ void (*disable_vblank)(struct drm_device *dev, unsigned int crtc);
drm_pci_id_list_t *id_entry; /* PCI ID, name, and chipset private */
@@ -1075,14 +1075,14 @@
void drm_driver_irq_preinstall(struct drm_device *dev);
void drm_driver_irq_postinstall(struct drm_device *dev);
void drm_driver_irq_uninstall(struct drm_device *dev);
-void drm_handle_vblank(struct drm_device *dev, int crtc);
-u32 drm_vblank_count(struct drm_device *dev, int crtc);
-int drm_vblank_get(struct drm_device *dev, int crtc);
-void drm_vblank_put(struct drm_device *dev, int crtc);
+void drm_handle_vblank(struct drm_device *dev, unsigned int crtc);
+u32 drm_vblank_count(struct drm_device *dev, unsigned int crtc);
+int drm_vblank_get(struct drm_device *dev, unsigned int crtc);
+void drm_vblank_put(struct drm_device *dev, unsigned int crtc);
void drm_vblank_cleanup(struct drm_device *dev);
int drm_vblank_wait(struct drm_device *dev, unsigned int *vbl_seq);
int drm_vblank_init(struct drm_device *dev, int num_crtcs);
-void drm_vbl_send_signals(struct drm_device *dev, int crtc);
+void drm_vbl_send_signals(struct drm_device *dev, unsigned int crtc);
int drm_modeset_ctl(struct drm_device *dev, void *data,
struct drm_file *file_priv);
diff -r b20101197194 -r 87277d817fb8 sys/external/bsd/drm/dist/bsd-core/drm_irq.c
--- a/sys/external/bsd/drm/dist/bsd-core/drm_irq.c Thu Feb 24 07:51:16 2011 +0000
+++ b/sys/external/bsd/drm/dist/bsd-core/drm_irq.c Thu Feb 24 07:59:44 2011 +0000
@@ -79,7 +79,7 @@
static void vblank_disable_fn(void *arg)
{
struct drm_device *dev = (struct drm_device *)arg;
- int i;
+ unsigned int i;
#if defined(__NetBSD__)
mutex_enter(&dev->vbl_lock);
@@ -298,12 +298,12 @@
}
}
-u32 drm_vblank_count(struct drm_device *dev, int crtc)
+u32 drm_vblank_count(struct drm_device *dev, unsigned int crtc)
{
return atomic_read(&dev->vblank[crtc].count);
}
-static void drm_update_vblank_count(struct drm_device *dev, int crtc)
+static void drm_update_vblank_count(struct drm_device *dev, unsigned int crtc)
{
u32 cur_vblank, diff;
@@ -329,7 +329,7 @@
atomic_add(diff, &dev->vblank[crtc].count);
}
-int drm_vblank_get(struct drm_device *dev, int crtc)
+int drm_vblank_get(struct drm_device *dev, unsigned int crtc)
{
unsigned long irqflags;
int ret = 0;
@@ -353,7 +353,7 @@
return ret;
}
-void drm_vblank_put(struct drm_device *dev, int crtc)
+void drm_vblank_put(struct drm_device *dev, unsigned int crtc)
{
unsigned long irqflags;
@@ -375,7 +375,8 @@
{
struct drm_modeset_ctl *modeset = data;
unsigned long irqflags;
- int crtc, ret = 0;
+ int ret = 0;
+ unsigned int crtc;
DRM_DEBUG("num_crtcs=%d\n", dev->num_crtcs);
/* If drm_vblank_init() hasn't been called yet, just no-op */
@@ -527,12 +528,12 @@
return ret;
}
-void drm_vbl_send_signals(struct drm_device *dev, int crtc)
+void drm_vbl_send_signals(struct drm_device *dev, unsigned int crtc)
{
}
#if 0 /* disabled */
-void drm_vbl_send_signals(struct drm_device *dev, int crtc )
+void drm_vbl_send_signals(struct drm_device *dev, unsigned int crtc )
{
drm_vbl_sig_t *vbl_sig;
unsigned int vbl_seq = atomic_read( &dev->vbl_received );
@@ -558,7 +559,7 @@
}
#endif
-void drm_handle_vblank(struct drm_device *dev, int crtc)
+void drm_handle_vblank(struct drm_device *dev, unsigned int crtc)
{
atomic_inc(&dev->vblank[crtc].count);
DRM_WAKEUP(&dev->vblank[crtc].queue);
diff -r b20101197194 -r 87277d817fb8 sys/external/bsd/drm/dist/shared-core/i915_drv.h
--- a/sys/external/bsd/drm/dist/shared-core/i915_drv.h Thu Feb 24 07:51:16 2011 +0000
+++ b/sys/external/bsd/drm/dist/shared-core/i915_drv.h Thu Feb 24 07:59:44 2011 +0000
@@ -432,10 +432,10 @@
struct drm_file *file_priv);
extern int i915_vblank_pipe_get(struct drm_device *dev, void *data,
struct drm_file *file_priv);
-extern int i915_enable_vblank(struct drm_device *dev, int crtc);
-extern void i915_disable_vblank(struct drm_device *dev, int crtc);
-extern u32 i915_get_vblank_counter(struct drm_device *dev, int crtc);
-extern u32 gm45_get_vblank_counter(struct drm_device *dev, int crtc);
+extern int i915_enable_vblank(struct drm_device *dev, unsigned int crtc);
+extern void i915_disable_vblank(struct drm_device *dev, unsigned int crtc);
+extern u32 i915_get_vblank_counter(struct drm_device *dev, unsigned int crtc);
+extern u32 gm45_get_vblank_counter(struct drm_device *dev, unsigned int crtc);
extern int i915_vblank_swap(struct drm_device *dev, void *data,
struct drm_file *file_priv);
diff -r b20101197194 -r 87277d817fb8 sys/external/bsd/drm/dist/shared-core/i915_irq.c
--- a/sys/external/bsd/drm/dist/shared-core/i915_irq.c Thu Feb 24 07:51:16 2011 +0000
+++ b/sys/external/bsd/drm/dist/shared-core/i915_irq.c Thu Feb 24 07:59:44 2011 +0000
@@ -133,7 +133,7 @@
/* Called from drm generic code, passed a 'crtc', which
* we use as a pipe index
*/
-u32 i915_get_vblank_counter(struct drm_device *dev, int pipe)
+u32 i915_get_vblank_counter(struct drm_device *dev, unsigned int pipe)
{
drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
unsigned long high_frame;
@@ -167,7 +167,7 @@
return count;
}
-u32 gm45_get_vblank_counter(struct drm_device *dev, int pipe)
+u32 gm45_get_vblank_counter(struct drm_device *dev, unsigned int pipe)
{
drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
int reg = pipe ? PIPEB_FRMCOUNT_GM45 : PIPEA_FRMCOUNT_GM45;
@@ -376,7 +376,7 @@
/* Called from drm generic code, passed 'crtc' which
* we use as a pipe index
*/
-int i915_enable_vblank(struct drm_device *dev, int pipe)
+int i915_enable_vblank(struct drm_device *dev, unsigned int pipe)
{
drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
unsigned long irqflags;
@@ -400,7 +400,7 @@
/* Called from drm generic code, passed 'crtc' which
* we use as a pipe index
*/
-void i915_disable_vblank(struct drm_device *dev, int pipe)
+void i915_disable_vblank(struct drm_device *dev, unsigned int pipe)
{
drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
unsigned long irqflags;
diff -r b20101197194 -r 87277d817fb8 sys/external/bsd/drm/dist/shared-core/mach64_drv.h
--- a/sys/external/bsd/drm/dist/shared-core/mach64_drv.h Thu Feb 24 07:51:16 2011 +0000
+++ b/sys/external/bsd/drm/dist/shared-core/mach64_drv.h Thu Feb 24 07:59:44 2011 +0000
@@ -164,9 +164,9 @@
struct drm_file *file_priv);
extern int mach64_driver_load(struct drm_device * dev, unsigned long flags);
-extern u32 mach64_get_vblank_counter(struct drm_device *dev, int crtc);
-extern int mach64_enable_vblank(struct drm_device *dev, int crtc);
-extern void mach64_disable_vblank(struct drm_device *dev, int crtc);
+extern u32 mach64_get_vblank_counter(struct drm_device *dev, unsigned int crtc);
+extern int mach64_enable_vblank(struct drm_device *dev, unsigned int crtc);
+extern void mach64_disable_vblank(struct drm_device *dev, unsigned int crtc);
extern irqreturn_t mach64_driver_irq_handler(DRM_IRQ_ARGS);
extern void mach64_driver_irq_preinstall(struct drm_device *dev);
extern int mach64_driver_irq_postinstall(struct drm_device *dev);
diff -r b20101197194 -r 87277d817fb8 sys/external/bsd/drm/dist/shared-core/mach64_irq.c
--- a/sys/external/bsd/drm/dist/shared-core/mach64_irq.c Thu Feb 24 07:51:16 2011 +0000
+++ b/sys/external/bsd/drm/dist/shared-core/mach64_irq.c Thu Feb 24 07:59:44 2011 +0000
@@ -68,7 +68,7 @@
return IRQ_NONE;
}
-u32 mach64_get_vblank_counter(struct drm_device * dev, int crtc)
+u32 mach64_get_vblank_counter(struct drm_device * dev, unsigned int crtc)
{
const drm_mach64_private_t *const dev_priv = dev->dev_private;
@@ -78,7 +78,7 @@
return atomic_read(&dev_priv->vbl_received);
}
-int mach64_enable_vblank(struct drm_device * dev, int crtc)
+int mach64_enable_vblank(struct drm_device * dev, unsigned int crtc)
{
drm_mach64_private_t *dev_priv = dev->dev_private;
u32 status = MACH64_READ(MACH64_CRTC_INT_CNTL);
@@ -98,7 +98,7 @@
return 0;
}
-void mach64_disable_vblank(struct drm_device * dev, int crtc)
+void mach64_disable_vblank(struct drm_device * dev, unsigned int crtc)
{
if (crtc != 0) {
DRM_ERROR("tried to disable vblank on non-existent crtc %d\n",
@@ -112,7 +112,7 @@
*/
}
-static void mach64_disable_vblank_local(struct drm_device * dev, int crtc)
+static void mach64_disable_vblank_local(struct drm_device * dev, unsigned int crtc)
{
drm_mach64_private_t *dev_priv = dev->dev_private;
u32 status = MACH64_READ(MACH64_CRTC_INT_CNTL);
diff -r b20101197194 -r 87277d817fb8 sys/external/bsd/drm/dist/shared-core/mga_drv.h
--- a/sys/external/bsd/drm/dist/shared-core/mga_drv.h Thu Feb 24 07:51:16 2011 +0000
+++ b/sys/external/bsd/drm/dist/shared-core/mga_drv.h Thu Feb 24 07:59:44 2011 +0000
@@ -182,9 +182,9 @@
extern int mga_warp_init(drm_mga_private_t * dev_priv);
/* mga_irq.c */
-extern int mga_enable_vblank(struct drm_device *dev, int crtc);
-extern void mga_disable_vblank(struct drm_device *dev, int crtc);
-extern u32 mga_get_vblank_counter(struct drm_device *dev, int crtc);
+extern int mga_enable_vblank(struct drm_device *dev, unsigned int crtc);
+extern void mga_disable_vblank(struct drm_device *dev, unsigned int crtc);
+extern u32 mga_get_vblank_counter(struct drm_device *dev, unsigned int crtc);
extern int mga_driver_fence_wait(struct drm_device * dev, unsigned int *sequence);
extern int mga_driver_vblank_wait(struct drm_device * dev, unsigned int *sequence);
extern irqreturn_t mga_driver_irq_handler(DRM_IRQ_ARGS);
diff -r b20101197194 -r 87277d817fb8 sys/external/bsd/drm/dist/shared-core/mga_irq.c
--- a/sys/external/bsd/drm/dist/shared-core/mga_irq.c Thu Feb 24 07:51:16 2011 +0000
+++ b/sys/external/bsd/drm/dist/shared-core/mga_irq.c Thu Feb 24 07:59:44 2011 +0000
@@ -36,7 +36,7 @@
#include "mga_drm.h"
#include "mga_drv.h"
-u32 mga_get_vblank_counter(struct drm_device *dev, int crtc)
+u32 mga_get_vblank_counter(struct drm_device *dev, unsigned int crtc)
{
const drm_mga_private_t *const dev_priv =
(drm_mga_private_t *) dev->dev_private;
@@ -92,7 +92,7 @@
return IRQ_NONE;
}
-int mga_enable_vblank(struct drm_device *dev, int crtc)
+int mga_enable_vblank(struct drm_device *dev, unsigned int crtc)
{
drm_mga_private_t *dev_priv = (drm_mga_private_t *) dev->dev_private;
@@ -107,7 +107,7 @@
}
-void mga_disable_vblank(struct drm_device *dev, int crtc)
+void mga_disable_vblank(struct drm_device *dev, unsigned int crtc)
{
if (crtc != 0) {
DRM_ERROR("tried to disable vblank on non-existent crtc %d\n",
diff -r b20101197194 -r 87277d817fb8 sys/external/bsd/drm/dist/shared-core/r128_drv.h
--- a/sys/external/bsd/drm/dist/shared-core/r128_drv.h Thu Feb 24 07:51:16 2011 +0000
+++ b/sys/external/bsd/drm/dist/shared-core/r128_drv.h Thu Feb 24 07:59:44 2011 +0000
@@ -151,9 +151,9 @@
extern int r128_do_cce_idle(drm_r128_private_t * dev_priv);
extern int r128_do_cleanup_cce(struct drm_device * dev);
-extern int r128_enable_vblank(struct drm_device *dev, int crtc);
-extern void r128_disable_vblank(struct drm_device *dev, int crtc);
-extern u32 r128_get_vblank_counter(struct drm_device *dev, int crtc);
+extern int r128_enable_vblank(struct drm_device *dev, unsigned int crtc);
+extern void r128_disable_vblank(struct drm_device *dev, unsigned int crtc);
+extern u32 r128_get_vblank_counter(struct drm_device *dev, unsigned int crtc);
extern irqreturn_t r128_driver_irq_handler(DRM_IRQ_ARGS);
extern void r128_driver_irq_preinstall(struct drm_device * dev);
extern int r128_driver_irq_postinstall(struct drm_device * dev);
diff -r b20101197194 -r 87277d817fb8 sys/external/bsd/drm/dist/shared-core/r128_irq.c
--- a/sys/external/bsd/drm/dist/shared-core/r128_irq.c Thu Feb 24 07:51:16 2011 +0000
+++ b/sys/external/bsd/drm/dist/shared-core/r128_irq.c Thu Feb 24 07:59:44 2011 +0000
@@ -35,7 +35,7 @@
#include "r128_drm.h"
#include "r128_drv.h"
-u32 r128_get_vblank_counter(struct drm_device *dev, int crtc)
+u32 r128_get_vblank_counter(struct drm_device *dev, unsigned int crtc)
{
const drm_r128_private_t *dev_priv = dev->dev_private;
Home |
Main Index |
Thread Index |
Old Index