[Intel-gfx] [PATCH] Revert drm/i915: assume all GM45 Acer laptops use inverted backlight PWM

2013-12-28 Thread Alexander van Heukelum
My Acer 8510TZ stops displaying anything when X starts with Linus' current
tree. I bisected it down to commit ee1452d74584.

This patch reverts commit ee1452d74584.

After the revert, everything works as before.

Signed-off-by: Alexander van Heukelum heuke...@fastmail.fm

---
 drivers/gpu/drm/i915/intel_display.c | 19 ++-
 1 file changed, 14 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c 
b/drivers/gpu/drm/i915/intel_display.c
index 54e82a8..769b864 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -10541,11 +10541,20 @@ static struct intel_quirk intel_quirks[] = {
/* Sony Vaio Y cannot use SSC on LVDS */
{ 0x0046, 0x104d, 0x9076, quirk_ssc_force_disable },
 
-   /*
-* All GM45 Acer (and its brands eMachines and Packard Bell) laptops
-* seem to use inverted backlight PWM.
-*/
-   { 0x2a42, 0x1025, PCI_ANY_ID, quirk_invert_brightness },
+   /* Acer Aspire 5734Z must invert backlight brightness */
+   { 0x2a42, 0x1025, 0x0459, quirk_invert_brightness },
+
+   /* Acer/eMachines G725 */
+   { 0x2a42, 0x1025, 0x0210, quirk_invert_brightness },
+
+   /* Acer/eMachines e725 */
+   { 0x2a42, 0x1025, 0x0212, quirk_invert_brightness },
+
+   /* Acer/Packard Bell NCL20 */
+   { 0x2a42, 0x1025, 0x034b, quirk_invert_brightness },
+
+   /* Acer Aspire 4736Z */
+   { 0x2a42, 0x1025, 0x0260, quirk_invert_brightness },
 
/* Dell XPS13 HD Sandy Bridge */
{ 0x0116, 0x1028, 0x052e, quirk_no_pcm_pwm_enable },
-- 
1.8.3.2

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH] Revert drm/i915: assume all GM45 Acer laptops use inverted backlight PWM

2013-12-28 Thread Alexander van Heukelum
Hi all,

On my Acer 8510TZ, the backlight now turns off completely as soon as X
starts. I bisected the problem to ee1452d74584 drm/i915: assume all GM45
Acer laptops use inverted backlight PWM, which says:

There is plenty of evidence suggesting all of the GM45 based Acer
laptops (including their eMachines and Packard Bell brands) use inverted
backlight PWM. Assume this is really the case, and quirk them all.

It seems mine is the exception to the rule :-/.

The revert patch of ee1452d74584 on top of Linus' current tree (the reply
to this cover letter) makes it all work as before. The lspci output added
below. Ask if you need more info and/or testing.

Greetings,
Alexander


The bisect log
--
git bisect start
# good: [31d141e3a666269a3b6fcccddb0351caf7454240] Linux 3.12-rc6
git bisect good 31d141e3a666269a3b6fcccddb0351caf7454240
# bad: [f41bfc9423aac4e589d2b3bedf26b3c249c61146] Merge tag 'ext4_for_linus' of 
git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4
git bisect bad f41bfc9423aac4e589d2b3bedf26b3c249c61146
# good: [42a2d923cc349583ebf6fdd52a7d35e1c2f7e6bd] Merge 
git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
git bisect good 42a2d923cc349583ebf6fdd52a7d35e1c2f7e6bd
# bad: [0bde7294e2ada03d0f1cc61cec51274081d9a9cf] Merge tag 'pwm/for-3.13-rc1' 
of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm
git bisect bad 0bde7294e2ada03d0f1cc61cec51274081d9a9cf
# good: [d8fe4acc88da8fbbe360b6592c9d0abbb85117dc] Merge branch 'akpm' 
(patch-bomb from Andrew Morton)
git bisect good d8fe4acc88da8fbbe360b6592c9d0abbb85117dc
# bad: [8d0a2215931f1ffd77aef65cae2c0becc3f5d560] Merge branch 'drm-next-3.13' 
of git://people.freedesktop.org/~agd5f/linux into drm-next
git bisect bad 8d0a2215931f1ffd77aef65cae2c0becc3f5d560
# bad: [7cd6ccff85a13a8e5755cffa50129032d83c7c72] drm/i915: Add log messages 
when CRCs collection is started/stopped
git bisect bad 7cd6ccff85a13a8e5755cffa50129032d83c7c72
# bad: [65427b1e94eca5923e0f723d1dd000f47e6d1696] drm: Remove synth_clock from 
struct drm_display_mode
git bisect bad 65427b1e94eca5923e0f723d1dd000f47e6d1696
# good: [5113bc9b2357bbfe64c8c36bb05dad3eeeabd166] drm/i915: Document the 
inteded use of requested_mode
git bisect good 5113bc9b2357bbfe64c8c36bb05dad3eeeabd166
# bad: [311a20949f047a70935d6591010f42336f5402e7] drm/i915: don't init DP or 
HDMI when not supported by DDI port
git bisect bad 311a20949f047a70935d6591010f42336f5402e7
# good: [a2b23fe04e183ef58ed45183e39dbc696f9600b1] drm/i915/vlv: honor 
i915_enable_rc6 boot param on VLV
git bisect good a2b23fe04e183ef58ed45183e39dbc696f9600b1
# bad: [b599c89e8c5cf0c37352e0871be240291f8ce922] Merge tag 'v3.12-rc2' into 
drm-intel-next
git bisect bad b599c89e8c5cf0c37352e0871be240291f8ce922
# good: [6765625e0b677a86dbd533f045ab4e52e2761d79] drm/i915: Add 
intel_display_power_{get, put} to request power for specific domains
git bisect good 6765625e0b677a86dbd533f045ab4e52e2761d79
# good: [d6317290bfd8673d1cf3b6f8a12c72b3297eac36] drm/i915: Pull 
intel_init_power_well() out of intel_modeset_init_hw()
git bisect good d6317290bfd8673d1cf3b6f8a12c72b3297eac36
# bad: [ee1452d7458451a7508e0663553ce88d63958157] drm/i915: assume all GM45 
Acer laptops use inverted backlight PWM
git bisect bad ee1452d7458451a7508e0663553ce88d63958157


lspci -vmmnn

Slot:   00:00.0
Class:  Host bridge [0600]
Vendor: Intel Corporation [8086]
Device: Mobile 4 Series Chipset Memory Controller Hub [2a40]
SVendor:Acer Incorporated [ALI] [1025]
SDevice:Device [022b]
Rev:07

Slot:   00:02.0
Class:  VGA compatible controller [0300]
Vendor: Intel Corporation [8086]
Device: Mobile 4 Series Chipset Integrated Graphics Controller [2a42]
SVendor:Acer Incorporated [ALI] [1025]
SDevice:Device [022b]
Rev:07

Slot:   00:02.1
Class:  Display controller [0380]
Vendor: Intel Corporation [8086]
Device: Mobile 4 Series Chipset Integrated Graphics Controller [2a43]
SVendor:Acer Incorporated [ALI] [1025]
SDevice:Device [022b]
Rev:07

Slot:   00:1a.0
Class:  USB controller [0c03]
Vendor: Intel Corporation [8086]
Device: 82801I (ICH9 Family) USB UHCI Controller #4 [2937]
SVendor:Acer Incorporated [ALI] [1025]
SDevice:Device [022b]
Rev:03

Slot:   00:1a.1
Class:  USB controller [0c03]
Vendor: Intel Corporation [8086]
Device: 82801I (ICH9 Family) USB UHCI Controller #5 [2938]
SVendor:Acer Incorporated [ALI] [1025]
SDevice:Device [022b]
Rev:03

Slot:   00:1a.7
Class:  USB controller [0c03]
Vendor: Intel Corporation [8086]
Device: 82801I (ICH9 Family) USB2 EHCI Controller #2 [293c]
SVendor:Acer Incorporated [ALI] [1025]
SDevice:Device [022b]
Rev:03
ProgIf: 20

Slot:   00:1b.0
Class:  Audio device [0403]
Vendor: Intel Corporation [8086]
Device: 82801I (ICH9 Family) HD Audio Controller [293e]
SVendor:Acer Incorporated [ALI] [1025]
SDevice:Device [022b]
Rev:03

Slot:   

Re: [Intel-gfx] regression: grass turns red

2013-03-27 Thread Alexander van Heukelum
Hi Hans,

Could you check if the attached patch solves your problem?

Greetings,
Alexander van Heukelum

On Sun, Mar 24, 2013, at 22:19, Hans de Bruin wrote:
 commit 49cb25e9290 x86: 'get rid of pt_regs argument in vm86/vm86old' 
 somehow breaks the colors when I play 'civilization I' under xdosemu. 
 During the intro of the game something the colors get messed up. When 
 the game begins the grass of the earth is red. Reverting the  commit 
 fixes the problem.
 
 -- 
 Hans
 --
 To unsubscribe from this list: send the line unsubscribe linux-kernel in
 the body of a message to majord...@vger.kernel.org
 More majordomo info at  http://vger.kernel.org/majordomo-info.html
 Please read the FAQ at  http://www.tux.org/lkml/
 
 
From 2b09f37fd9defc02c6da9900e23418a401d7a2b9 Mon Sep 17 00:00:00 2001
From: Alexander van Heukelum heuke...@fastmail.fm
Date: Tue, 26 Mar 2013 21:57:43 +0100
Subject: [PATCH] x86, vm86: fix VM86 syscalls: use asmlinkage calling convention

This might solve the issue of the red grass in 'civilization I' under xdosemu. Commit
49cb25e9290 x86: 'get rid of pt_regs argument in vm86/vm86old' got rid of the pt_regs
stub for sys_vm86old and sys_vm86. The functions were, however, not changed to use the
asmlinkage calling convention.

Signed-off-by: Alexander van Heukelum heuke...@fastmail.fm
---
 arch/x86/include/asm/syscalls.h | 4 ++--
 arch/x86/kernel/vm86_32.c   | 6 --
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/arch/x86/include/asm/syscalls.h b/arch/x86/include/asm/syscalls.h
index 6cf0a9c..a245b88 100644
--- a/arch/x86/include/asm/syscalls.h
+++ b/arch/x86/include/asm/syscalls.h
@@ -37,8 +37,8 @@ asmlinkage int sys_get_thread_area(struct user_desc __user *);
 unsigned long sys_sigreturn(void);
 
 /* kernel/vm86_32.c */
-int sys_vm86old(struct vm86_struct __user *);
-int sys_vm86(unsigned long, unsigned long);
+asmlinkage int sys_vm86old(struct vm86_struct __user *);
+asmlinkage int sys_vm86(unsigned long, unsigned long);
 
 #else /* CONFIG_X86_32 */
 
diff --git a/arch/x86/kernel/vm86_32.c b/arch/x86/kernel/vm86_32.c
index 1cf5766..7f72807 100644
--- a/arch/x86/kernel/vm86_32.c
+++ b/arch/x86/kernel/vm86_32.c
@@ -202,7 +202,7 @@ out:
 static int do_vm86_irq_handling(int subfunction, int irqnumber);
 static void do_sys_vm86(struct kernel_vm86_struct *info, struct task_struct *tsk);
 
-int sys_vm86old(struct vm86_struct __user *v86)
+asmlinkage int sys_vm86old(struct vm86_struct __user *v86)
 {
 	struct kernel_vm86_struct info; /* declare this _on top_,
 	 * this avoids wasting of stack space.
@@ -227,11 +227,12 @@ int sys_vm86old(struct vm86_struct __user *v86)
 	do_sys_vm86(info, tsk);
 	ret = 0;	/* we never return here */
 out:
+	asmlinkage_protect(1, ret, v86);
 	return ret;
 }
 
 
-int sys_vm86(unsigned long cmd, unsigned long arg)
+asmlinkage int sys_vm86(unsigned long cmd, unsigned long arg)
 {
 	struct kernel_vm86_struct info; /* declare this _on top_,
 	 * this avoids wasting of stack space.
@@ -278,6 +279,7 @@ int sys_vm86(unsigned long cmd, unsigned long arg)
 	do_sys_vm86(info, tsk);
 	ret = 0;	/* we never return here */
 out:
+	asmlinkage_protect(2, ret, cmd, arg);
 	return ret;
 }
 
-- 
1.8.1.2

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH] x86, vm86: fix VM86 syscalls: use asmlinkage calling convention

2013-03-27 Thread Alexander van Heukelum
Hi Al,

Hans de Bruin found a regression due to one of your changes. I asked him to 
test a fix and he reported back that it worked. (Thanks!) Can you see if you 
agree with the fix? Patch is attached due to webmail...

Greetings,
Alexander
From 961a1b130aa79acb54f556a0accfcc643d1d3ed1 Mon Sep 17 00:00:00 2001
From: Alexander van Heukelum heuke...@fastmail.fm
Date: Tue, 26 Mar 2013 21:57:43 +0100
Subject: [PATCH] x86, vm86: fix VM86 syscalls: use asmlinkage calling convention

Commit 49cb25e9290 x86: 'get rid of pt_regs argument in vm86/vm86old'
got rid of the pt_regs stub for sys_vm86old and sys_vm86. The functions
were, however, not changed to use the asmlinkage calling convention.

The regression was reported and pinpointed by Hans de Bruin:
 commit 49cb25e9290 x86: 'get rid of pt_regs argument in vm86/vm86old'
 somehow breaks the colors when I play 'civilization I' under xdosemu.
 During the intro of the game something the colors get messed up. When
 the game begins the grass of the earth is red. Reverting the commit
 fixes the problem.

And he tested the patch too:
 Yep, the grass is green again.

Reported-and-tested-by: Hans de Bruin jmdebr...@xmsnet.nl
Signed-off-by: Alexander van Heukelum heuke...@fastmail.fm
---
 arch/x86/include/asm/syscalls.h | 4 ++--
 arch/x86/kernel/vm86_32.c   | 6 --
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/arch/x86/include/asm/syscalls.h b/arch/x86/include/asm/syscalls.h
index 6cf0a9c..a245b88 100644
--- a/arch/x86/include/asm/syscalls.h
+++ b/arch/x86/include/asm/syscalls.h
@@ -37,8 +37,8 @@ asmlinkage int sys_get_thread_area(struct user_desc __user *);
 unsigned long sys_sigreturn(void);
 
 /* kernel/vm86_32.c */
-int sys_vm86old(struct vm86_struct __user *);
-int sys_vm86(unsigned long, unsigned long);
+asmlinkage int sys_vm86old(struct vm86_struct __user *);
+asmlinkage int sys_vm86(unsigned long, unsigned long);
 
 #else /* CONFIG_X86_32 */
 
diff --git a/arch/x86/kernel/vm86_32.c b/arch/x86/kernel/vm86_32.c
index 1cf5766..7f72807 100644
--- a/arch/x86/kernel/vm86_32.c
+++ b/arch/x86/kernel/vm86_32.c
@@ -202,7 +202,7 @@ out:
 static int do_vm86_irq_handling(int subfunction, int irqnumber);
 static void do_sys_vm86(struct kernel_vm86_struct *info, struct task_struct *tsk);
 
-int sys_vm86old(struct vm86_struct __user *v86)
+asmlinkage int sys_vm86old(struct vm86_struct __user *v86)
 {
 	struct kernel_vm86_struct info; /* declare this _on top_,
 	 * this avoids wasting of stack space.
@@ -227,11 +227,12 @@ int sys_vm86old(struct vm86_struct __user *v86)
 	do_sys_vm86(info, tsk);
 	ret = 0;	/* we never return here */
 out:
+	asmlinkage_protect(1, ret, v86);
 	return ret;
 }
 
 
-int sys_vm86(unsigned long cmd, unsigned long arg)
+asmlinkage int sys_vm86(unsigned long cmd, unsigned long arg)
 {
 	struct kernel_vm86_struct info; /* declare this _on top_,
 	 * this avoids wasting of stack space.
@@ -278,6 +279,7 @@ int sys_vm86(unsigned long cmd, unsigned long arg)
 	do_sys_vm86(info, tsk);
 	ret = 0;	/* we never return here */
 out:
+	asmlinkage_protect(2, ret, cmd, arg);
 	return ret;
 }
 
-- 
1.8.1.2

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH v2] x86, vm86: fix VM86 syscalls: use SYSCALL_DEFINEx(...)

2013-03-27 Thread Alexander van Heukelum
On Wed, Mar 27, 2013, at 20:46, Al Viro wrote:
 On Wed, Mar 27, 2013 at 08:31:02PM +0100, Alexander van Heukelum wrote:
  Hi Al,
  
  Hans de Bruin found a regression due to one of your changes. I asked him to 
  test a fix and he reported back that it worked. (Thanks!) Can you see if 
  you agree with the fix? Patch is attached due to webmail...
 
 Use SYSCALL_DEFINE{1,2} for vm86_old and vm86, please.

Like this?

Greetings,
Alexander
From 450d86e6ad0a7d387cf706714c1fc030bb4b13a5 Mon Sep 17 00:00:00 2001
From: Alexander van Heukelum heuke...@fastmail.fm
Date: Tue, 26 Mar 2013 21:57:43 +0100
Subject: [PATCH] x86, vm86: fix VM86 syscalls: use SYSCALL_DEFINEx(...)

Commit 49cb25e9290 x86: 'get rid of pt_regs argument in vm86/vm86old'
got rid of the pt_regs stub for sys_vm86old and sys_vm86. The functions
were, however, not changed to use the calling convention for syscalls.

[v2] Use SYSCALL_DEFINEx(...). Compiles to identical code.

The regression was reported and pinpointed by Hans de Bruin:
 commit 49cb25e9290 x86: 'get rid of pt_regs argument in vm86/vm86old'
 somehow breaks the colors when I play 'civilization I' under xdosemu.
 During the intro of the game something the colors get messed up. When
 the game begins the grass of the earth is red. Reverting the commit
 fixes the problem.

And he tested the patch too:
 Yep, the grass is green again.

Reported-and-tested-by: Hans de Bruin jmdebr...@xmsnet.nl
Signed-off-by: Alexander van Heukelum heuke...@fastmail.fm
---
 arch/x86/include/asm/syscalls.h | 4 ++--
 arch/x86/kernel/vm86_32.c   | 8 +---
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/arch/x86/include/asm/syscalls.h b/arch/x86/include/asm/syscalls.h
index 6cf0a9c..5a0be0a 100644
--- a/arch/x86/include/asm/syscalls.h
+++ b/arch/x86/include/asm/syscalls.h
@@ -37,8 +37,8 @@ asmlinkage int sys_get_thread_area(struct user_desc __user *);
 unsigned long sys_sigreturn(void);
 
 /* kernel/vm86_32.c */
-int sys_vm86old(struct vm86_struct __user *);
-int sys_vm86(unsigned long, unsigned long);
+asmlinkage long sys_vm86old(struct vm86_struct __user *);
+asmlinkage long sys_vm86(unsigned long, unsigned long);
 
 #else /* CONFIG_X86_32 */
 
diff --git a/arch/x86/kernel/vm86_32.c b/arch/x86/kernel/vm86_32.c
index 1cf5766..a67cb2b 100644
--- a/arch/x86/kernel/vm86_32.c
+++ b/arch/x86/kernel/vm86_32.c
@@ -33,6 +33,7 @@
 #include linux/capability.h
 #include linux/errno.h
 #include linux/interrupt.h
+#include linux/syscalls.h
 #include linux/sched.h
 #include linux/kernel.h
 #include linux/signal.h
@@ -48,7 +49,6 @@
 #include asm/io.h
 #include asm/tlbflush.h
 #include asm/irq.h
-#include asm/syscalls.h
 
 /*
  * Known problems:
@@ -202,7 +202,7 @@ out:
 static int do_vm86_irq_handling(int subfunction, int irqnumber);
 static void do_sys_vm86(struct kernel_vm86_struct *info, struct task_struct *tsk);
 
-int sys_vm86old(struct vm86_struct __user *v86)
+SYSCALL_DEFINE1(vm86old, struct vm86_struct __user *, v86)
 {
 	struct kernel_vm86_struct info; /* declare this _on top_,
 	 * this avoids wasting of stack space.
@@ -227,11 +227,12 @@ int sys_vm86old(struct vm86_struct __user *v86)
 	do_sys_vm86(info, tsk);
 	ret = 0;	/* we never return here */
 out:
+	asmlinkage_protect(1, ret, v86);
 	return ret;
 }
 
 
-int sys_vm86(unsigned long cmd, unsigned long arg)
+SYSCALL_DEFINE2(vm86, unsigned long, cmd, unsigned long, arg)
 {
 	struct kernel_vm86_struct info; /* declare this _on top_,
 	 * this avoids wasting of stack space.
@@ -278,6 +279,7 @@ int sys_vm86(unsigned long cmd, unsigned long arg)
 	do_sys_vm86(info, tsk);
 	ret = 0;	/* we never return here */
 out:
+	asmlinkage_protect(2, ret, cmd, arg);
 	return ret;
 }
 
-- 
1.8.1.2

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx