Displaying 20 results from an estimated 125 matches for "switcheroo".
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...
2024 Aug 12
1
[PATCH v2 1/9] drm: Do delayed switcheroo in drm_lastclose()
...M +0200, Thomas Zimmermann wrote:
> Hi
> 
> Am 12.08.24 um 12:18 schrieb Daniel Vetter:
> > On Mon, Aug 12, 2024 at 11:23:44AM +0200, Daniel Vetter wrote:
> > > On Mon, Aug 12, 2024 at 10:28:22AM +0200, Thomas Zimmermann wrote:
> > > > 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...
2024 Aug 12
1
[PATCH v2 1/9] drm: Do delayed switcheroo in drm_lastclose()
Hi
Am 12.08.24 um 12:18 schrieb Daniel Vetter:
> On Mon, Aug 12, 2024 at 11:23:44AM +0200, Daniel Vetter wrote:
>> On Mon, Aug 12, 2024 at 10:28:22AM +0200, Thomas Zimmermann wrote:
>>> 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...
2024 Aug 12
1
[PATCH v2 1/9] drm: Do delayed switcheroo in drm_lastclose()
On Mon, Aug 12, 2024 at 11:23:44AM +0200, Daniel Vetter wrote:
> On Mon, Aug 12, 2024 at 10:28:22AM +0200, Thomas Zimmermann wrote:
> > 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.
> >...
2024 Aug 12
1
[PATCH v2 1/9] drm: Do delayed switcheroo in drm_lastclose()
On Mon, Aug 12, 2024 at 10:28:22AM +0200, Thomas Zimmermann wrote:
> 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 cha...
2013 Dec 01
0
3.12 nvidia switcheroo regression
...age-not-present fault. 3.11 works just nice.
It looks like I should add some debug, as there aren't event
enqueuing/dequeueing debug flags, or as you suggest?
http://quora.org/2013/dmesg.txt
http://quora.org/2013/config (same as the Ubuntu mainline config)
# echo OFF >/sys/kernel/debug/vgaswitcheroo/switch
hda-intel 0000:01:00.1: Disabling via VGA-switcheroo
hda-intel 0000:01:00.1: Cannot lock devices!
VGA switcheroo: switched nouveau off
nouveau [ DRM] suspending display...
general protection fault: 0000 [#1] SMP
Modules linked in: dm_crypt(F) parport_pc(F) snd_hda_codec_hdmi(F) ppdev(F)
lib8...
2013 Sep 10
6
[Bug 69180] New: Delays when using nouveau and switcheroo
https://bugs.freedesktop.org/show_bug.cgi?id=69180
          Priority: medium
            Bug ID: 69180
          Assignee: nouveau at lists.freedesktop.org
           Summary: Delays when using nouveau and switcheroo
        QA Contact: xorg-team at lists.x.org
          Severity: normal
    Classification: Unclassified
                OS: Linux (All)
          Reporter: a0vhv at t-online.de
          Hardware: x86 (IA32)
            Status: NEW
           Version: unspecified
         Component: Driver/nouveau...
2012 Nov 01
0
[PATCH] Fix nouveau hang after switcheroo
After switcherooing to integrated and starting X, when X fails to start
and causes a console switch, we get hit with a hanger (below). Fix
by checking if we're already in D3.
BUG: soft lockup - CPU#0 stuck for 22s! [Xorg:1703]
 [<ffffffffa037c538>] nv04_timer_read+0x28/0x70 [nouveau]
 [<ffffffffa037bf...
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)
- upd...
2013 Oct 26
4
[Bug 70895] New: BUG: soft lockup - CPU#0 stuck for 22s! [Xorg:1292] after disable descrete card with switcheroo
https://bugs.freedesktop.org/show_bug.cgi?id=70895
          Priority: medium
            Bug ID: 70895
          Assignee: nouveau at lists.freedesktop.org
           Summary: BUG: soft lockup - CPU#0 stuck for 22s! [Xorg:1292]
                    after disable descrete card with switcheroo
        QA Contact: xorg-team at lists.x.org
          Severity: normal
    Classification: Unclassified
                OS: All
          Reporter: mszpak at wp.pl
          Hardware: Other
            Status: NEW
           Version: unspecified
         Component: Driver/nouveau
           Produc...
2024 Aug 12
1
[PATCH v2 5/9] drm/nouveau: Implement switcheroo reprobe with drm_client_dev_hotplug()
...changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/nouveau/nouveau_vga.c b/drivers/gpu/drm/nouveau/nouveau_vga.c
index ee637f1fe03d..ab4e11dc0b8a 100644
--- a/drivers/gpu/drm/nouveau/nouveau_vga.c
+++ b/drivers/gpu/drm/nouveau/nouveau_vga.c
@@ -58,8 +58,9 @@ static void
 nouveau_switcheroo_reprobe(struct pci_dev *pdev)
 {
 	struct nouveau_drm *drm = pci_get_drvdata(pdev);
+	struct drm_device *dev = drm->dev;
 
-	drm_fb_helper_output_poll_changed(drm->dev);
+	drm_client_dev_hotplug(dev);
 }
 
 static bool
-- 
2.46.0
2024 Aug 12
1
[PATCH v2 5/9] drm/nouveau: Implement switcheroo reprobe with drm_client_dev_hotplug()
...n(-)
> 
> diff --git a/drivers/gpu/drm/nouveau/nouveau_vga.c b/drivers/gpu/drm/nouveau/nouveau_vga.c
> index ee637f1fe03d..ab4e11dc0b8a 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_vga.c
> +++ b/drivers/gpu/drm/nouveau/nouveau_vga.c
> @@ -58,8 +58,9 @@ static void
>   nouveau_switcheroo_reprobe(struct pci_dev *pdev)
>   {
>   	struct nouveau_drm *drm = pci_get_drvdata(pdev);
> +	struct drm_device *dev = drm->dev;
>   
> -	drm_fb_helper_output_poll_changed(drm->dev);
> +	drm_client_dev_hotplug(dev);
>   }
>   
>   static bool
2024 Aug 12
1
[PATCH v2 5/9] drm/nouveau: Implement switcheroo reprobe with drm_client_dev_hotplug()
...rivers/gpu/drm/nouveau/nouveau_vga.c 
>> b/drivers/gpu/drm/nouveau/nouveau_vga.c
>> index ee637f1fe03d..ab4e11dc0b8a 100644
>> --- a/drivers/gpu/drm/nouveau/nouveau_vga.c
>> +++ b/drivers/gpu/drm/nouveau/nouveau_vga.c
>> @@ -58,8 +58,9 @@ static void
>> ? nouveau_switcheroo_reprobe(struct pci_dev *pdev)
>> ? {
>> ????? struct nouveau_drm *drm = pci_get_drvdata(pdev);
>> +??? struct drm_device *dev = drm->dev;
>> ? -??? drm_fb_helper_output_poll_changed(drm->dev);
>> +??? drm_client_dev_hotplug(dev);
>> ? }
>> ? ? static...
2013 Jul 24
0
[PATCH] [RFC] drm/nouveau: bring back hdmi audio device after switcheroo power down
Op 24-07-13 09:13, Dave Airlie schreef:
> After a full device powerdown via the optimus power switch, we seem
> to lose the HDMI device completely on power on, this keep track of
> whether we had a hdmi audio sub function device at power on, and
> pokes a magic register to make it reappear after the optimus power
> switch is thrown.
>
> This at least works on my NVC4 machine,
2013 Mar 03
5
[Bug 61765] New: Regression: null pointer dereference on reboot after switcheroo use
https://bugs.freedesktop.org/show_bug.cgi?id=61765
          Priority: medium
            Bug ID: 61765
          Assignee: nouveau at lists.freedesktop.org
           Summary: Regression: null pointer dereference on reboot after
                    switcheroo use
        QA Contact: xorg-team at lists.x.org
          Severity: major
    Classification: Unclassified
                OS: Linux (All)
          Reporter: crrodriguez at opensuse.org
          Hardware: x86-64 (AMD64)
            Status: NEW
           Version: git
         Component: Driver/n...
2015 May 25
15
[PATCH 1/8] acpi: Rename v1 DSM to mux to avoid ambiguity
..._optimus(void) {
 	return nouveau_dsm_priv.optimus_detected;
 }
 
-bool nouveau_is_v1_dsm(void) {
-	return nouveau_dsm_priv.dsm_detected;
+bool nouveau_has_mux(void) {
+	return nouveau_dsm_priv.mux_detected;
 }
 
 #define NOUVEAU_DSM_HAS_MUX 0x1
 #define NOUVEAU_DSM_HAS_OPT 0x2
 
 #ifdef CONFIG_VGA_SWITCHEROO
-static const char nouveau_dsm_muid[] = {
+static const char nouveau_mux_dsm_muid[] = {
 	0xA0, 0xA0, 0x95, 0x9D, 0x60, 0x00, 0x48, 0x4D,
 	0xB3, 0x4D, 0x7E, 0x5F, 0xEA, 0x12, 0x9F, 0xD4,
 };
@@ -128,7 +128,7 @@ static int nouveau_check_optimus_dsm(acpi_handle handle)
 	return result & 1 &&...
2018 Aug 13
3
[PATCH 0/3] Cleanup drm_kms_helper_poll_enable/disable() calls
Does what it says on the label, a lot of these calls are already handled
somewhere else and don't appear to be here for a legitimate reason
anymore.
Lyude Paul (3):
  drm/nouveau: Remove useless poll_enable() call in
    switcheroo_set_state()
  drm/nouveau: Remove useless poll_disable() call in
    switcheroo_set_state()
  drm/nouveau: Remove useless poll_enable() call in drm_load()
 drivers/gpu/drm/nouveau/nouveau_drm.c | 4 +---
 drivers/gpu/drm/nouveau/nouveau_vga.c | 2 --
 2 files changed, 1 insertion(+), 5 deletions(-)...
2017 Feb 28
0
[PATCH 3/3] gpu: drm: drivers: Convert printk(KERN_<LEVEL> to pr_<level>
...44
--- a/drivers/gpu/drm/nouveau/nouveau_acpi.c
+++ b/drivers/gpu/drm/nouveau/nouveau_acpi.c
@@ -326,7 +326,7 @@ static bool nouveau_dsm_detect(void)
 		nouveau_dsm_priv.dhandle = dhandle;
 		acpi_get_name(nouveau_dsm_priv.dhandle, ACPI_FULL_PATHNAME,
 			&buffer);
-		printk(KERN_INFO "VGA switcheroo: detected Optimus DSM method %s handle\n",
+		pr_info("VGA switcheroo: detected Optimus DSM method %s handle\n",
 			acpi_method_name);
 		if (has_power_resources)
 			pr_info("nouveau: detected PR support, will not use DSM\n");
@@ -338,7 +338,7 @@ static bool nouveau_dsm_d...
2018 Aug 15
3
[PATCH v3 0/3] Cleanup drm_kms_helper_poll_enable/disable() calls
Next version of https://patchwork.freedesktop.org/series/48131/
Only changes are new A-Bs and R-Bs
Lyude Paul (3):
  drm/nouveau: Remove useless poll_enable() call in
    switcheroo_set_state()
  drm/nouveau: Remove useless poll_disable() call in
    switcheroo_set_state()
  drm/nouveau: Remove useless poll_enable() call in drm_load()
 drivers/gpu/drm/nouveau/nouveau_drm.c | 4 +---
 drivers/gpu/drm/nouveau/nouveau_vga.c | 2 --
 2 files changed, 1 insertion(+), 5 deletions(-)...
2013 Jul 24
4
[PATCH] [RFC] drm/nouveau: bring back hdmi audio device after switcheroo power down
...ouveau_drm(dev);
+	struct nouveau_device *device = nv_device(drm->device);
+	uint32_t val;
+
+	if (!drm->hdmi_device)
+		return;
+
+	/* write magic value into magic place */
+	val = nv_rd32(device, 0x88488);
+	val |= (1 << 25);
+	nv_wr32(device, 0x88488, val);
+}
+
+static void
 nouveau_switcheroo_set_state(struct pci_dev *pdev,
 			     enum vga_switcheroo_state state)
 {
@@ -37,6 +53,7 @@ nouveau_switcheroo_set_state(struct pci_dev *pdev,
 		dev->switch_power_state = DRM_SWITCH_POWER_CHANGING;
 		nouveau_pmops_resume(&pdev->dev);
 		drm_kms_helper_poll_enable(dev);
+		nouveau_ree...