aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/drm/drm_fops.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@starflyer.(none)>2005-11-10 06:28:56 -0500
committerDave Airlie <airlied@linux.ie>2005-11-10 06:28:56 -0500
commit3f9df54d6386bb632ffc00665489bb3bb3bf6ff2 (patch)
tree1fdd818d7c58ebc80e4b0006d0b40b7467c1d881 /drivers/char/drm/drm_fops.c
parent22eae947bf76e236ba972f2f11cfd1b083b736ad (diff)
drm: remove drm_init.c it is no longer needed
Move drm_cpu_valid into drm_fops.c Signed-off-by: Dave Airlie <airlied@linux.ie>
Diffstat (limited to 'drivers/char/drm/drm_fops.c')
-rw-r--r--drivers/char/drm/drm_fops.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/char/drm/drm_fops.c b/drivers/char/drm/drm_fops.c
index f57f7d1a281e..28f01305377f 100644
--- a/drivers/char/drm/drm_fops.c
+++ b/drivers/char/drm/drm_fops.c
@@ -322,6 +322,23 @@ int drm_release(struct inode *inode, struct file *filp)
322EXPORT_SYMBOL(drm_release); 322EXPORT_SYMBOL(drm_release);
323 323
324/** 324/**
325 * Check whether DRI will run on this CPU.
326 *
327 * \return non-zero if the DRI will run on this CPU, or zero otherwise.
328 */
329static int drm_cpu_valid(void)
330{
331#if defined(__i386__)
332 if (boot_cpu_data.x86 == 3)
333 return 0; /* No cmpxchg on a 386 */
334#endif
335#if defined(__sparc__) && !defined(__sparc_v9__)
336 return 0; /* No cmpxchg before v9 sparc. */
337#endif
338 return 1;
339}
340
341/**
325 * Called whenever a process opens /dev/drm. 342 * Called whenever a process opens /dev/drm.
326 * 343 *
327 * \param inode device inode. 344 * \param inode device inode.