search for: vga_client_register

Displaying 20 results from an estimated 42 matches for "vga_client_register".

2023 Jun 08
6
[PATCH v3 0/4] PCI/VGA: introduce is_boot_device function callback to vga_client_register
From: Sui Jingfeng <suijingfeng at loongson.cn> Patch 1,2 and 3 do basic clean up to the vgaarb module. Patch 4 introduce is_boot_device function callback to vga_client_register Sui Jingfeng (4): PCI/VGA: tidy up the code and comment format PCI/VGA: Use unsigned type for the io_state variable PCI/VGA: only deal with VGA class devices PCI/VGA: introduce is_boot_device function callback to vga_client_register drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +-...
2023 Jun 04
3
[PATCH v2 1/2] vgaarb: various coding style and comments fix
...control things like backlights etc. Hopefully newer multi-GPU laptops do * something saner, and desktops won't have any special ACPI for this. The * driver will get a callback when VGA arbitration is first used by userspace * since some older X servers have issues. @@ -988,7 +990,6 @@ int vga_client_register(struct pci_dev *pdev, bail: spin_unlock_irqrestore(&vga_lock, flags); return ret; - } EXPORT_SYMBOL(vga_client_register); diff --git a/include/linux/vgaarb.h b/include/linux/vgaarb.h index b4b9137f9792..d36225c582ee 100644 --- a/include/linux/vgaarb.h +++ b/include/linux/vgaarb.h @@ -2...
2023 Sep 04
15
[RFC, drm-misc-next v4 0/9] PCI/VGA: Allowing the user to select the primary video adapter at boot time
...a machine with multiple GPUs, a Linux user has no control over which one is primary at boot time. This series tries to solve above mentioned problem by introduced the ->be_primary() function stub. The specific device drivers can provide an implementation to hook up with this stub by calling the vga_client_register() function. Once the driver bound the device successfully, VGAARB will call back to the device driver. To query if the device drivers want to be primary or not. Device drivers can just pass NULL if have no such needs. Please note that: 1) The ARM64, Loongarch, Mips servers have a lot PCIe slot,...
2023 Jun 30
4
[PATCH v1 0/4] PCI/VGA: Improve the default VGA device selection
...ill a policy because it doesn't give the user a choice to override. With the observation that device drivers or video aperture helpers may have better knowledge about which PCI bar contains the firmware FB, This patch tries to solve the above problems by introducing a function callback to the vga_client_register() function interface. DRM device drivers for the PCI device need to register the is_boot_device() function callback during the driver loading time. Once the driver binds the device successfully, VRAARB will call back to the driver. This gives the device drivers a chance to provide accurate boot dev...
2023 Jun 09
1
[Intel-gfx] [PATCH v3 4/4] PCI/VGA: introduce is_boot_device function callback to vga_client_register
On Fri, Jun 09, 2023 at 10:27:39AM +0800, Sui Jingfeng wrote: > On 2023/6/9 03:19, Bjorn Helgaas wrote: > > On Thu, Jun 08, 2023 at 07:43:22PM +0800, Sui Jingfeng wrote: > > > From: Sui Jingfeng <suijingfeng at loongson.cn> > > > > > > The vga_is_firmware_default() function is arch-dependent, which doesn't > > > sound right. At least, it also
2017 Feb 24
1
[PATCH 3/5] drm/nouveau: Don't register Thunderbolt eGPU with vga_switcheroo
...rs/gpu/drm/nouveau/nouveau_vga.c b/drivers/gpu/drm/nouveau/nouveau_vga.c > index eef22c6b9665..c2a7fd606c2e 100644 > --- a/drivers/gpu/drm/nouveau/nouveau_vga.c > +++ b/drivers/gpu/drm/nouveau/nouveau_vga.c > @@ -95,6 +95,10 @@ nouveau_vga_init(struct nouveau_drm *drm) > > vga_client_register(dev->pdev, dev, NULL, nouveau_vga_set_decode); > > + /* don't register Thunderbolt eGPU with vga_switcheroo */ > + if (pci_is_thunderbolt_attached(dev->pdev)) > + return; I guess there's no way to move this inside vga_switcheroo_register_client()...
2020 Nov 24
1
[PATCH 09/15] drm/nouveau: Remove references to struct drm_device.pdev
...; struct drm_device *dev = drm->dev; > bool runtime = nouveau_pmops_runtime(); > + struct pci_dev *pdev; > > /* only relevant for PCI devices */ > - if (!dev->pdev) > + if (!dev_is_pci(dev->dev)) > return; > + pdev = to_pci_dev(dev->dev); > > - vga_client_register(dev->pdev, dev, NULL, nouveau_vga_set_decode); > + vga_client_register(pdev, dev, NULL, nouveau_vga_set_decode); > > /* don't register Thunderbolt eGPU with vga_switcheroo */ > - if (pci_is_thunderbolt_attached(dev->pdev)) > + if (pci_is_thunderbolt_attached(pdev)) >...
2017 Feb 24
0
[PATCH 3/5] drm/nouveau: Don't register Thunderbolt eGPU with vga_switcheroo
...1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_vga.c b/drivers/gpu/drm/nouveau/nouveau_vga.c index eef22c6b9665..c2a7fd606c2e 100644 --- a/drivers/gpu/drm/nouveau/nouveau_vga.c +++ b/drivers/gpu/drm/nouveau/nouveau_vga.c @@ -95,6 +95,10 @@ nouveau_vga_init(struct nouveau_drm *drm) vga_client_register(dev->pdev, dev, NULL, nouveau_vga_set_decode); + /* don't register Thunderbolt eGPU with vga_switcheroo */ + if (pci_is_thunderbolt_attached(dev->pdev)) + return; + if (nouveau_runtime_pm == 1) runtime = true; if ((nouveau_runtime_pm == -1) && (nouveau_is_optimus() || no...
2023 Jun 30
0
[PATCH v1 4/4] drm/radeon: Implement the is_boot_device callback function
...+} + /** * radeon_device_init - initialize the driver * @@ -1425,7 +1435,7 @@ int radeon_device_init(struct radeon_device *rdev, /* if we have > 1 VGA cards, then disable the radeon VGA resources */ /* this will fail for cards that aren't VGA class devices, just * ignore it */ - vga_client_register(rdev->pdev, radeon_vga_set_decode, NULL); + vga_client_register(rdev->pdev, radeon_vga_set_decode, radeon_is_boot_device); if (rdev->flags & RADEON_IS_PX) runtime = true; -- 2.25.1
2023 Jun 30
0
[PATCH v1 3/4] drm/amdgpu: Implement the is_boot_device callback function
...ize); +} + /** * amdgpu_device_init - initialize the driver * @@ -4082,7 +4091,8 @@ int amdgpu_device_init(struct amdgpu_device *adev, /* this will fail for cards that aren't VGA class devices, just * ignore it */ if ((adev->pdev->class >> 8) == PCI_CLASS_DISPLAY_VGA) - vga_client_register(adev->pdev, amdgpu_device_vga_set_decode, NULL); + vga_client_register(adev->pdev, amdgpu_device_vga_set_decode, + amdgpu_is_boot_device); px = amdgpu_device_supports_px(ddev); -- 2.25.1
2012 Mar 23
3
[PATCH 0/3] Prepare nouveau for other switcheroo handlers
While working on a vga_switcheroo handler for Apple's Macbook Pros I stumbled upon a few bugs regarding the usage of nouveau with other switcheroo handlers and module unloading, here are my fixes for them. Andreas Heider (3): drm/nouveau: Initialize has_optimus drm/nouveau: Check dsm on switcheroo unregister drm/nouveau: Unregister switcheroo client on exit
2017 Feb 24
6
[PATCH 0/5] Thunderbolt GPU fixes
Fix Thunderbolt-related issues in apple-gmux and vga_switcheroo: Patch [1/5] ("Recognize Thunderbolt devices") has already been subjected to a fair amount of scrutiny over at linux-pci@, I've submitted it 5 times total since May 2016. With luck it may be in ack-able shape now. Patch [2/5] amends apple-gmux to handle combined DP/Thunderbolt ports properly on newer MacBook Pros.
2014 Mar 19
2
[PATCH] drm: compute runpm on load, don't register autosuspend for non-runpm
...make sure it has a driver loaded */ if (drm->hdmi_device) { if (!drm->hdmi_device->driver) { diff --git a/drm/nouveau_vga.c b/drm/nouveau_vga.c index fb84da3..b00b05a 100644 --- a/drm/nouveau_vga.c +++ b/drm/nouveau_vga.c @@ -91,9 +91,7 @@ nouveau_vga_init(struct nouveau_drm *drm) vga_client_register(dev->pdev, dev, NULL, nouveau_vga_set_decode); - if (nouveau_runtime_pm == 1) - runtime = true; - if ((nouveau_runtime_pm == -1) && (nouveau_is_optimus() || nouveau_is_v1_dsm())) + if (nouveau_runtime_pm) runtime = true; vga_switcheroo_register_client(dev->pdev, &nouveau_s...
2023 Sep 06
1
[RFC, drm-misc-next v4 0/9] PCI/VGA: Allowing the user to select the primary video adapter at boot time
...ux user has no control over which >> one is primary at boot time. This series tries to solve above mentioned >> problem by introduced the ->be_primary() function stub. The specific >> device drivers can provide an implementation to hook up with this stub by >> calling the vga_client_register() function. >> >> Once the driver bound the device successfully, VGAARB will call back to >> the device driver. To query if the device drivers want to be primary or >> not. Device drivers can just pass NULL if have no such needs. >> >> Please note that: >>...
2016 Aug 30
4
[PATCH v2 2/2] vfio: add virtio pci quirk
...vdev->pdev->dev, > + "Failed to setup Virtio for VFIO\n"); > + vfio_del_group_dev(&pdev->dev); > + vfio_iommu_group_put(group, &pdev->dev); > + kfree(vdev); > + return ret; > + } > + } > + > if (vfio_pci_is_vga(pdev)) { > vga_client_register(pdev, vdev, NULL, vfio_pci_set_vga_decode); > vga_set_legacy_decoding(pdev, > diff --git a/drivers/vfio/pci/vfio_pci_virtio.c b/drivers/vfio/pci/vfio_pci_virtio.c > new file mode 100644 > index 0000000..e1ecffd > --- /dev/null > +++ b/drivers/vfio/pci/vfio_pci_virtio.c > @@...
2016 Aug 30
4
[PATCH v2 2/2] vfio: add virtio pci quirk
...vdev->pdev->dev, > + "Failed to setup Virtio for VFIO\n"); > + vfio_del_group_dev(&pdev->dev); > + vfio_iommu_group_put(group, &pdev->dev); > + kfree(vdev); > + return ret; > + } > + } > + > if (vfio_pci_is_vga(pdev)) { > vga_client_register(pdev, vdev, NULL, vfio_pci_set_vga_decode); > vga_set_legacy_decoding(pdev, > diff --git a/drivers/vfio/pci/vfio_pci_virtio.c b/drivers/vfio/pci/vfio_pci_virtio.c > new file mode 100644 > index 0000000..e1ecffd > --- /dev/null > +++ b/drivers/vfio/pci/vfio_pci_virtio.c > @@...
2017 Jun 09
0
[PATCH 3/3] drm/nouveau: Skip vga_fini on non-PCI device
...9 100644 --- a/drivers/gpu/drm/nouveau/nouveau_vga.c +++ b/drivers/gpu/drm/nouveau/nouveau_vga.c @@ -115,6 +115,10 @@ nouveau_vga_fini(struct nouveau_drm *drm) struct drm_device *dev = drm->dev; bool runtime = false; + /* only relevant for PCI devices */ + if (!dev->pdev) + return; + vga_client_register(dev->pdev, NULL, NULL, NULL); if (pci_is_thunderbolt_attached(dev->pdev)) -- 2.13.0
2014 Mar 19
0
[PATCH] drm: compute runpm on load, don't register autosuspend for non-runpm
...vice) { > if (!drm->hdmi_device->driver) { > diff --git a/drm/nouveau_vga.c b/drm/nouveau_vga.c > index fb84da3..b00b05a 100644 > --- a/drm/nouveau_vga.c > +++ b/drm/nouveau_vga.c > @@ -91,9 +91,7 @@ nouveau_vga_init(struct nouveau_drm *drm) > > vga_client_register(dev->pdev, dev, NULL, nouveau_vga_set_decode); > > - if (nouveau_runtime_pm == 1) > - runtime = true; > - if ((nouveau_runtime_pm == -1) && (nouveau_is_optimus() || nouveau_is_v1_dsm())) > + if (nouveau_runtime_pm) > runti...
2016 Apr 18
1
[PATCH RFC 3/3] vfio: add virtio pci quirk
...rn(&vdev->pdev->dev, > + "Failed to setup Virtio for VFIO\n"); > + vfio_del_group_dev(&pdev->dev); > + vfio_iommu_group_put(group, &pdev->dev); > + kfree(vdev); > + return ret; > + } > + > + > if (vfio_pci_is_vga(pdev)) { > vga_client_register(pdev, vdev, NULL, vfio_pci_set_vga_decode); > vga_set_legacy_decoding(pdev, > diff --git a/drivers/vfio/pci/vfio_pci_virtio.c b/drivers/vfio/pci/vfio_pci_virtio.c > new file mode 100644 > index 0000000..1a32064 > --- /dev/null > +++ b/drivers/vfio/pci/vfio_pci_virtio.c > @@...
2016 Apr 18
1
[PATCH RFC 3/3] vfio: add virtio pci quirk
...rn(&vdev->pdev->dev, > + "Failed to setup Virtio for VFIO\n"); > + vfio_del_group_dev(&pdev->dev); > + vfio_iommu_group_put(group, &pdev->dev); > + kfree(vdev); > + return ret; > + } > + > + > if (vfio_pci_is_vga(pdev)) { > vga_client_register(pdev, vdev, NULL, vfio_pci_set_vga_decode); > vga_set_legacy_decoding(pdev, > diff --git a/drivers/vfio/pci/vfio_pci_virtio.c b/drivers/vfio/pci/vfio_pci_virtio.c > new file mode 100644 > index 0000000..1a32064 > --- /dev/null > +++ b/drivers/vfio/pci/vfio_pci_virtio.c > @@...