Re: [Nouveau] [PATCH v2 2/2] nouveau/bl: Do not register interface if Apple GMUX detected

2016-05-01 Thread Pierre Moreau
On 02:32 PM - May 01 2016, Pierre Moreau wrote:
> The Apple GMUX is the one managing the backlight, so there is no need for
> Nouveau to register its own backlight interface.
> 
> v2: Do not split information message on two lines as it prevents from grepping
> it, as pointed out by Hans de Goede

It should be "it, as pointed out by Lukas Wunner", sorry for the mistakeā€¦ :-/

Pierre

> 
> Signed-off-by: Pierre Moreau 
> ---
>  drm/nouveau/nouveau_backlight.c | 6 ++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drm/nouveau/nouveau_backlight.c b/drm/nouveau/nouveau_backlight.c
> index 41330e4..8429ceb 100644
> --- a/drm/nouveau/nouveau_backlight.c
> +++ b/drm/nouveau/nouveau_backlight.c
> @@ -30,6 +30,7 @@
>   * Register locations derived from NVClock by Roderick Colenbrander
>   */
>  
> +#include 
>  #include 
>  #include 
>  
> @@ -257,6 +258,11 @@ nouveau_backlight_init(struct drm_device *dev)
>   struct nvif_device *device = >device;
>   struct drm_connector *connector;
>  
> + if (apple_gmux_present()) {
> + NV_INFO(drm, "Apple GMUX detected: not registering Nouveau 
> backlight interface");
> + return 0;
> + }
> +
>   INIT_LIST_HEAD(>bl_connectors);
>  
>   list_for_each_entry(connector, >mode_config.connector_list, head) {
> -- 
> 2.8.2
> 
> ___
> Nouveau mailing list
> Nouveau@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/nouveau


signature.asc
Description: PGP signature
___
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau


[Nouveau] [PATCH v2 2/2] nouveau/bl: Do not register interface if Apple GMUX detected

2016-05-01 Thread Pierre Moreau
The Apple GMUX is the one managing the backlight, so there is no need for
Nouveau to register its own backlight interface.

v2: Do not split information message on two lines as it prevents from grepping
it, as pointed out by Hans de Goede

Signed-off-by: Pierre Moreau 
---
 drm/nouveau/nouveau_backlight.c | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/drm/nouveau/nouveau_backlight.c b/drm/nouveau/nouveau_backlight.c
index 41330e4..8429ceb 100644
--- a/drm/nouveau/nouveau_backlight.c
+++ b/drm/nouveau/nouveau_backlight.c
@@ -30,6 +30,7 @@
  * Register locations derived from NVClock by Roderick Colenbrander
  */
 
+#include 
 #include 
 #include 
 
@@ -257,6 +258,11 @@ nouveau_backlight_init(struct drm_device *dev)
struct nvif_device *device = >device;
struct drm_connector *connector;
 
+   if (apple_gmux_present()) {
+   NV_INFO(drm, "Apple GMUX detected: not registering Nouveau 
backlight interface");
+   return 0;
+   }
+
INIT_LIST_HEAD(>bl_connectors);
 
list_for_each_entry(connector, >mode_config.connector_list, head) {
-- 
2.8.2

___
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau