search for: nouveau_vga_fini

Displaying 20 results from an estimated 21 matches for "nouveau_vga_fini".

2013 Jul 24
4
[PATCH] [RFC] drm/nouveau: bring back hdmi audio device after switcheroo power down
...T_LIST_HEAD(&drm->clients); spin_lock_init(&drm->tile.lock); + nouveau_get_hdmi_dev(dev); + /* make sure AGP controller is in a consistent state before we * (possibly) execute vbios init tables (see nouveau_agp.h) */ @@ -400,6 +427,9 @@ fail_ttm: nouveau_agp_fini(drm); nouveau_vga_fini(drm); fail_device: + if (drm->hdmi_device) + pci_dev_put(drm->hdmi_device); + nouveau_cli_destroy(&drm->client); return ret; } @@ -424,6 +454,8 @@ nouveau_drm_unload(struct drm_device *dev) nouveau_agp_fini(drm); nouveau_vga_fini(drm); + if (drm->hdmi_device) + pci_dev...
2017 Feb 24
1
[PATCH 3/5] drm/nouveau: Don't register Thunderbolt eGPU with vga_switcheroo
...ide vga_switcheroo_register_client() instead of putting the test in all the drivers? > + > if (nouveau_runtime_pm == 1) > runtime = true; > if ((nouveau_runtime_pm == -1) && (nouveau_is_optimus() || nouveau_is_v1_dsm())) > @@ -111,6 +115,11 @@ nouveau_vga_fini(struct nouveau_drm *drm) > struct drm_device *dev = drm->dev; > bool runtime = false; > > + vga_client_register(dev->pdev, NULL, NULL, NULL); > + > + if (pci_is_thunderbolt_attached(dev->pdev)) > + return; > + > i...
2012 Sep 12
1
[PATCH] drm/nouveau: fix early vram corruption originating from vgacon
...te = drm; drm->dev = dev; @@ -336,6 +350,11 @@ nouveau_drm_load(struct drm_device *dev, unsigned long flags) nouveau_accel_init(drm); nouveau_fbcon_init(dev); + + console_lock(); + do_unblank_screen(1); + console_unlock(); + return 0; fail_dispinit: @@ -351,12 +370,20 @@ fail_ttm: nouveau_vga_fini(drm); fail_device: nouveau_cli_destroy(&drm->client); +fail_cli: + pci_write_config_byte(pdev, NV_PCI_VGAMEM_ENABLE, 1); + + console_lock(); + do_unblank_screen(1); + console_unlock(); + return ret; } static int nouveau_drm_unload(struct drm_device *dev) { + struct pci_dev *pdev =...
2017 Feb 24
0
[PATCH 3/5] drm/nouveau: Don't register Thunderbolt eGPU with vga_switcheroo
..._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() || nouveau_is_v1_dsm())) @@ -111,6 +115,11 @@ nouveau_vga_fini(struct nouveau_drm *drm) struct drm_device *dev = drm->dev; bool runtime = false; + vga_client_register(dev->pdev, NULL, NULL, NULL); + + if (pci_is_thunderbolt_attached(dev->pdev)) + return; + if (nouveau_runtime_pm == 1) runtime = true; if ((nouveau_runtime_pm == -1) &&...
2013 Jul 24
0
[PATCH] [RFC] drm/nouveau: bring back hdmi audio device after switcheroo power down
...k_init(&drm->tile.lock); > > + nouveau_get_hdmi_dev(dev); > + > /* make sure AGP controller is in a consistent state before we > * (possibly) execute vbios init tables (see nouveau_agp.h) > */ > @@ -400,6 +427,9 @@ fail_ttm: > nouveau_agp_fini(drm); > nouveau_vga_fini(drm); > fail_device: > + if (drm->hdmi_device) > + pci_dev_put(drm->hdmi_device); > + > nouveau_cli_destroy(&drm->client); > return ret; > } > @@ -424,6 +454,8 @@ nouveau_drm_unload(struct drm_device *dev) > nouveau_agp_fini(drm); > nouveau_vga_...
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.
2020 Nov 24
1
[PATCH 09/15] drm/nouveau: Remove references to struct drm_device.pdev
...time); > + vga_switcheroo_register_client(pdev, &nouveau_switcheroo_ops, runtime); > > if (runtime && nouveau_is_v1_dsm() && !nouveau_is_optimus()) > vga_switcheroo_init_domain_pm_ops(drm->dev->dev, &drm->vga_pm_domain); > @@ -109,17 +111,19 @@ nouveau_vga_fini(struct nouveau_drm *drm) > { > 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...
2016 Jul 20
0
[PATCH] GPU-DRM-nouveau: Delete an unnecessary check before the function call "pci_dev_put"
...rtion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c index 66c1280..7b09841 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drm.c +++ b/drivers/gpu/drm/nouveau/nouveau_drm.c @@ -525,8 +525,7 @@ nouveau_drm_unload(struct drm_device *dev) nouveau_vga_fini(drm); nvif_device_fini(&drm->device); - if (drm->hdmi_device) - pci_dev_put(drm->hdmi_device); + pci_dev_put(drm->hdmi_device); nouveau_cli_destroy(&drm->client); return 0; } -- 2.9.2
2017 Jun 09
0
[PATCH 3/3] drm/nouveau: Skip vga_fini on non-PCI device
...au/nouveau_vga.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/nouveau/nouveau_vga.c b/drivers/gpu/drm/nouveau/nouveau_vga.c index a4aacbc0cec8..b19dd4dc7099 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
2015 May 28
12
[PATCH v2 1/9] acpi: Rename v1 DSM to mux to avoid ambiguity
...u_switcheroo_ops, runtime); - if (runtime && nouveau_is_v1_dsm() && !nouveau_is_optimus()) + if (runtime && nouveau_has_mux() && !nouveau_is_optimus()) vga_switcheroo_init_domain_pm_ops(drm->dev->dev, &drm->vga_pm_domain); } @@ -112,11 +112,11 @@ nouveau_vga_fini(struct nouveau_drm *drm) if (nouveau_runtime_pm == 1) runtime = true; - if ((nouveau_runtime_pm == -1) && (nouveau_is_optimus() || nouveau_is_v1_dsm())) + if ((nouveau_runtime_pm == -1) && (nouveau_is_optimus() || nouveau_has_mux())) runtime = true; vga_switcheroo_unre...
2017 Jun 09
4
[PATCH 1/3] drm/nouveau/tegra: Skip manual unpowergating when not necessary
On Tegra186, powergating is handled by the BPMP power domain provider and the "legacy" powergating API is not available. Therefore skip these calls if we are attached to a power domain. Signed-off-by: Mikko Perttunen <mperttunen at nvidia.com> --- drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git
2020 Nov 03
4
[PATCH 0/3] drm/nouveau: fix a use-after-free in postclose()
This series fixes a number of use-after-frees in nouveau's postclose() handler. It was discovered by pointing IGT's core_hotunplug tests at a nouveau device, but the steps to reproduce it are simple: 1. Open the device file 2. Unbind the driver or remove the device 3. Close the file opened in step 1. During the device removal, the nouveau_drm structure is de-allocated, but is
2015 May 25
15
[PATCH 1/8] acpi: Rename v1 DSM to mux to avoid ambiguity
...u_switcheroo_ops, runtime); - if (runtime && nouveau_is_v1_dsm() && !nouveau_is_optimus()) + if (runtime && nouveau_has_mux() && !nouveau_is_optimus()) vga_switcheroo_init_domain_pm_ops(drm->dev->dev, &drm->vga_pm_domain); } @@ -112,11 +112,11 @@ nouveau_vga_fini(struct nouveau_drm *drm) if (nouveau_runtime_pm == 1) runtime = true; - if ((nouveau_runtime_pm == -1) && (nouveau_is_optimus() || nouveau_is_v1_dsm())) + if ((nouveau_runtime_pm == -1) && (nouveau_is_optimus() || nouveau_has_mux())) runtime = true; vga_switcheroo_unre...
2013 Aug 27
0
[PATCH 5/9] drm/nouveau: Add install/remove semantics for event handlers
...drm_unload(struct drm_device *dev) { struct nouveau_drm *drm = nouveau_drm(dev); + struct nouveau_disp *disp = nouveau_disp(drm->device); + int i; nouveau_fbcon_fini(dev); nouveau_accel_fini(drm); @@ -420,6 +429,10 @@ nouveau_drm_unload(struct drm_device *dev) nouveau_agp_fini(drm); nouveau_vga_fini(drm); + for (i = 0; i < ARRAY_SIZE(drm->vblank); i++) + nouveau_event_handler_remove(disp->vblank, i, + &drm->vblank[i]); + nouveau_cli_destroy(&drm->client); return 0; } -- 1.8.1.2
2015 May 28
3
[PATCH v2 8/9] acpi: Add support for Apple Gmux _DMS
...au_has_mux() && !nouveau_is_optimus()) > + if (runtime && (nouveau_has_mux() || nouveau_has_gmux()) && > !nouveau_is_optimus()) > vga_switcheroo_init_domain_pm_ops(drm->dev->dev, > &drm->vga_pm_domain); > } > > @@ -112,11 +112,11 @@ nouveau_vga_fini(struct nouveau_drm *drm) > > if (nouveau_runtime_pm == 1) > runtime = true; > - if ((nouveau_runtime_pm == -1) && (nouveau_is_optimus() || > nouveau_has_mux())) > + if ((nouveau_runtime_pm == -1) && nouveau_has_dsm()) > runtime = true; > > vg...
2018 Aug 23
3
[PATCH 0/3] drm/nouveau: Fixup module probe to add ->shutdown()
This series is intended to add support for shutting down the GPU on kernel shutdown/reboot using the ->shutdown() hook, similar to what amdgpu does. This is mainly intended to workaround a bios issue on the P50 that was preventing nouveau from initializing the dedicated GM107 GPU on that system properly. You can find more details on this issue in the patch labeled "Shut down GPU on kernel
2023 Nov 14
7
[PATCH v3 0/7] Improvements to pcie_bandwidth_available() for eGPUs
The wrong values are reported from pcie_bandwidth_available() which can cause problems for performance of eGPUs. This series overhauls Thunderbolt related device detection and uses the changes to change the behavior of pcie_bandwidth_available(). v2->v3: * Stop lumping all thunderbolt VSEC and USB4 devices together, introduce is_virtual_link instead * Drop unnecessary patches Mario
2020 Nov 06
4
[PATCH 0/3] drm/nouveau: extend the lifetime of nouveau_drm
Hi folks, Currently, when the device is removed (or the driver is unbound) the nouveau_drm structure de-allocated. However, it's still accessible from and used by some DRM layer callbacks. For example, file handles can be closed after the device has been removed (physically or otherwise). This series converts the Nouveau device structure to be allocated and de-allocated with the
2013 Aug 27
11
[PATCH 0/9] drm/nouveau: Cleanup event/handler design
This series was originally motivated by a deadlock, introduced in commit 1d7c71a3e2f77336df536855b0efd2dc5bdeb41b 'drm/nouveau/disp: port vblank handling to event interface', due to inverted lock order between nouveau_drm_vblank_enable() and nouveau_drm_vblank_handler() (the complete lockdep report is included in the patch 4/5 changelog). Because this series fixes the vblank event
2018 Mar 03
12
[PATCH v2 0/7] Modernize vga_switcheroo by using device link for HDA
Modernize vga_switcheroo by using a device link to enforce a runtime PM dependency from an HDA controller to the GPU it's integrated into, v2. Changes since v1: - Replace patch [1/7] to use pci_save_state() / pci_restore_state() for consistency between runtime PM code path of bound and unbound devices. (Rafael, Bjorn) - Patch [5/7]: Drop an unnecessary initialization. (Bjorn) Rephrase