Displaying 20 results from an estimated 24 matches for "vga_switcheroo_handler_flags".
2016 May 21
3
[PATCH v5] vga_switcheroo: Add helper for deferred probing
...ENODEV;
- /*
- * apple-gmux is needed on dual GPU MacBook Pro
- * to probe the panel if we're the inactive GPU.
- */
- if (IS_ENABLED(CONFIG_VGA_ARB) && IS_ENABLED(CONFIG_VGA_SWITCHEROO) &&
- apple_gmux_present() && pdev != vga_default_device() &&
- !vga_switcheroo_handler_flags())
+ if (vga_switcheroo_client_probe_defer(pdev))
return -EPROBE_DEFER;
return drm_get_pci_dev(pdev, ent, &driver);
diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c
index 11f8dd9..5c4d4df 100644
--- a/drivers/gpu/drm/nouveau/nouveau_drm.c
+++ b/d...
2018 Aug 30
2
[PATCH v2] drm/nouveau: Fix nouveau_connector_ddc_detect()
...r->dcb->type == DCB_OUTPUT_DP) {
- int ret = nouveau_dp_detect(nv_encoder);
+ switch (nv_encoder->dcb->type) {
+ case DCB_OUTPUT_DP:
+ ret = nouveau_dp_detect(nv_encoder);
if (ret == NOUVEAU_DP_MST)
return NULL;
- if (ret == NOUVEAU_DP_SST)
- break;
- } else
- if ((vga_switcheroo_handler_flags() &
- VGA_SWITCHEROO_CAN_SWITCH_DDC) &&
- nv_encoder->dcb->type == DCB_OUTPUT_LVDS &&
- nv_encoder->i2c) {
- int ret;
- vga_switcheroo_lock_ddc(dev->pdev);
- ret = nvkm_probe_i2c(nv_encoder->i2c, 0x50);
- vga_switcheroo_unlock_ddc(dev->p...
2016 Jan 11
0
[PATCH v5 01/12] vga_switcheroo: Add handler flags infrastructure
...DocBook/gpu.tmpl
index 9e95aa1..88e7c39 100644
--- a/Documentation/DocBook/gpu.tmpl
+++ b/Documentation/DocBook/gpu.tmpl
@@ -3648,6 +3648,7 @@ int num_ioctls;</synopsis>
</sect1>
<sect1>
<title>Public constants</title>
+!Finclude/linux/vga_switcheroo.h vga_switcheroo_handler_flags_t
!Finclude/linux/vga_switcheroo.h vga_switcheroo_client_id
!Finclude/linux/vga_switcheroo.h vga_switcheroo_state
</sect1>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c
index 3c89586..fa948dc 100644
--- a/drivers/gpu/dr...
2016 Jan 11
8
[PATCH v5 00/12] Enable GPU switching on pre-retina MacBook Pro
...n.
Caution: Patch [09/12] depends on a new acpi_dev_present() API which
will land in 4.5 via Rafael J. Wysocki's tree.
I would particularly be interested in feedback on the handler flags
patch [01/12]. I'm not 100% happy with the number of characters
required to query the flags (e.g.: if (vga_switcheroo_handler_flags() &
VGA_SWITCHEROO_CAN_SWITCH_DDC)), but failed to come up with something
shorter. Thierry Reding used a struct of bools instead of a bitmask
for his recent drm_dp_link_caps patches. Maybe use that instead?
http://lists.freedesktop.org/archives/dri-devel/2015-December/097025.html
Thanks,
Luka...
2016 May 23
0
[Intel-gfx] [PATCH v5] vga_switcheroo: Add helper for deferred probing
...-gmux is needed on dual GPU MacBook Pro
> - * to probe the panel if we're the inactive GPU.
> - */
> - if (IS_ENABLED(CONFIG_VGA_ARB) && IS_ENABLED(CONFIG_VGA_SWITCHEROO) &&
> - apple_gmux_present() && pdev != vga_default_device() &&
> - !vga_switcheroo_handler_flags())
> + if (vga_switcheroo_client_probe_defer(pdev))
> return -EPROBE_DEFER;
>
> return drm_get_pci_dev(pdev, ent, &driver);
> diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c
> index 11f8dd9..5c4d4df 100644
> --- a/drivers/gp...
2016 May 19
2
[PATCH v4] vga_switcheroo: Add helper for deferred probing
...ENODEV;
- /*
- * apple-gmux is needed on dual GPU MacBook Pro
- * to probe the panel if we're the inactive GPU.
- */
- if (IS_ENABLED(CONFIG_VGA_ARB) && IS_ENABLED(CONFIG_VGA_SWITCHEROO) &&
- apple_gmux_present() && pdev != vga_default_device() &&
- !vga_switcheroo_handler_flags())
+ if (vga_switcheroo_client_probe_defer(pdev))
return -EPROBE_DEFER;
return drm_get_pci_dev(pdev, ent, &driver);
diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c
index db5c7d0..a0bb1d0 100644
--- a/drivers/gpu/drm/nouveau/nouveau_drm.c
+++ b/d...
2016 Jan 11
0
[PATCH v5 11/12] drm/nouveau: Defer probe if gmux is present but its driver isn't
...ily switch DDC so that we can probe the panel's EDID.
The checks for CONFIG_VGA_ARB and CONFIG_VGA_SWITCHEROO are necessary
because if either of them is disabled but gmux is present, the driver
would never load, even if we're the active GPU. (vga_default_device()
would evaluate to NULL and vga_switcheroo_handler_flags() would
evaluate to 0.)
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=88861
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=61115
Tested-by: Lukas Wunner <lukas at wunner.de>
[MBP 9,1 2012 intel IVB + nvidia GK107 pre-retina 15"]
Signed-off-by: Lukas Wunner <lu...
2016 May 31
2
[PATCH v6 1/2] vga_switcheroo: Add helper for deferred probing
...ENODEV;
- /*
- * apple-gmux is needed on dual GPU MacBook Pro
- * to probe the panel if we're the inactive GPU.
- */
- if (IS_ENABLED(CONFIG_VGA_ARB) && IS_ENABLED(CONFIG_VGA_SWITCHEROO) &&
- apple_gmux_present() && pdev != vga_default_device() &&
- !vga_switcheroo_handler_flags())
+ if (vga_switcheroo_client_probe_defer(pdev))
return -EPROBE_DEFER;
return drm_get_pci_dev(pdev, ent, &driver);
diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c
index 11f8dd9..5c4d4df 100644
--- a/drivers/gpu/drm/nouveau/nouveau_drm.c
+++ b/d...
2018 Aug 23
0
[PATCH] drm/nouveau: Fix nouveau_connector_ddc_detect()
...r->dcb->type == DCB_OUTPUT_DP) {
- int ret = nouveau_dp_detect(nv_encoder);
+ switch (nv_encoder->dcb->type) {
+ case DCB_OUTPUT_DP:
+ ret = nouveau_dp_detect(nv_encoder);
if (ret == NOUVEAU_DP_MST)
return NULL;
- if (ret == NOUVEAU_DP_SST)
- break;
- } else
- if ((vga_switcheroo_handler_flags() &
- VGA_SWITCHEROO_CAN_SWITCH_DDC) &&
- nv_encoder->dcb->type == DCB_OUTPUT_LVDS &&
- nv_encoder->i2c) {
- int ret;
+ else if (ret == NOUVEAU_DP_SST)
+ found = nv_encoder;
+
+ break;
+ case DCB_OUTPUT_LVDS:
+ /* Can we actually probe this L...
2016 Jan 11
0
[PATCH v5 07/12] drm/nouveau: Switch DDC when reading the EDID
...de <acpi/button.h>
#include <linux/pm_runtime.h>
+#include <linux/vga_switcheroo.h>
#include <drm/drmP.h>
#include <drm/drm_edid.h>
@@ -153,6 +154,17 @@ nouveau_connector_ddc_detect(struct drm_connector *connector)
if (ret == 0)
break;
} else
+ if ((vga_switcheroo_handler_flags() &
+ VGA_SWITCHEROO_CAN_SWITCH_DDC) &&
+ nv_encoder->dcb->type == DCB_OUTPUT_LVDS &&
+ nv_encoder->i2c) {
+ int ret;
+ vga_switcheroo_lock_ddc(dev->pdev);
+ ret = nvkm_probe_i2c(nv_encoder->i2c, 0x50);
+ vga_switcheroo_unlock_ddc(dev->p...
2018 Aug 30
0
[PATCH v2] drm/nouveau: Fix nouveau_connector_ddc_detect()
...t ret = nouveau_dp_detect(nv_encoder);
> + switch (nv_encoder->dcb->type) {
> + case DCB_OUTPUT_DP:
> + ret = nouveau_dp_detect(nv_encoder);
> if (ret == NOUVEAU_DP_MST)
> return NULL;
> - if (ret == NOUVEAU_DP_SST)
> - break;
> - } else
> - if ((vga_switcheroo_handler_flags() &
> - VGA_SWITCHEROO_CAN_SWITCH_DDC) &&
> - nv_encoder->dcb->type == DCB_OUTPUT_LVDS &&
> - nv_encoder->i2c) {
> - int ret;
> - vga_switcheroo_lock_ddc(dev->pdev);
> - ret = nvkm_probe_i2c(nv_encoder->i2c, 0x50);
> -...
2018 Jun 30
2
[PATCH v2 5/9] drm/nouveau: Use drm_connector_for_each_possible_encoder()
...AU_DP_MST)
52aa30f25 Ben Skeggs 2016-11-04 437 return NULL;
52aa30f25 Ben Skeggs 2016-11-04 438 if (ret == NOUVEAU_DP_SST)
8777c5c11 Ben Skeggs 2014-06-06 439 break;
8777c5c11 Ben Skeggs 2014-06-06 440 } else
39c1c9011 Lukas Wunner 2016-01-11 441 if ((vga_switcheroo_handler_flags() &
39c1c9011 Lukas Wunner 2016-01-11 442 VGA_SWITCHEROO_CAN_SWITCH_DDC) &&
39c1c9011 Lukas Wunner 2016-01-11 443 nv_encoder->dcb->type == DCB_OUTPUT_LVDS &&
39c1c9011 Lukas Wunner 2016-01-11 444 nv_encoder->i2c) {
39c1c9011 Lukas Wunne...
2016 Feb 08
0
[PATCH v5 00/12] Enable GPU switching on pre-retina MacBook Pro
...] depends on a new acpi_dev_present() API which
> will land in 4.5 via Rafael J. Wysocki's tree.
>
> I would particularly be interested in feedback on the handler flags
> patch [01/12]. I'm not 100% happy with the number of characters
> required to query the flags (e.g.: if (vga_switcheroo_handler_flags() &
> VGA_SWITCHEROO_CAN_SWITCH_DDC)), but failed to come up with something
> shorter. Thierry Reding used a struct of bools instead of a bitmask
> for his recent drm_dp_link_caps patches. Maybe use that instead?
> http://lists.freedesktop.org/archives/dri-devel/2015-December/097025...
2016 Feb 09
0
[PATCH v5 00/12] Enable GPU switching on pre-retina MacBook Pro
...ev_present() API which
> > will land in 4.5 via Rafael J. Wysocki's tree.
> >
> > I would particularly be interested in feedback on the handler flags
> > patch [01/12]. I'm not 100% happy with the number of characters
> > required to query the flags (e.g.: if (vga_switcheroo_handler_flags() &
> > VGA_SWITCHEROO_CAN_SWITCH_DDC)), but failed to come up with something
> > shorter. Thierry Reding used a struct of bools instead of a bitmask
> > for his recent drm_dp_link_caps patches. Maybe use that instead?
> > http://lists.freedesktop.org/archives/dri-devel/...
2018 Jul 02
0
[PATCH v2 5/9] drm/nouveau: Use drm_connector_for_each_possible_encoder()
...Ben Skeggs 2016-11-04 437 return NULL;
> 52aa30f25 Ben Skeggs 2016-11-04 438 if (ret == NOUVEAU_DP_SST)
> 8777c5c11 Ben Skeggs 2014-06-06 439 break;
> 8777c5c11 Ben Skeggs 2014-06-06 440 } else
> 39c1c9011 Lukas Wunner 2016-01-11 441 if ((vga_switcheroo_handler_flags() &
> 39c1c9011 Lukas Wunner 2016-01-11 442 VGA_SWITCHEROO_CAN_SWITCH_DDC) &&
> 39c1c9011 Lukas Wunner 2016-01-11 443 nv_encoder->dcb->type == DCB_OUTPUT_LVDS &&
> 39c1c9011 Lukas Wunner 2016-01-11 444 nv_encoder->i2c) {
> 3...
2016 Feb 01
0
[PATCH v5 00/12] Enable GPU switching on pre-retina MacBook Pro
...] depends on a new acpi_dev_present() API which
> will land in 4.5 via Rafael J. Wysocki's tree.
>
> I would particularly be interested in feedback on the handler flags
> patch [01/12]. I'm not 100% happy with the number of characters
> required to query the flags (e.g.: if (vga_switcheroo_handler_flags() &
> VGA_SWITCHEROO_CAN_SWITCH_DDC)), but failed to come up with something
> shorter. Thierry Reding used a struct of bools instead of a bitmask
> for his recent drm_dp_link_caps patches. Maybe use that instead?
> http://lists.freedesktop.org/archives/dri-devel/2015-December/097025...
2018 Jun 26
1
[PATCH 6/8] drm/nouveau: Use drm_for_each_connector_encoder_ids()
From: Ville Syrjälä <ville.syrjala at linux.intel.com>
Use drm_for_each_connector_encoder_ids() for iterating
connector->encoder_ids[]. A bit more convenient not having
to deal with the implementation details.
Cc: Ben Skeggs <bskeggs at redhat.com>
Cc: nouveau at lists.freedesktop.org
Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
---
2020 Jul 07
3
[PATCH][next] drm/nouveau: Use fallthrough pseudo-keyword
...n DFPs. */
- /* Fall-through. */
+ fallthrough;
default:
drm_object_attach_property(&connector->base, dev->mode_config.
scaling_mode_property,
@@ -446,7 +446,7 @@ nouveau_connector_ddc_detect(struct drm_connector *connector)
case DCB_OUTPUT_LVDS:
switcheroo_ddc = !!(vga_switcheroo_handler_flags() &
VGA_SWITCHEROO_CAN_SWITCH_DDC);
- /* fall-through */
+ fallthrough;
default:
if (!nv_encoder->i2c)
break;
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/hdmi.c b/drivers/gpu/drm/nouveau/nvkm/engine/disp/hdmi.c
index 7147dc6d9018..1ccfc8314812 100644
--- a/...
2018 Jun 28
4
[PATCH v2 0/9] drm: Third attempt at fixing the fb-helper .best_encoder() mess
From: Ville Syrjälä <ville.syrjala at linux.intel.com>
Changes from the previous version mainly involve Danoie's suggestion
of hiding the drm_encoder_find() in the iterator macro. I also polished
the msm and tilcdc cases a bit more with another small helper.
Cc: Alex Deucher <alexander.deucher at amd.com>
Cc: amd-gfx at lists.freedesktop.org
Cc: Ben Skeggs <bskeggs at
2020 Jul 08
0
[PATCH][next] drm/nouveau: Use fallthrough pseudo-keyword
...rty(&connector->base, dev->mode_config.
> scaling_mode_property,
> @@ -446,7 +446,7 @@ nouveau_connector_ddc_detect(struct drm_connector *connector)
> case DCB_OUTPUT_LVDS:
> switcheroo_ddc = !!(vga_switcheroo_handler_flags() &
> VGA_SWITCHEROO_CAN_SWITCH_DDC);
> - /* fall-through */
> + fallthrough;
> default:
> if (!nv_encoder->i2c)
> break;...