X86 platform drivers
 help / color / mirror / Atom feed
From: "Bruno Prémont" <bonbons@linux-vserver.org>
To: Darren Hart <dvhart@infradead.org>
Cc: platform-driver-x86@vger.kernel.org,
	linux-kernel@vger.kernel.org, Petri Hodju <petrihodju@yahoo.com>,
	Bjorn Helgaas <bhelgaas@google.com>,
	Matthew Garrett <matthew.garrett@nebula.com>
Subject: Re: [Patch v2] apple-gmux: lock iGP IO to protect from vgaarb changes
Date: Sat, 7 Mar 2015 01:15:46 +0100	[thread overview]
Message-ID: <20150307011546.0050279d@neptune.home> (raw)
In-Reply-To: <20150306174254.GB19001@vmdeb7>

On Fri, 06 March 2015 Darren Hart <dvhart@infradead.org> wrote:
> On Thu, Mar 05, 2015 at 11:20:38PM +0100, Bruno Prémont wrote:
> > As GMUX depends on IO for iGP to be enabled and active, lock the IO at
> > vgaarb level. This should prevent GPU driver for dGPU to disable IO for
> > iGP while it tries to own legacy VGA IO.
> > 
> > This fixes usage of backlight control combined with closed nvidia
> > driver on some Apple dual-GPU (intel/nvidia) systems.
> > 
> > On those systems loading nvidia driver disables intel IO decoding,
> > disabling the gmux backlight controls as a side effect.
> > Prior to commits moving boot_vga from (optional) efifb to less optional
> > vgaarb this mis-behavior could be avoided by using right kernel config
> > (efifb enabled but vgaarb disabled).
> > 
> > This patch explicitly does not try to trigger vgaarb changes in order
> > to avoid confusing already running graphics drivers. If IO has been
> > mis-configured by vgaarb gmux will thus fail to probe.
> > It is expected to load/probe gmux prior to graphics drivers.
> > 
> > Fixes: ce027dac592c0ada241ce0f95ae65856828ac450 # nvidia interaction
> > Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=86121
> > Reported-by: Petri Hodju <petrihodju@yahoo.com>
> > Tested-by: Petri Hodju <petrihodju@yahoo.com>
> > Cc: Bjorn Helgaas <bhelgaas@google.com>
> > Cc: Matthew Garrett <matthew.garrett@nebula.com>
> > Signed-off-by: Bruno Prémont <bonbons@linux-vserver.org>
> > ---
> > Respinning, fixing Darren's nit.
> > 
> > Changes since v1:
> > - Dropped repeat of gmux in pr_info/pr_err calls
> > - Mention PCI device we tried to lock IO for in case of error

Hi Darren,

> Hi Bruno,
> 
> I don't know if this is on your end or mine (I've not seen this before). Saving
> off your patch (through mutt like I do everything else) to a file and applying
> works, build works, and git show and visual inspection look correct.
> 
> However, checkpatch sees a lot of =3D instead of just =, and complains bitterly.
> 
> Can you check this patch (from the list) and let me know what you find?

That smells like `Content-Transfer-Encoding: quoted-printable` not being
understood by check-patch when operating on a raw mail.
No idea if mutt can recode the mail to plain 8-bit/UTF-8 when saving...
patch from patch-utils might have the same issues with it while git-am is
fine (as it handles mail-patches including charset and other headers).

I'm sending the mail via claws-mail which might encode it more
conservatively than e.g. git-send-email. I can see if there's an option
to prefer 8-bit over quoted-printable though.

Bruno


> ERROR: patch seems to be corrupt (line wrapped?)
> #93: FILE: drivers/platform/x86/apple-gmux.c:27:
> =20
> 
> ERROR: spaces required around that '=' (ctx:WxV)
> #108: FILE: drivers/platform/x86/apple-gmux.c:421:
> +	struct pci_dev *pdev =3D NULL;
>  	                     ^
> 
> WARNING: Missing a blank line after declarations
> #109: FILE: drivers/platform/x86/apple-gmux.c:422:
> +	struct pci_dev *pdev =3D NULL;
> +	while ((pdev =3D pci_get_class(PCI_CLASS_DISPLAY_VGA << 8, pdev))) {
> 
> ERROR: spaces required around that '=' (ctx:WxV)
> #109: FILE: drivers/platform/x86/apple-gmux.c:422:
> +	while ((pdev =3D pci_get_class(PCI_CLASS_DISPLAY_VGA << 8, pdev))) {
>  	             ^
> 
> ERROR: spaces required around that '=' (ctx:WxV)
> #130: FILE: drivers/platform/x86/apple-gmux.c:447:
> +	struct pci_dev *pdev =3D NULL;
>  	                     ^
> 
> ERROR: spaces required around that '=' (ctx:WxV)
> #155: FILE: drivers/platform/x86/apple-gmux.c:510:
> +	pdev =3D gmux_find_pdev();
>  	     ^
> 
> ERROR: spaces required around that '=' (ctx:WxV)
> #160: FILE: drivers/platform/x86/apple-gmux.c:515:
> +		ret =3D -EBUSY;
>  		    ^
> 
> ERROR: need consistent spacing around '-' (ctx:WxV)
> #160: FILE: drivers/platform/x86/apple-gmux.c:515:
> +		ret =3D -EBUSY;
>  		        ^
> 
> ERROR: spaces required around that '=' (ctx:WxV)
> #164: FILE: drivers/platform/x86/apple-gmux.c:519:
> +	gmux_data->pdev =3D pdev;
>  	                ^
> 
> total: 8 errors, 1 warnings, 96 lines checked
> 
> /home/dvhart/apple.patch has style problems, please review.
> 
> If any of these errors are false positives, please report
> them to the maintainer, see CHECKPATCH in MAINTAINERS.
> 

  reply	other threads:[~2015-03-07  0:15 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-23 20:51 [Patch] apple-gmux: lock iGP IO to protect from vgaarb changes Bruno Prémont
2015-03-03 17:27 ` Darren Hart
2015-03-05 22:20   ` [Patch v2] " Bruno Prémont
2015-03-06 17:42     ` Darren Hart
2015-03-07  0:15       ` Bruno Prémont [this message]
2015-03-09 21:52         ` [Patch v2 resend] " Bruno Prémont
2015-03-09 22:11           ` Bjorn Helgaas
2015-03-11 21:34             ` [Patch v3] " Bruno Prémont
2015-03-19  3:46               ` Darren Hart
2015-05-26 19:10               ` Michael Marineau
2015-05-27  4:47                 ` Darren Hart
2015-05-27  5:35                   ` Michael Marineau
2015-05-27  6:13                     ` Bruno Prémont
2015-05-27  6:41                       ` Michael Marineau
2015-05-29 16:36                       ` Darren Hart
2015-06-01  6:22                         ` Bruno Prémont
2015-06-01 17:31                           ` Darren Hart
2015-05-27  5:53                   ` Bruno Prémont
2015-05-27  6:28                     ` Michael Marineau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150307011546.0050279d@neptune.home \
    --to=bonbons@linux-vserver.org \
    --cc=bhelgaas@google.com \
    --cc=dvhart@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matthew.garrett@nebula.com \
    --cc=petrihodju@yahoo.com \
    --cc=platform-driver-x86@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox