From: Patrik Jakobsson Date: Fri, 26 Aug 2011 10:17:42 +0000 (+0100) Subject: gma500: Only register interrupt handler for poulsbo hardware X-Git-Tag: MMI-PSA29.97-13-9~18234^2^2~864^2~22 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ee8cc854e643cb1e77ccdc9f6a84201c4d3324de;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git gma500: Only register interrupt handler for poulsbo hardware First step in adding proper irq handling. We'll start with poulsbo support so make sure other chips don't touch drm_irq_install(). Signed-off-by: Patrik Jakobsson Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/gma500/psb_drv.c b/drivers/staging/gma500/psb_drv.c index b2cdce7b97ef..d91083a68188 100644 --- a/drivers/staging/gma500/psb_drv.c +++ b/drivers/staging/gma500/psb_drv.c @@ -410,7 +410,7 @@ static int psb_driver_load(struct drm_device *dev, unsigned long chipset) PSB_WVDC32(0x00000000, PSB_INT_ENABLE_R); PSB_WVDC32(0xFFFFFFFF, PSB_INT_MASK_R); spin_unlock_irqrestore(&dev_priv->irqmask_lock, irqflags); - if (drm_core_check_feature(dev, DRIVER_MODESET)) + if (IS_PSB(dev) && drm_core_check_feature(dev, DRIVER_MODESET)) drm_irq_install(dev); dev->vblank_disable_allowed = 1; diff --git a/drivers/staging/gma500/psb_drv.h b/drivers/staging/gma500/psb_drv.h index fd4732dd783a..8cd4f1a9ed39 100644 --- a/drivers/staging/gma500/psb_drv.h +++ b/drivers/staging/gma500/psb_drv.h @@ -43,6 +43,7 @@ enum { CHIP_MFLD_0130 = 3, /* Medfield */ }; +#define IS_PSB(dev) (((dev)->pci_device & 0xfffe) == 0x8108) #define IS_MRST(dev) (((dev)->pci_device & 0xfffc) == 0x4100) #define IS_MFLD(dev) (((dev)->pci_device & 0xfff8) == 0x0130)