search for: can_switch

Displaying 8 results from an estimated 8 matches for "can_switch".

2024 Aug 12
1
[PATCH v2 1/9] drm: Do delayed switcheroo in drm_lastclose()
...> > - update docs for vga_switcheroo_process_delayed_switch() > > > > Signed-off-by: Thomas Zimmermann <tzimmermann at suse.de> > > A bit an aside: The entire vgaswitcheroo code is still a midlayer mess, > where the locking is at the wrong layers resulting in the can_switch check > potentially being racy. But that's a different can of worms. Ok I got a bit annoyed about this mess again, and I think I have a reasonable idea for how to address it. Not sure why this took a decade, and definitely only pick this up if you're really bored. - We add a new vga_sw...
2024 Aug 12
1
[PATCH v2 1/9] drm: Do delayed switcheroo in drm_lastclose()
...gt; - update docs for vga_switcheroo_process_delayed_switch() >>> >>> Signed-off-by: Thomas Zimmermann <tzimmermann at suse.de> >> A bit an aside: The entire vgaswitcheroo code is still a midlayer mess, >> where the locking is at the wrong layers resulting in the can_switch check >> potentially being racy. But that's a different can of worms. > Ok I got a bit annoyed about this mess again, and I think I have a > reasonable idea for how to address it. Not sure why this took a decade, > and definitely only pick this up if you're really bored. No,...
2024 Aug 12
1
[PATCH v2 1/9] drm: Do delayed switcheroo in drm_lastclose()
...witcheroo_process_delayed_switch() > > > > > > > > Signed-off-by: Thomas Zimmermann <tzimmermann at suse.de> > > > A bit an aside: The entire vgaswitcheroo code is still a midlayer mess, > > > where the locking is at the wrong layers resulting in the can_switch check > > > potentially being racy. But that's a different can of worms. > > Ok I got a bit annoyed about this mess again, and I think I have a > > reasonable idea for how to address it. Not sure why this took a decade, > > and definitely only pick this up if you'...
2024 Aug 12
1
[PATCH v2 1/9] drm: Do delayed switcheroo in drm_lastclose()
...ange to drm_lastclose() (Sima) > - update docs for vga_switcheroo_process_delayed_switch() > > Signed-off-by: Thomas Zimmermann <tzimmermann at suse.de> A bit an aside: The entire vgaswitcheroo code is still a midlayer mess, where the locking is at the wrong layers resulting in the can_switch check potentially being racy. But that's a different can of worms. Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch> > --- > drivers/gpu/drm/drm_file.c | 4 ++++ > drivers/gpu/vga/vga_switcheroo.c | 3 +-- > 2 files changed, 5 insertions(+), 2 deletions(-) >...
2023 Jun 30
0
[PATCH v1 4/4] drm/radeon: Implement the is_boot_device callback function
...vga_switcheroo.h> #include <linux/vgaarb.h> +#include <drm/drm_aperture.h> #include <drm/drm_cache.h> #include <drm/drm_crtc_helper.h> #include <drm/drm_device.h> @@ -1263,6 +1264,15 @@ static const struct vga_switcheroo_client_ops radeon_switcheroo_ops = { .can_switch = radeon_switcheroo_can_switch, }; +static bool radeon_is_boot_device(struct pci_dev *pdev) +{ + struct drm_device *dev = pci_get_drvdata(pdev); + struct radeon_device *rdev = dev->dev_private; + struct radeon_mc *gmc = &rdev->mc; + + return drm_aperture_contain_firmware_fb(gmc->ape...
2024 Aug 12
3
[PATCH v2 1/9] drm: Do delayed switcheroo in drm_lastclose()
Amdgpu and nouveau call vga_switcheroo_process_delayed_switch() from their lastclose callbacks. Call it from drm_lastclose(), so that the driver functions can finally be removed. Only PCI devices with enabled switcheroo do the delayed switching. The call has no effect on other hardware. v2: - move change to drm_lastclose() (Sima) - update docs for vga_switcheroo_process_delayed_switch()
2023 Jun 30
4
[PATCH v1 0/4] PCI/VGA: Improve the default VGA device selection
From: Sui Jingfeng <suijingfeng at loongson.cn> Currently, the default VGA device selection is not perfect. Potential problems are: 1) This function is a no-op on non-x86 architectures. 2) It does not take the PCI Bar may get relocated into consideration. 3) It is not effective for the PCI device without a dedicated VRAM Bar. 4) It is device-agnostic, thus it has to waste the effort to
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
From: Sui Jingfeng <suijingfeng at loongson.cn> On 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