Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c7af0ff0 authored by Ben Skeggs's avatar Ben Skeggs
Browse files

drm/nouveau/device: import pciid list and integrate quirks with it



PCI IDs taken from the NVIDIA binary driver, with permission.

Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent 7e8820fe
Loading
Loading
Loading
Loading
+2 −10
Original line number Diff line number Diff line
@@ -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;
	}

+3 −8
Original line number Diff line number Diff line
@@ -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 {
@@ -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)
{