Merge 'drm-fixes' branch of rsync://rsync.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6

+151 -26
+1 -1
drivers/char/drm/Kconfig
··· 6 # 7 config DRM 8 tristate "Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)" 9 - depends on AGP || AGP=n 10 help 11 Kernel-level support for the Direct Rendering Infrastructure (DRI) 12 introduced in XFree86 4.0. If you say Y here, you need to select
··· 6 # 7 config DRM 8 tristate "Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)" 9 + depends on (AGP || AGP=n) && PCI 10 help 11 Kernel-level support for the Direct Rendering Infrastructure (DRI) 12 introduced in XFree86 4.0. If you say Y here, you need to select
+22 -2
drivers/char/drm/i915_dma.c
··· 1 /* i915_dma.c -- DMA support for the I915 -*- linux-c -*- 2 */ 3 /************************************************************************** 4 - * 5 * Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas. 6 * All Rights Reserved. 7 - * 8 **************************************************************************/ 9 10 #include "drmP.h"
··· 1 /* i915_dma.c -- DMA support for the I915 -*- linux-c -*- 2 */ 3 /************************************************************************** 4 + * 5 * Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas. 6 * All Rights Reserved. 7 + * 8 + * Permission is hereby granted, free of charge, to any person obtaining a 9 + * copy of this software and associated documentation files (the 10 + * "Software"), to deal in the Software without restriction, including 11 + * without limitation the rights to use, copy, modify, merge, publish, 12 + * distribute, sub license, and/or sell copies of the Software, and to 13 + * permit persons to whom the Software is furnished to do so, subject to 14 + * the following conditions: 15 + * 16 + * The above copyright notice and this permission notice (including the 17 + * next paragraph) shall be included in all copies or substantial portions 18 + * of the Software. 19 + * 20 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 21 + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 23 + * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR 24 + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 25 + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 26 + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 + * 28 **************************************************************************/ 29 30 #include "drmP.h"
+27
drivers/char/drm/i915_drm.h
··· 1 #ifndef _I915_DRM_H_ 2 #define _I915_DRM_H_ 3
··· 1 + /************************************************************************** 2 + * 3 + * Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas. 4 + * All Rights Reserved. 5 + * 6 + * Permission is hereby granted, free of charge, to any person obtaining a 7 + * copy of this software and associated documentation files (the 8 + * "Software"), to deal in the Software without restriction, including 9 + * without limitation the rights to use, copy, modify, merge, publish, 10 + * distribute, sub license, and/or sell copies of the Software, and to 11 + * permit persons to whom the Software is furnished to do so, subject to 12 + * the following conditions: 13 + * 14 + * The above copyright notice and this permission notice (including the 15 + * next paragraph) shall be included in all copies or substantial portions 16 + * of the Software. 17 + * 18 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 19 + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 20 + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 21 + * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR 22 + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 23 + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 24 + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 25 + * 26 + **************************************************************************/ 27 + 28 #ifndef _I915_DRM_H_ 29 #define _I915_DRM_H_ 30
+22 -3
drivers/char/drm/i915_drv.c
··· 1 /* i915_drv.c -- i830,i845,i855,i865,i915 driver -*- linux-c -*- 2 */ 3 - 4 /************************************************************************** 5 - * 6 * Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas. 7 * All Rights Reserved. 8 - * 9 **************************************************************************/ 10 11 #include "drmP.h"
··· 1 /* i915_drv.c -- i830,i845,i855,i865,i915 driver -*- linux-c -*- 2 */ 3 /************************************************************************** 4 + * 5 * Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas. 6 * All Rights Reserved. 7 + * 8 + * Permission is hereby granted, free of charge, to any person obtaining a 9 + * copy of this software and associated documentation files (the 10 + * "Software"), to deal in the Software without restriction, including 11 + * without limitation the rights to use, copy, modify, merge, publish, 12 + * distribute, sub license, and/or sell copies of the Software, and to 13 + * permit persons to whom the Software is furnished to do so, subject to 14 + * the following conditions: 15 + * 16 + * The above copyright notice and this permission notice (including the 17 + * next paragraph) shall be included in all copies or substantial portions 18 + * of the Software. 19 + * 20 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 21 + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 23 + * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR 24 + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 25 + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 26 + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 + * 28 **************************************************************************/ 29 30 #include "drmP.h"
+22 -2
drivers/char/drm/i915_drv.h
··· 1 /* i915_drv.h -- Private header for the I915 driver -*- linux-c -*- 2 */ 3 /************************************************************************** 4 - * 5 * Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas. 6 * All Rights Reserved. 7 - * 8 **************************************************************************/ 9 10 #ifndef _I915_DRV_H_
··· 1 /* i915_drv.h -- Private header for the I915 driver -*- linux-c -*- 2 */ 3 /************************************************************************** 4 + * 5 * Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas. 6 * All Rights Reserved. 7 + * 8 + * Permission is hereby granted, free of charge, to any person obtaining a 9 + * copy of this software and associated documentation files (the 10 + * "Software"), to deal in the Software without restriction, including 11 + * without limitation the rights to use, copy, modify, merge, publish, 12 + * distribute, sub license, and/or sell copies of the Software, and to 13 + * permit persons to whom the Software is furnished to do so, subject to 14 + * the following conditions: 15 + * 16 + * The above copyright notice and this permission notice (including the 17 + * next paragraph) shall be included in all copies or substantial portions 18 + * of the Software. 19 + * 20 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 21 + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 23 + * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR 24 + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 25 + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 26 + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 + * 28 **************************************************************************/ 29 30 #ifndef _I915_DRV_H_
+22 -2
drivers/char/drm/i915_irq.c
··· 1 /* i915_dma.c -- DMA support for the I915 -*- linux-c -*- 2 */ 3 /************************************************************************** 4 - * 5 * Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas. 6 * All Rights Reserved. 7 - * 8 **************************************************************************/ 9 10 #include "drmP.h"
··· 1 /* i915_dma.c -- DMA support for the I915 -*- linux-c -*- 2 */ 3 /************************************************************************** 4 + * 5 * Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas. 6 * All Rights Reserved. 7 + * 8 + * Permission is hereby granted, free of charge, to any person obtaining a 9 + * copy of this software and associated documentation files (the 10 + * "Software"), to deal in the Software without restriction, including 11 + * without limitation the rights to use, copy, modify, merge, publish, 12 + * distribute, sub license, and/or sell copies of the Software, and to 13 + * permit persons to whom the Software is furnished to do so, subject to 14 + * the following conditions: 15 + * 16 + * The above copyright notice and this permission notice (including the 17 + * next paragraph) shall be included in all copies or substantial portions 18 + * of the Software. 19 + * 20 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 21 + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 23 + * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR 24 + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 25 + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 26 + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 + * 28 **************************************************************************/ 29 30 #include "drmP.h"
+22 -2
drivers/char/drm/i915_mem.c
··· 1 /* i915_mem.c -- Simple agp/fb memory manager for i915 -*- linux-c -*- 2 */ 3 /************************************************************************** 4 - * 5 * Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas. 6 * All Rights Reserved. 7 - * 8 **************************************************************************/ 9 10 #include "drmP.h"
··· 1 /* i915_mem.c -- Simple agp/fb memory manager for i915 -*- linux-c -*- 2 */ 3 /************************************************************************** 4 + * 5 * Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas. 6 * All Rights Reserved. 7 + * 8 + * Permission is hereby granted, free of charge, to any person obtaining a 9 + * copy of this software and associated documentation files (the 10 + * "Software"), to deal in the Software without restriction, including 11 + * without limitation the rights to use, copy, modify, merge, publish, 12 + * distribute, sub license, and/or sell copies of the Software, and to 13 + * permit persons to whom the Software is furnished to do so, subject to 14 + * the following conditions: 15 + * 16 + * The above copyright notice and this permission notice (including the 17 + * next paragraph) shall be included in all copies or substantial portions 18 + * of the Software. 19 + * 20 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 21 + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 23 + * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR 24 + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 25 + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 26 + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 + * 28 **************************************************************************/ 29 30 #include "drmP.h"
+13 -14
drivers/char/drm/radeon_irq.c
··· 35 #include "radeon_drm.h" 36 #include "radeon_drv.h" 37 38 /* Interrupts - Used for device synchronization and flushing in the 39 * following circumstances: 40 * ··· 71 /* Only consider the bits we're interested in - others could be used 72 * outside the DRM 73 */ 74 - stat = RADEON_READ(RADEON_GEN_INT_STATUS) 75 - & (RADEON_SW_INT_TEST | RADEON_CRTC_VBLANK_STAT); 76 if (!stat) 77 return IRQ_NONE; 78 ··· 88 drm_vbl_send_signals( dev ); 89 } 90 91 - /* Acknowledge interrupts we handle */ 92 - RADEON_WRITE(RADEON_GEN_INT_STATUS, stat); 93 return IRQ_HANDLED; 94 - } 95 - 96 - static __inline__ void radeon_acknowledge_irqs(drm_radeon_private_t *dev_priv) 97 - { 98 - u32 tmp = RADEON_READ( RADEON_GEN_INT_STATUS ) 99 - & (RADEON_SW_INT_TEST_ACK | RADEON_CRTC_VBLANK_STAT); 100 - if (tmp) 101 - RADEON_WRITE( RADEON_GEN_INT_STATUS, tmp ); 102 } 103 104 static int radeon_emit_irq(drm_device_t *dev) ··· 139 return DRM_ERR(EINVAL); 140 } 141 142 - radeon_acknowledge_irqs( dev_priv ); 143 144 dev_priv->stats.boxes |= RADEON_BOX_WAIT_IDLE; 145 ··· 217 RADEON_WRITE( RADEON_GEN_INT_CNTL, 0 ); 218 219 /* Clear bits if they're already high */ 220 - radeon_acknowledge_irqs( dev_priv ); 221 } 222 223 void radeon_driver_irq_postinstall( drm_device_t *dev ) {
··· 35 #include "radeon_drm.h" 36 #include "radeon_drv.h" 37 38 + static __inline__ u32 radeon_acknowledge_irqs(drm_radeon_private_t *dev_priv, u32 mask) 39 + { 40 + u32 irqs = RADEON_READ(RADEON_GEN_INT_STATUS) & mask; 41 + if (irqs) 42 + RADEON_WRITE(RADEON_GEN_INT_STATUS, irqs); 43 + return irqs; 44 + } 45 + 46 /* Interrupts - Used for device synchronization and flushing in the 47 * following circumstances: 48 * ··· 63 /* Only consider the bits we're interested in - others could be used 64 * outside the DRM 65 */ 66 + stat = radeon_acknowledge_irqs(dev_priv, (RADEON_SW_INT_TEST_ACK | 67 + RADEON_CRTC_VBLANK_STAT)); 68 if (!stat) 69 return IRQ_NONE; 70 ··· 80 drm_vbl_send_signals( dev ); 81 } 82 83 return IRQ_HANDLED; 84 } 85 86 static int radeon_emit_irq(drm_device_t *dev) ··· 141 return DRM_ERR(EINVAL); 142 } 143 144 + radeon_acknowledge_irqs(dev_priv, RADEON_CRTC_VBLANK_STAT); 145 146 dev_priv->stats.boxes |= RADEON_BOX_WAIT_IDLE; 147 ··· 219 RADEON_WRITE( RADEON_GEN_INT_CNTL, 0 ); 220 221 /* Clear bits if they're already high */ 222 + radeon_acknowledge_irqs(dev_priv, (RADEON_SW_INT_TEST_ACK | 223 + RADEON_CRTC_VBLANK_STAT)); 224 } 225 226 void radeon_driver_irq_postinstall( drm_device_t *dev ) {