search for: nouveau_is_optimus

Displaying 20 results from an estimated 22 matches for "nouveau_is_optimus".

2015 May 28
12
[PATCH v2 1/9] acpi: Rename v1 DSM to mux to avoid ambiguity
...ne NOUVEAU_DSM_OPTIMUS_FLAGS 0x1B @@ -43,7 +43,7 @@ #define OPTIMUS_HDA_CODEC_MASK (2 << 27) /* hda bios control */ static struct nouveau_dsm_priv { - bool dsm_detected; + bool mux_detected; bool optimus_detected; acpi_handle dhandle; acpi_handle rom_handle; @@ -53,15 +53,15 @@ bool nouveau_is_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_SWITCHER...
2015 May 25
15
[PATCH 1/8] acpi: Rename v1 DSM to mux to avoid ambiguity
...ne NOUVEAU_DSM_OPTIMUS_FLAGS 0x1B @@ -43,7 +43,7 @@ #define OPTIMUS_HDA_CODEC_MASK (2 << 27) /* hda bios control */ static struct nouveau_dsm_priv { - bool dsm_detected; + bool mux_detected; bool optimus_detected; acpi_handle dhandle; acpi_handle rom_handle; @@ -53,15 +53,15 @@ bool nouveau_is_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_SWITCHER...
2014 Mar 19
2
[PATCH] drm: compute runpm on load, don't register autosuspend for non-runpm
.../drm/nouveau_drm.c b/drm/nouveau_drm.c index 8f811a5..a6225ee 100644 --- a/drm/nouveau_drm.c +++ b/drm/nouveau_drm.c @@ -352,6 +352,10 @@ nouveau_drm_load(struct drm_device *dev, unsigned long flags) struct nouveau_drm *drm; int ret; + if (nouveau_runtime_pm == -1) + nouveau_runtime_pm = + nouveau_is_optimus() || nouveau_is_v1_dsm(); + ret = nouveau_cli_create(nouveau_name(dev), "DRM", sizeof(*drm), (void **)&drm); if (ret) @@ -443,7 +447,7 @@ nouveau_drm_load(struct drm_device *dev, unsigned long flags) nouveau_accel_init(drm); nouveau_fbcon_init(dev); - if (nouveau_runti...
2015 Jan 17
0
[PATCH RFC] nouveau: Add support for Gmux _DSM method
...mux_detected) return; vga_switcheroo_register_handler(&nouveau_dsm_handler); diff --git a/drm/nouveau_acpi.h b/drm/nouveau_acpi.h index 74acf0f..3668dce 100644 --- a/drm/nouveau_acpi.h +++ b/drm/nouveau_acpi.h @@ -6,6 +6,7 @@ #if defined(CONFIG_ACPI) && defined(CONFIG_X86) bool nouveau_is_optimus(void); bool nouveau_is_v1_dsm(void); +bool nouveau_has_gmux_dsm(void); void nouveau_register_dsm_handler(void); void nouveau_unregister_dsm_handler(void); void nouveau_switcheroo_optimus_dsm(void); @@ -15,6 +16,7 @@ void *nouveau_acpi_edid(struct drm_device *, struct drm_connector *); #else s...
2014 Mar 19
0
[PATCH] drm: compute runpm on load, don't register autosuspend for non-runpm
...m.c > +++ b/drm/nouveau_drm.c > @@ -352,6 +352,10 @@ nouveau_drm_load(struct drm_device *dev, unsigned long flags) > struct nouveau_drm *drm; > int ret; > > + if (nouveau_runtime_pm == -1) > + nouveau_runtime_pm = > + nouveau_is_optimus() || nouveau_is_v1_dsm(); > + > ret = nouveau_cli_create(nouveau_name(dev), "DRM", sizeof(*drm), > (void **)&drm); > if (ret) > @@ -443,7 +447,7 @@ nouveau_drm_load(struct drm_device *dev, unsigned long flags) >...
2015 May 28
3
[PATCH v2 8/9] acpi: Add support for Apple Gmux _DMS
..._vga.c b/drm/nouveau/nouveau_vga.c > index 9a6328f..7b13804 100644 > --- a/drm/nouveau/nouveau_vga.c > +++ b/drm/nouveau/nouveau_vga.c > @@ -36,7 +36,7 @@ nouveau_switcheroo_set_state(struct pci_dev *pdev, > { > struct drm_device *dev = pci_get_drvdata(pdev); > > - if ((nouveau_is_optimus() || nouveau_has_mux()) && state == > VGA_SWITCHEROO_OFF) If I understand it correctly, if the laptop is an Optimus one or has a mux, we are not "allowed" to opt-out of DynPwr/DynOff by powering down the card? In the same commit adding this conditional (5addcf0a5f0fadceba6bd56...
2017 Feb 24
1
[PATCH 3/5] drm/nouveau: Don't register Thunderbolt eGPU with vga_switcheroo
...gt; + return; I guess there's no way to move this inside 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_atta...
2017 Feb 24
0
[PATCH 3/5] drm/nouveau: Don't register Thunderbolt eGPU with vga_switcheroo
...m) 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() || 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...
2019 May 07
2
[PATCH 1/5] drm: don't set the pci power state if the pci subsystem handles the ACPI bits
...; - > + return true; > } > > void nouveau_unregister_dsm_handler(void) > diff --git a/drm/nouveau/nouveau_acpi.h b/drm/nouveau/nouveau_acpi.h > index b86294fc..09b2a82d 100644 > --- a/drm/nouveau/nouveau_acpi.h > +++ b/drm/nouveau/nouveau_acpi.h > @@ -9,7 +9,7 @@ bool nouveau_is_optimus(void); > bool nouveau_is_v1_dsm(void); > void nouveau_register_dsm_handler(void); > void nouveau_unregister_dsm_handler(void); > -void nouveau_switcheroo_optimus_dsm(void); > +bool nouveau_switcheroo_optimus_dsm(void); > int nouveau_acpi_get_bios_chunk(uint8_t *bios, int offse...
2020 Nov 24
1
[PATCH 09/15] drm/nouveau: Remove references to struct drm_device.pdev
...ci_is_thunderbolt_attached(pdev)) > return; > > - vga_switcheroo_register_client(dev->pdev, &nouveau_switcheroo_ops, runtime); > + 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; >...
2019 May 04
0
[PATCH 1/5] drm: don't set the pci power state if the pci subsystem handles the ACPI bits
...UVEAU_DSM_OPTIMUS_SET_POWERDOWN, &result); - + return true; } void nouveau_unregister_dsm_handler(void) diff --git a/drm/nouveau/nouveau_acpi.h b/drm/nouveau/nouveau_acpi.h index b86294fc..09b2a82d 100644 --- a/drm/nouveau/nouveau_acpi.h +++ b/drm/nouveau/nouveau_acpi.h @@ -9,7 +9,7 @@ bool nouveau_is_optimus(void); bool nouveau_is_v1_dsm(void); void nouveau_register_dsm_handler(void); void nouveau_unregister_dsm_handler(void); -void nouveau_switcheroo_optimus_dsm(void); +bool nouveau_switcheroo_optimus_dsm(void); int nouveau_acpi_get_bios_chunk(uint8_t *bios, int offset, int len); bool nouveau_acp...
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.
2019 May 07
0
[PATCH 1/5] drm: don't set the pci power state if the pci subsystem handles the ACPI bits
...gt; > > > void nouveau_unregister_dsm_handler(void) > > diff --git a/drm/nouveau/nouveau_acpi.h b/drm/nouveau/nouveau_acpi.h > > index b86294fc..09b2a82d 100644 > > --- a/drm/nouveau/nouveau_acpi.h > > +++ b/drm/nouveau/nouveau_acpi.h > > @@ -9,7 +9,7 @@ bool nouveau_is_optimus(void); > > bool nouveau_is_v1_dsm(void); > > void nouveau_register_dsm_handler(void); > > void nouveau_unregister_dsm_handler(void); > > -void nouveau_switcheroo_optimus_dsm(void); > > +bool nouveau_switcheroo_optimus_dsm(void); > > int nouveau_acpi_get_bios_...
2019 May 04
10
[PATCH 0/5] Potential fix for runpm issues on various laptops
While investigating the runpm issues on my GP107 I noticed that something inside devinit makes runpm break. If Nouveau loads up to the point right before doing devinit, runpm works without any issues, if devinit is ran, not anymore. Out of curiousity I even tried to "bisect" devinit by not running it on vbios provided signed PMU image, but on the devinit parser we have inside Nouveau.
2017 Jun 07
0
[PATCH][drm-next] drm/nouveau: fix non-ANSI function declaration of nouveau_pmops_runtime
....c index 7acd1cf8c5a6..90757af9bc73 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drm.c +++ b/drivers/gpu/drm/nouveau/nouveau_drm.c @@ -727,7 +727,7 @@ nouveau_pmops_thaw(struct device *dev) } bool -nouveau_pmops_runtime() +nouveau_pmops_runtime(void) { if (nouveau_runtime_pm == -1) return nouveau_is_optimus() || nouveau_is_v1_dsm(); -- 2.11.0
2017 Jun 09
0
[PATCH] drm/nouveau: use proper prototype in nouveau_pmops_runtime() definition
....c index 7acd1cf8c5a6..90757af9bc73 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drm.c +++ b/drivers/gpu/drm/nouveau/nouveau_drm.c @@ -727,7 +727,7 @@ nouveau_pmops_thaw(struct device *dev) } bool -nouveau_pmops_runtime() +nouveau_pmops_runtime(void) { if (nouveau_runtime_pm == -1) return nouveau_is_optimus() || nouveau_is_v1_dsm(); -- 2.9.0
2013 Dec 12
1
[PATCH] drm/nouveau: only runtime suspend by default in optimus configuration
...44 --- a/drivers/gpu/drm/nouveau/nouveau_drm.c +++ b/drivers/gpu/drm/nouveau/nouveau_drm.c @@ -858,6 +858,12 @@ static int nouveau_pmops_runtime_suspend(struct device *dev) if (nouveau_runtime_pm == 0) return -EINVAL; + /* are we optimus enabled? */ + if (nouveau_runtime_pm == -1 && !nouveau_is_optimus() && !nouveau_is_v1_dsm()) { + DRM_DEBUG_DRIVER("failing to power off - not optimus\n"); + return -EINVAL; + } + nv_debug_level(SILENT); drm_kms_helper_poll_disable(drm_dev); vga_switcheroo_set_dynamic_switch(pdev, VGA_SWITCHEROO_OFF); -- 1.8.3.2
2019 May 07
0
[PATCH v2 1/4] drm: don't set the pci power state if the pci subsystem handles the ACPI bits
...void nouveau_switcheroo_optimus_dsm(void); int nouveau_acpi_get_bios_chunk(uint8_t *bios, int offset, int len); bool nouveau_acpi_rom_supported(struct device *); void *nouveau_acpi_edid(struct drm_device *, struct drm_connector *); +bool nouveau_runpm_calls_dsm(void); #else static inline bool nouveau_is_optimus(void) { return false; }; static inline bool nouveau_is_v1_dsm(void) { return false; }; @@ -22,6 +23,7 @@ static inline void nouveau_switcheroo_optimus_dsm(void) {} static inline bool nouveau_acpi_rom_supported(struct device *dev) { return false; } static inline int nouveau_acpi_get_bios_chunk(ui...
2019 Jun 14
0
[PATCH] drm: don't set the pci power state if the pci subsystem handles the ACPI bits
...void nouveau_switcheroo_optimus_dsm(void); int nouveau_acpi_get_bios_chunk(uint8_t *bios, int offset, int len); bool nouveau_acpi_rom_supported(struct device *); void *nouveau_acpi_edid(struct drm_device *, struct drm_connector *); +bool nouveau_runpm_calls_dsm(void); #else static inline bool nouveau_is_optimus(void) { return false; }; static inline bool nouveau_is_v1_dsm(void) { return false; }; @@ -22,6 +23,7 @@ static inline void nouveau_switcheroo_optimus_dsm(void) {} static inline bool nouveau_acpi_rom_supported(struct device *dev) { return false; } static inline int nouveau_acpi_get_bios_chunk(ui...
2019 Jun 18
0
[PATCH v3] drm: don't set the pci power state if the pci subsystem handles the ACPI bits
...void nouveau_switcheroo_optimus_dsm(void); int nouveau_acpi_get_bios_chunk(uint8_t *bios, int offset, int len); bool nouveau_acpi_rom_supported(struct device *); void *nouveau_acpi_edid(struct drm_device *, struct drm_connector *); +bool nouveau_runpm_calls_dsm(void); #else static inline bool nouveau_is_optimus(void) { return false; }; static inline bool nouveau_is_v1_dsm(void) { return false; }; @@ -22,6 +23,7 @@ static inline void nouveau_switcheroo_optimus_dsm(void) {} static inline bool nouveau_acpi_rom_supported(struct device *dev) { return false; } static inline int nouveau_acpi_get_bios_chunk(ui...