Re: [Nouveau] [PATCH v2 8/9] acpi: Add support for Apple Gmux _DMS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Dave,


----- Mail original -----
> Changes since v1:
[...]
> diff --git a/drm/nouveau/nouveau_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 (5addcf0a5f0fadceba6bd562d0616a1c5d4c1a4d), you added the possibility to enable/disable dynpm. How is it supposed to work, by simply echo'ing ON or OFF to vga_switcheroo/switch? Then I probably forgot some stuff as it doesn't want to work on my laptop.

Pierre

> +	if (nouveau_has_dsm() && state == VGA_SWITCHEROO_OFF)
>  		return;
>  
>  	if (state == VGA_SWITCHEROO_ON) {
> @@ -96,11 +96,11 @@ nouveau_vga_init(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;
>  	vga_switcheroo_register_client(dev->pdev, &nouveau_switcheroo_ops,
>  	runtime);
>  
> -	if (runtime && nouveau_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;
>  
>  	vga_switcheroo_unregister_client(dev->pdev);
> -	if (runtime && nouveau_has_mux() && !nouveau_is_optimus())
> +	if (runtime && (nouveau_has_mux() || nouveau_has_gmux()) &&
> !nouveau_is_optimus())
>  		vga_switcheroo_fini_domain_pm_ops(drm->dev->dev);
>  	vga_client_register(dev->pdev, NULL, NULL, NULL);
>  }
> --
> 2.4.2
> 
> _______________________________________________
> Nouveau mailing list
> Nouveau@xxxxxxxxxxxxxxxxxxxxx
> http://lists.freedesktop.org/mailman/listinfo/nouveau
> 
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel





[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux