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 6 # 7 7 config DRM 8 8 tristate "Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)" 9 - depends on AGP || AGP=n 9 + depends on (AGP || AGP=n) && PCI 10 10 help 11 11 Kernel-level support for the Direct Rendering Infrastructure (DRI) 12 12 introduced in XFree86 4.0. If you say Y here, you need to select
+22 -2
drivers/char/drm/i915_dma.c
··· 1 1 /* i915_dma.c -- DMA support for the I915 -*- linux-c -*- 2 2 */ 3 3 /************************************************************************** 4 - * 4 + * 5 5 * Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas. 6 6 * All Rights Reserved. 7 - * 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 + * 8 28 **************************************************************************/ 9 29 10 30 #include "drmP.h"
+27
drivers/char/drm/i915_drm.h
··· 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 + 1 28 #ifndef _I915_DRM_H_ 2 29 #define _I915_DRM_H_ 3 30
+22 -3
drivers/char/drm/i915_drv.c
··· 1 1 /* i915_drv.c -- i830,i845,i855,i865,i915 driver -*- linux-c -*- 2 2 */ 3 - 4 3 /************************************************************************** 5 - * 4 + * 6 5 * Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas. 7 6 * All Rights Reserved. 8 - * 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 + * 9 28 **************************************************************************/ 10 29 11 30 #include "drmP.h"
+22 -2
drivers/char/drm/i915_drv.h
··· 1 1 /* i915_drv.h -- Private header for the I915 driver -*- linux-c -*- 2 2 */ 3 3 /************************************************************************** 4 - * 4 + * 5 5 * Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas. 6 6 * All Rights Reserved. 7 - * 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 + * 8 28 **************************************************************************/ 9 29 10 30 #ifndef _I915_DRV_H_
+22 -2
drivers/char/drm/i915_irq.c
··· 1 1 /* i915_dma.c -- DMA support for the I915 -*- linux-c -*- 2 2 */ 3 3 /************************************************************************** 4 - * 4 + * 5 5 * Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas. 6 6 * All Rights Reserved. 7 - * 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 + * 8 28 **************************************************************************/ 9 29 10 30 #include "drmP.h"
+22 -2
drivers/char/drm/i915_mem.c
··· 1 1 /* i915_mem.c -- Simple agp/fb memory manager for i915 -*- linux-c -*- 2 2 */ 3 3 /************************************************************************** 4 - * 4 + * 5 5 * Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas. 6 6 * All Rights Reserved. 7 - * 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 + * 8 28 **************************************************************************/ 9 29 10 30 #include "drmP.h"
+13 -14
drivers/char/drm/radeon_irq.c
··· 35 35 #include "radeon_drm.h" 36 36 #include "radeon_drv.h" 37 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 + 38 46 /* Interrupts - Used for device synchronization and flushing in the 39 47 * following circumstances: 40 48 * ··· 71 63 /* Only consider the bits we're interested in - others could be used 72 64 * outside the DRM 73 65 */ 74 - stat = RADEON_READ(RADEON_GEN_INT_STATUS) 75 - & (RADEON_SW_INT_TEST | RADEON_CRTC_VBLANK_STAT); 66 + stat = radeon_acknowledge_irqs(dev_priv, (RADEON_SW_INT_TEST_ACK | 67 + RADEON_CRTC_VBLANK_STAT)); 76 68 if (!stat) 77 69 return IRQ_NONE; 78 70 ··· 88 80 drm_vbl_send_signals( dev ); 89 81 } 90 82 91 - /* Acknowledge interrupts we handle */ 92 - RADEON_WRITE(RADEON_GEN_INT_STATUS, stat); 93 83 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 84 } 103 85 104 86 static int radeon_emit_irq(drm_device_t *dev) ··· 139 141 return DRM_ERR(EINVAL); 140 142 } 141 143 142 - radeon_acknowledge_irqs( dev_priv ); 144 + radeon_acknowledge_irqs(dev_priv, RADEON_CRTC_VBLANK_STAT); 143 145 144 146 dev_priv->stats.boxes |= RADEON_BOX_WAIT_IDLE; 145 147 ··· 217 219 RADEON_WRITE( RADEON_GEN_INT_CNTL, 0 ); 218 220 219 221 /* Clear bits if they're already high */ 220 - radeon_acknowledge_irqs( dev_priv ); 222 + radeon_acknowledge_irqs(dev_priv, (RADEON_SW_INT_TEST_ACK | 223 + RADEON_CRTC_VBLANK_STAT)); 221 224 } 222 225 223 226 void radeon_driver_irq_postinstall( drm_device_t *dev ) {