From 8680f62817d2b3783e7f8fbeaafb24523e286c91 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Fri, 21 Sep 2012 09:19:50 -0400 Subject: [PATCH] --- yaml --- r: 323037 b: refs/heads/master c: 6c06d608ec244d9b030f16ce9088b4456197e1cb h: refs/heads/master i: 323035: 394b8a1f66aaabed210c521e07ed4059d85d96e7 v: v3 --- [refs] | 2 +- trunk/drivers/gpu/drm/nouveau/nv50_gpio.c | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 68505ce8371c..a9ab0bd1badd 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 8e910d08a2fd61e3c0baf82042c6f0e0a9773df4 +refs/heads/master: 6c06d608ec244d9b030f16ce9088b4456197e1cb diff --git a/trunk/drivers/gpu/drm/nouveau/nv50_gpio.c b/trunk/drivers/gpu/drm/nouveau/nv50_gpio.c index f429e6a8ca7a..c399d510b27a 100644 --- a/trunk/drivers/gpu/drm/nouveau/nv50_gpio.c +++ b/trunk/drivers/gpu/drm/nouveau/nv50_gpio.c @@ -22,6 +22,7 @@ * Authors: Ben Skeggs */ +#include #include "drmP.h" #include "nouveau_drv.h" #include "nouveau_hw.h" @@ -110,11 +111,26 @@ nv50_gpio_isr(struct drm_device *dev) nv_wr32(dev, 0xe074, intr1); } +static struct dmi_system_id gpio_reset_ids[] = { + { + .ident = "Apple Macbook 10,1", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."), + DMI_MATCH(DMI_PRODUCT_NAME, "MacBookPro10,1"), + } + }, + { } +}; + int nv50_gpio_init(struct drm_device *dev) { struct drm_nouveau_private *dev_priv = dev->dev_private; + /* initialise gpios and routing to vbios defaults */ + if (dmi_check_system(gpio_reset_ids)) + nouveau_gpio_reset(dev); + /* disable, and ack any pending gpio interrupts */ nv_wr32(dev, 0xe050, 0x00000000); nv_wr32(dev, 0xe054, 0xffffffff);