Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 323037
b: refs/heads/master
c: 6c06d60
h: refs/heads/master
i:
  323035: 394b8a1
v: v3
  • Loading branch information
Dave Airlie committed Sep 21, 2012
1 parent 901908f commit 8680f62
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8e910d08a2fd61e3c0baf82042c6f0e0a9773df4
refs/heads/master: 6c06d608ec244d9b030f16ce9088b4456197e1cb
16 changes: 16 additions & 0 deletions trunk/drivers/gpu/drm/nouveau/nv50_gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
* Authors: Ben Skeggs
*/

#include <linux/dmi.h>
#include "drmP.h"
#include "nouveau_drv.h"
#include "nouveau_hw.h"
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 8680f62

Please sign in to comment.