Skip to content

Commit

Permalink
drm/nouveau/device: import pciid list and integrate quirks with it
Browse files Browse the repository at this point in the history
PCI IDs taken from the NVIDIA binary driver, with permission.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
  • Loading branch information
Ben Skeggs committed Aug 28, 2015
1 parent 7e8820f commit c7af0ff
Show file tree
Hide file tree
Showing 5 changed files with 1,577 additions and 26 deletions.
12 changes: 2 additions & 10 deletions drivers/gpu/drm/nouveau/dispnv04/tvnv17.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,16 +132,8 @@ get_tv_detect_quirks(struct drm_device *dev, uint32_t *pin_mask)
struct nouveau_drm *drm = nouveau_drm(dev);
struct nvkm_device *device = nvxx_device(&drm->device);

/* Zotac FX5200 */
if (nv_device_match(device, 0x0322, 0x19da, 0x1035) ||
nv_device_match(device, 0x0322, 0x19da, 0x2035)) {
*pin_mask = 0xc;
return false;
}

/* MSI nForce2 IGP */
if (nv_device_match(device, 0x01f0, 0x1462, 0x5710)) {
*pin_mask = 0xc;
if (device->quirk && device->quirk->tv_pin_mask) {
*pin_mask = device->quirk->tv_pin_mask;
return false;
}

Expand Down
11 changes: 3 additions & 8 deletions drivers/gpu/drm/nouveau/include/nvkm/core/device.h
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,9 @@ struct nvkm_device_func {
};

struct nvkm_device_quirk {
u8 tv_pin_mask;
u8 tv_gpio;
bool War00C800_0;
};

struct nvkm_device_chip {
Expand Down Expand Up @@ -217,14 +220,6 @@ int nvkm_device_list(u64 *name, int size);
_temp; \
})

static inline bool
nv_device_match(struct nvkm_device *device, u16 dev, u16 ven, u16 sub)
{
return device->pdev->device == dev &&
device->pdev->subsystem_vendor == ven &&
device->pdev->subsystem_device == sub;
}

static inline bool
nv_device_is_pci(struct nvkm_device *device)
{
Expand Down
Loading

0 comments on commit c7af0ff

Please sign in to comment.