Pierre Moreau
2016-Apr-17 19:57 UTC
[Nouveau] [PATCH REBASED 2/2] nouveau/bl: Do not register interface if Apple GMUX detected
The Apple GMUX is the one managing the backlight, so there is no need for Nouveau to register its own backlight interface. Signed-off-by: Pierre Moreau <pierre.morrow at free.fr> --- drm/nouveau/nouveau_backlight.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drm/nouveau/nouveau_backlight.c b/drm/nouveau/nouveau_backlight.c index 41330e4..94ac3cb 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 <linux/apple-gmux.h> #include <linux/backlight.h> #include <linux/idr.h> @@ -257,6 +258,12 @@ nouveau_backlight_init(struct drm_device *dev) struct nvif_device *device = &drm->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(&drm->bl_connectors); list_for_each_entry(connector, &dev->mode_config.connector_list, head) { -- 2.8.0
Lukas Wunner
2016-Apr-17 21:20 UTC
[Nouveau] [PATCH REBASED 2/2] nouveau/bl: Do not register interface if Apple GMUX detected
Hi, On Sun, Apr 17, 2016 at 09:57:42PM +0200, 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. > > Signed-off-by: Pierre Moreau <pierre.morrow at free.fr> > --- > drm/nouveau/nouveau_backlight.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/drm/nouveau/nouveau_backlight.c b/drm/nouveau/nouveau_backlight.c > index 41330e4..94ac3cb 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 <linux/apple-gmux.h> > #include <linux/backlight.h> > #include <linux/idr.h> > > @@ -257,6 +258,12 @@ nouveau_backlight_init(struct drm_device *dev) > struct nvif_device *device = &drm->device; > struct drm_connector *connector; > > + if (apple_gmux_present()) { > + NV_INFO(drm, "Apple GMUX detected: not registering Nouveau" > + " backlight interface");Small nit -- Documentation/CodingStyle, chapter 2 says: "However, never break user-visible strings such as printk messages, because that breaks the ability to grep for them." Thanks, Lukas> + return 0; > + } > + > INIT_LIST_HEAD(&drm->bl_connectors); > > list_for_each_entry(connector, &dev->mode_config.connector_list, head) { > -- > 2.8.0
Pierre Moreau
2016-May-01 12:32 UTC
[Nouveau] [PATCH v2 2/2] nouveau/bl: Do not register interface if Apple GMUX detected
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 <pierre.morrow at free.fr> --- 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 <linux/apple-gmux.h> #include <linux/backlight.h> #include <linux/idr.h> @@ -257,6 +258,11 @@ nouveau_backlight_init(struct drm_device *dev) struct nvif_device *device = &drm->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(&drm->bl_connectors); list_for_each_entry(connector, &dev->mode_config.connector_list, head) { -- 2.8.2
Pierre Moreau
2016-May-01 12:35 UTC
[Nouveau] [PATCH v2 2/2] nouveau/bl: Do not register interface if Apple GMUX detected
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 GoedeIt should be "it, as pointed out by Lukas Wunner", sorry for the mistakeā¦ :-/ Pierre> > Signed-off-by: Pierre Moreau <pierre.morrow at free.fr> > --- > 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 <linux/apple-gmux.h> > #include <linux/backlight.h> > #include <linux/idr.h> > > @@ -257,6 +258,11 @@ nouveau_backlight_init(struct drm_device *dev) > struct nvif_device *device = &drm->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(&drm->bl_connectors); > > list_for_each_entry(connector, &dev->mode_config.connector_list, head) { > -- > 2.8.2 > > _______________________________________________ > Nouveau mailing list > Nouveau at lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/nouveau-------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <https://lists.freedesktop.org/archives/nouveau/attachments/20160501/69b33442/attachment.sig>
Reasonably Related Threads
- [PATCH REBASED 2/2] nouveau/bl: Do not register interface if Apple GMUX detected
- [PATCH v3 2/2] Do not register interface if Apple GMUX detected
- [PATCH REBASED 2/2] Do not register interface if Apple GMUX detected
- [PATCH REBASED 2/2] Do not register interface if Apple GMUX detected
- [PATCH] drm/nouveau/bl: Fix oops on driver unbind