search for: nouveau_is_v1_dsm

Displaying 20 results from an estimated 29 matches for "nouveau_is_v1_dsm".

2014 Mar 19
2
[PATCH] drm: compute runpm on load, don't register autosuspend for non-runpm
.../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_runtime_pm != 0) { + if (nou...
2015 Jan 17
0
[PATCH RFC] nouveau: Add support for Gmux _DSM method
.../ #define OPTIMUS_ENABLED (1 << 0) #define OPTIMUS_STATUS_MASK (3 << 3) @@ -45,6 +47,7 @@ static struct nouveau_dsm_priv { bool dsm_detected; bool optimus_detected; + bool gmux_detected; acpi_handle dhandle; acpi_handle rom_handle; } nouveau_dsm_priv; @@ -57,8 +60,13 @@ bool nouveau_is_v1_dsm(void) { return nouveau_dsm_priv.dsm_detected; } -#define NOUVEAU_DSM_HAS_MUX 0x1 -#define NOUVEAU_DSM_HAS_OPT 0x2 +bool nouveau_has_gmux_dsm(void) { + return nouveau_dsm_priv.gmux_detected; +} + +#define NOUVEAU_DSM_HAS_MUX 0x1 +#define NOUVEAU_DSM_HAS_OPT 0x2 +#define NOUVEAU_DSM_HAS_GMUX 0...
2014 Mar 19
0
[PATCH] drm: compute runpm on load, don't register autosuspend for non-runpm
...au_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(dr...
2017 Feb 24
1
[PATCH 3/5] drm/nouveau: Don't register Thunderbolt eGPU with vga_switcheroo
...rn; 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_attached(dev->pdev)) &gt...
2017 Feb 24
0
[PATCH 3/5] drm/nouveau: Don't register Thunderbolt eGPU with vga_switcheroo
...er(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 == 1) runtime = tru...
2019 May 07
2
[PATCH 1/5] drm: don't set the pci power state if the pci subsystem handles the ACPI bits
...> 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_acpi...
2020 Nov 24
1
[PATCH 09/15] drm/nouveau: Remove references to struct drm_device.pdev
...ched(dev->pdev)) > + if (pci_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(); &g...
2015 May 28
12
[PATCH v2 1/9] acpi: Rename v1 DSM to mux to avoid ambiguity
...K (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_SWITCHEROO -static const char nouveau_dsm_muid[] = { +static const char nouveau_mux_dsm_m...
2015 May 25
15
[PATCH 1/8] acpi: Rename v1 DSM to mux to avoid ambiguity
...K (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_SWITCHEROO -static const char nouveau_dsm_muid[] = { +static const char nouveau_mux_dsm_m...
2019 May 04
0
[PATCH 1/5] drm: don't set the pci power state if the pci subsystem handles the ACPI bits
...&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_acpi_rom_supported(struct device *...
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
...r_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)...
2016 May 14
1
[PATCH] drm/nouveau: check function before using it
...vers/gpu/drm/nouveau/nouveau_acpi.c +++ b/drivers/gpu/drm/nouveau/nouveau_acpi.c @@ -45,6 +45,7 @@ static struct nouveau_dsm_priv { bool dsm_detected; bool optimus_detected; + bool flags_func_detected; acpi_handle dhandle; acpi_handle rom_handle; } nouveau_dsm_priv; @@ -58,7 +59,6 @@ bool nouveau_is_v1_dsm(void) { } #define NOUVEAU_DSM_HAS_MUX 0x1 -#define NOUVEAU_DSM_HAS_OPT 0x2 #ifdef CONFIG_VGA_SWITCHEROO static const char nouveau_dsm_muid[] = { @@ -110,9 +110,9 @@ static int nouveau_optimus_dsm(acpi_handle handle, int func, int arg, uint32_t * * requirements on the fourth parameter, so...
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
...0757af9bc73 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
...0757af9bc73 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
...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
2016 Jul 07
0
[PATCH v2 1/4] drm/nouveau/acpi: ensure matching ACPI handle and supported functions
...----------- 1 file changed, 26 insertions(+), 32 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_acpi.c b/drivers/gpu/drm/nouveau/nouveau_acpi.c index db76b94..886a67c 100644 --- a/drivers/gpu/drm/nouveau/nouveau_acpi.c +++ b/drivers/gpu/drm/nouveau/nouveau_acpi.c @@ -57,9 +57,6 @@ bool nouveau_is_v1_dsm(void) { return nouveau_dsm_priv.dsm_detected; } -#define NOUVEAU_DSM_HAS_MUX 0x1 -#define NOUVEAU_DSM_HAS_OPT 0x2 - #ifdef CONFIG_VGA_SWITCHEROO static const char nouveau_dsm_muid[] = { 0xA0, 0xA0, 0x95, 0x9D, 0x60, 0x00, 0x48, 0x4D, @@ -212,26 +209,33 @@ static const struct vga_switcheroo...
2016 Jul 15
0
[PATCH v3 1/4] drm/nouveau/acpi: ensure matching ACPI handle and supported functions
...----------- 1 file changed, 26 insertions(+), 32 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_acpi.c b/drivers/gpu/drm/nouveau/nouveau_acpi.c index db76b94..886a67c 100644 --- a/drivers/gpu/drm/nouveau/nouveau_acpi.c +++ b/drivers/gpu/drm/nouveau/nouveau_acpi.c @@ -57,9 +57,6 @@ bool nouveau_is_v1_dsm(void) { return nouveau_dsm_priv.dsm_detected; } -#define NOUVEAU_DSM_HAS_MUX 0x1 -#define NOUVEAU_DSM_HAS_OPT 0x2 - #ifdef CONFIG_VGA_SWITCHEROO static const char nouveau_dsm_muid[] = { 0xA0, 0xA0, 0x95, 0x9D, 0x60, 0x00, 0x48, 0x4D, @@ -212,26 +209,33 @@ static const struct vga_switcheroo...
2019 May 07
0
[PATCH v2 1/4] drm: don't set the pci power state if the pci subsystem handles the ACPI bits
...t_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(uint8_t *bios, int offset, int len) { return -EINVAL; } static i...