diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2015-08-20 07:54:23 +0300 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2015-08-28 05:40:48 +0300 |
commit | c7af0ff0e89327918743052d12bf5536e34c7f1a (patch) | |
tree | f08b84e8560ba540143d5a5a4b1cacc9e50ea881 /drivers/gpu/drm/nouveau/nvkm/subdev | |
parent | 7e8820fed712c6de1933dcc91edbf08dcec74925 (diff) | |
download | linux-c7af0ff0e89327918743052d12bf5536e34c7f1a.tar.xz |
drm/nouveau/device: import pciid list and integrate quirks with it
PCI IDs taken from the NVIDIA binary driver, with permission.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvkm/subdev')
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/subdev/gpio/base.c | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gk104.c | 6 |
2 files changed, 4 insertions, 6 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/gpio/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/gpio/base.c index 516a06b6b66a..d45ec99f0e38 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/gpio/base.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/gpio/base.c @@ -61,11 +61,11 @@ nvkm_gpio_find(struct nvkm_gpio *gpio, int idx, u8 tag, u8 line, return 0; /* Apple iMac G4 NV18 */ - if (nv_device_match(device, 0x0189, 0x10de, 0x0010)) { + if (device->quirk && device->quirk->tv_gpio) { if (tag == DCB_GPIO_TVDAC0) { *func = (struct dcb_gpio_func) { .func = DCB_GPIO_TVDAC0, - .line = 4, + .line = device->quirk->tv_gpio, .log[0] = 0, .log[1] = 1, }; diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gk104.c b/drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gk104.c index 584299737658..e33f5c03b9ac 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gk104.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gk104.c @@ -26,7 +26,6 @@ #include "priv.h" #include "fuc/gf119.fuc4.h" -#include <core/device.h> #include <core/option.h> #include <subdev/timer.h> @@ -78,9 +77,8 @@ gk104_pmu_pgob(struct nvkm_pmu *pmu, bool enable) nvkm_mask(device, 0x000200, 0x00001000, 0x00001000); nvkm_rd32(device, 0x000200); - if (nv_device_match(device, 0x11fc, 0x17aa, 0x2211) /* Lenovo W541 */ - || nv_device_match(device, 0x11fc, 0x17aa, 0x221e) /* Lenovo W541 */ - || nvkm_boolopt(device->cfgopt, "War00C800_0", false)) { + if ( nvkm_boolopt(device->cfgopt, "War00C800_0", + device->quirk ? device->quirk->War00C800_0 : false)) { nvkm_info(&pmu->subdev, "hw bug workaround enabled\n"); switch (device->chipset) { case 0xe4: |