[PATCH] Intel, Dell, Ubuntu - i915/intel_dp.c

2015-05-26 Thread Dragan Stancevic
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi,

this is not a patch for mainline. It affects Dell Precision M3800
Laptop running Ubuntu with Intel Graphics. Problem manifests in a way
where laptop after some use will not suspend anymore. It will attempt
to suspend, blank out the screen and come back up. It's rather finicky
as it doesn't happen consistently, but often enough that it started
being mildly annoying. I tracked it down to a race condition between
scheduled work and another thread. Essentially the driver would do a
double put on a structure if the race condition was hit. This patch
fixes the problem and my laptop has been suspending flawlessly for
about a month and a half.

- From my memory going back 1.5 months the race condition is between
_edp_panel_vdd_on, intel_edp_panel_off, edp_panel_vdd_off_sync.

Kernel and Distro info:
:~/src/Dell-M4800-Hardware/kernel$ uname -r
3.16.7-ckt8
:~/src/Dell-M4800-Hardware/kernel$ cat /etc/issue
Ubuntu 14.10 \n \l

Hope someone else finds the attached patch useful.

Thanks
-BEGIN PGP SIGNATURE-
Version: GnuPG v2

iQIcBAEBAgAGBQJVZT1AAAoJEFvcFPjWWnki3NAP/Aq+o6HRWgJzjDPoHUnqoeuZ
xU/N4/aSjEMS2qBdOz++86B1nloT4ztKTRlaOJ45BCvCW2SeyHtMfHwyvIVw29hc
bo5+T4nOx0wHtX/iaULowM3++enEARH76SAFUcMsUJEX36nSJywyWSIM19h59L4z
JxjrPUVnbFn5K4FTBJ1GhG/3QDfDoD/i7bH/v+MIJCXSYWeV9S273nG9onMz5NhW
OxRx2avmat23zqwGDDTkLfOLCFVzByxPqbXU/muyo8yM9teHapfrMTOwYtWgIMDb
vFkfLJmDpa2NhPefSacNIi/L23oK4poGK4nw8w/U+VUaGwmConOtJq7tR517sewh
R481WfaZeJzCVt5IJtC076j+1YmtZQri7jdJJlxS1RW/2ZVGDNEWWFCMNo1g+ixl
kht0o2FSqjKjtSpzNuXjoKldpCH+v91ix8JqJSdfkjj4VOljKJh+xnPxOelbdU5a
aKnk6+hg8fc9CL37LHzV/nvIGaOht5VKPGSBZQQ0p7G+Oe169kPpE1gUfgsvzdw7
y0fkEaGV0iyuHMCrcY32dgEf0QrZyCqgmsts/u7q3bWoMSyWyYyE3gu8wQ1VT2Bb
+4sHgIXYjQZpVoEMs2i4gezPHL6oDhuOk6enJYah0dKpp9uefCRXbEiwitbZdnLE
P+l2M/QpOWM+qwvuV7Te
=HAXT
-END PGP SIGNATURE-
--- linux-3.16.0.ubt/drivers/gpu/drm/i915/intel_dp.c	2015-04-16 20:17:21.0 -0700
+++ linux-3.16.0/drivers/gpu/drm/i915/intel_dp.c	2015-04-16 20:29:45.040894002 -0700
@@ -1175,6 +1175,7 @@
 	if (!is_edp(intel_dp))
 		return false;
 
+	cancel_delayed_work(_dp->panel_vdd_work);
 	intel_dp->want_panel_vdd = true;
 
 	if (edp_have_panel_vdd(intel_dp))


[PATCH] Intel, Dell, Ubuntu - i915/intel_dp.c

2015-05-26 Thread Dragan Stancevic
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi,

this is not a patch for mainline. It affects Dell Precision M3800
Laptop running Ubuntu with Intel Graphics. Problem manifests in a way
where laptop after some use will not suspend anymore. It will attempt
to suspend, blank out the screen and come back up. It's rather finicky
as it doesn't happen consistently, but often enough that it started
being mildly annoying. I tracked it down to a race condition between
scheduled work and another thread. Essentially the driver would do a
double put on a structure if the race condition was hit. This patch
fixes the problem and my laptop has been suspending flawlessly for
about a month and a half.

- From my memory going back 1.5 months the race condition is between
_edp_panel_vdd_on, intel_edp_panel_off, edp_panel_vdd_off_sync.

Kernel and Distro info:
:~/src/Dell-M4800-Hardware/kernel$ uname -r
3.16.7-ckt8
:~/src/Dell-M4800-Hardware/kernel$ cat /etc/issue
Ubuntu 14.10 \n \l

Hope someone else finds the attached patch useful.

Thanks
-BEGIN PGP SIGNATURE-
Version: GnuPG v2

iQIcBAEBAgAGBQJVZT1AAAoJEFvcFPjWWnki3NAP/Aq+o6HRWgJzjDPoHUnqoeuZ
xU/N4/aSjEMS2qBdOz++86B1nloT4ztKTRlaOJ45BCvCW2SeyHtMfHwyvIVw29hc
bo5+T4nOx0wHtX/iaULowM3++enEARH76SAFUcMsUJEX36nSJywyWSIM19h59L4z
JxjrPUVnbFn5K4FTBJ1GhG/3QDfDoD/i7bH/v+MIJCXSYWeV9S273nG9onMz5NhW
OxRx2avmat23zqwGDDTkLfOLCFVzByxPqbXU/muyo8yM9teHapfrMTOwYtWgIMDb
vFkfLJmDpa2NhPefSacNIi/L23oK4poGK4nw8w/U+VUaGwmConOtJq7tR517sewh
R481WfaZeJzCVt5IJtC076j+1YmtZQri7jdJJlxS1RW/2ZVGDNEWWFCMNo1g+ixl
kht0o2FSqjKjtSpzNuXjoKldpCH+v91ix8JqJSdfkjj4VOljKJh+xnPxOelbdU5a
aKnk6+hg8fc9CL37LHzV/nvIGaOht5VKPGSBZQQ0p7G+Oe169kPpE1gUfgsvzdw7
y0fkEaGV0iyuHMCrcY32dgEf0QrZyCqgmsts/u7q3bWoMSyWyYyE3gu8wQ1VT2Bb
+4sHgIXYjQZpVoEMs2i4gezPHL6oDhuOk6enJYah0dKpp9uefCRXbEiwitbZdnLE
P+l2M/QpOWM+qwvuV7Te
=HAXT
-END PGP SIGNATURE-
--- linux-3.16.0.ubt/drivers/gpu/drm/i915/intel_dp.c	2015-04-16 20:17:21.0 -0700
+++ linux-3.16.0/drivers/gpu/drm/i915/intel_dp.c	2015-04-16 20:29:45.040894002 -0700
@@ -1175,6 +1175,7 @@
 	if (!is_edp(intel_dp))
 		return false;
 
+	cancel_delayed_work(intel_dp-panel_vdd_work);
 	intel_dp-want_panel_vdd = true;
 
 	if (edp_have_panel_vdd(intel_dp))


Re: eepro100 + 2.2.18 + laptop problems

2001-02-19 Thread Dragan Stancevic

On Tue, Feb 20, 2001, CaT <[EMAIL PROTECTED]> wrote:
; 
; None. This is before any traffic gets put through it. At worst the
; card has the wrong IP for the network but that is not always the case
; from memory.

So where does that card get the address from, are you doing DHCP?


-- 
No Kernel Hackers were harmed during writing of this email.

-Dragan
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: eepro100 + 2.2.18 + laptop problems

2001-02-19 Thread Dragan Stancevic

On Tue, Feb 20, 2001, CaT <[EMAIL PROTECTED]> wrote:
; > 100% accuracy and so it'll take me a wee while before I decide '
; > a... that rocks my boat. it's fixed.'. :)
; 
; It happened again. Same deal. Once was after a reboot and this time
; was after a resume. :/

What kind of trafic are you running?

-- 
No Kernel Hackers were harmed during writing of this email.

-Dragan
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: eepro100 + 2.2.18 + laptop problems

2001-02-19 Thread Dragan Stancevic

On Tue, Feb 20, 2001, CaT [EMAIL PROTECTED] wrote:
;  100% accuracy and so it'll take me a wee while before I decide '
;  a... that rocks my boat. it's fixed.'. :)
; 
; It happened again. Same deal. Once was after a reboot and this time
; was after a resume. :/

What kind of trafic are you running?

-- 
No Kernel Hackers were harmed during writing of this email.

-Dragan
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: eepro100 + 2.2.18 + laptop problems

2001-02-19 Thread Dragan Stancevic

On Tue, Feb 20, 2001, CaT [EMAIL PROTECTED] wrote:
; 
; None. This is before any traffic gets put through it. At worst the
; card has the wrong IP for the network but that is not always the case
; from memory.

So where does that card get the address from, are you doing DHCP?


-- 
No Kernel Hackers were harmed during writing of this email.

-Dragan
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: [eepro100] Ok, I'm fed up now

2001-01-12 Thread Dragan Stancevic

On Fri, Jan 12, 2001, Dan B <[EMAIL PROTECTED]> wrote:
; Has anyone gotten Intel's (non-GPL) e100 driver working in 2.4.x yet?  What 
; about their e100-ANS driver that supports FEC 800mbps?

I don't think the intels driver is using pci_dma yet so it's
going to take a while before they port all that stuff over,
but than again that is just a guess, maybe they have stuff
done alredy it's just waiting for a new release.



-- 
I knew I was alone, I was scared, it was getting dark and
it was a hardware problem.

-Dragan
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: [eepro100] Ok, I'm fed up now

2001-01-12 Thread Dragan Stancevic

On Fri, Jan 12, 2001, Dan B [EMAIL PROTECTED] wrote:
; Has anyone gotten Intel's (non-GPL) e100 driver working in 2.4.x yet?  What 
; about their e100-ANS driver that supports FEC 800mbps?

I don't think the intels driver is using pci_dma yet so it's
going to take a while before they port all that stuff over,
but than again that is just a guess, maybe they have stuff
done alredy it's just waiting for a new release.



-- 
I knew I was alone, I was scared, it was getting dark and
it was a hardware problem.

-Dragan
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: [eepro100] Ok, I'm fed up now

2001-01-11 Thread Dragan Stancevic

On Tue, Jan 09, 2001, Kambo Lohan <[EMAIL PROTECTED]> wrote:
; I am having the same problems, I have duplicated the hard lockups / ethernet 
; hangs on two intel 815EE boards.  It happens when send traffic through the 
; onboard eepro100 is high, and sometimes running something like vmstat 1 in 
; the background triggers the lockup faster.  When it locks up there is 
; nothing in the log, no oops or anything.  Sometimes it just hangs eth0 with 
; the (cmd timeout) msgs and an ifconfig down/up fixes it temporarily.
; 


Kambo,

can you run the driver with a high debug flag and log what is going on,
make sure you have alot of space since it talks alot.

The card seems to be locking up with a couple of commands in the register that
are not known to me, my specs don't list them, hopefully the new specs talk
about it. At this time it's not known where the command comes from, I am
working on a patch that will tell a bit more about that...


-- 
I knew I was alone, I was scared, it was getting dark and
it was a hardware problem.

-Dragan
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: [eepro100] Ok, I'm fed up now

2001-01-11 Thread Dragan Stancevic

On Tue, Jan 09, 2001, Kambo Lohan [EMAIL PROTECTED] wrote:
; I am having the same problems, I have duplicated the hard lockups / ethernet 
; hangs on two intel 815EE boards.  It happens when send traffic through the 
; onboard eepro100 is high, and sometimes running something like vmstat 1 in 
; the background triggers the lockup faster.  When it locks up there is 
; nothing in the log, no oops or anything.  Sometimes it just hangs eth0 with 
; the (cmd timeout) msgs and an ifconfig down/up fixes it temporarily.
; 


Kambo,

can you run the driver with a high debug flag and log what is going on,
make sure you have alot of space since it talks alot.

The card seems to be locking up with a couple of commands in the register that
are not known to me, my specs don't list them, hopefully the new specs talk
about it. At this time it's not known where the command comes from, I am
working on a patch that will tell a bit more about that...


-- 
I knew I was alone, I was scared, it was getting dark and
it was a hardware problem.

-Dragan
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: New discoveries in the EEPro100 init saga

2000-12-28 Thread Dragan Stancevic

On Sat, Dec 23, 2000, Udo A. Steinberg <[EMAIL PROTECTED]> wrote:
; 
; Hi all,
; 
; After enabling the option "EEPRO100_PM" and upgrading to test13-pre4
; my problems with the eepro100 driver mysteriously ceased to exist.
; I no longer see any "Card reports no RX buffers" or "Card reports no
; resources" messages.
; 
; Since I don't think -pre4 changed anything from -pre3 that would
; affect the eepro100 driver, my bet is that enabling the experimental
; power management feature somehow works around the issue.
; 
; Can others who've had similar problems check if that works for them
; as well? If it does, it should be somewhat simple to work out what
; the problem actually is, because the PM code is just a couple dozen
; lines.

Udo,

the driver has an issue that is affected by fiddling with different
parameters, it's a timing issue of somesort, changing a bit of code
seems to fix it on one system but it breaks it on others, I am comparing
the driver line by line to the specs to see where the misbehavioure
could be comming from.


-- 
I knew I was alone, I was scared, it was getting dark and
it was a hardware problem.

-Dragan
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: New discoveries in the EEPro100 init saga

2000-12-28 Thread Dragan Stancevic

On Sat, Dec 23, 2000, Udo A. Steinberg [EMAIL PROTECTED] wrote:
; 
; Hi all,
; 
; After enabling the option "EEPRO100_PM" and upgrading to test13-pre4
; my problems with the eepro100 driver mysteriously ceased to exist.
; I no longer see any "Card reports no RX buffers" or "Card reports no
; resources" messages.
; 
; Since I don't think -pre4 changed anything from -pre3 that would
; affect the eepro100 driver, my bet is that enabling the experimental
; power management feature somehow works around the issue.
; 
; Can others who've had similar problems check if that works for them
; as well? If it does, it should be somewhat simple to work out what
; the problem actually is, because the PM code is just a couple dozen
; lines.

Udo,

the driver has an issue that is affected by fiddling with different
parameters, it's a timing issue of somesort, changing a bit of code
seems to fix it on one system but it breaks it on others, I am comparing
the driver line by line to the specs to see where the misbehavioure
could be comming from.


-- 
I knew I was alone, I was scared, it was getting dark and
it was a hardware problem.

-Dragan
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: 2.4.0-test12-pre7 shutdowns and eepro100 woes

2000-12-20 Thread Dragan Stancevic

On Tue, Dec 12, 2000, Andrey Savochkin <[EMAIL PROTECTED]> wrote:
; To answer your question in short, yet, we hope to fix the problem sooner or
; later.


I added the print out of the message to see in what state was the card
being left after it was wedged.

The card seems to be locking up with undefined opcodes, atleast according to
my specs. 

The command doesn't necessarly come from the driver, I'we done some
experimenting and it seems that sending the card an undefined opcode
will lock up the card with a different value in the command register.

I am still waiting for latest specs from intel, I wonder if the new
specs will define those values.


-- 
I knew I was alone, I was scared, it was getting dark and
it was a hardware problem.

-Dragan
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: 2.4.0-test12-pre7 shutdowns and eepro100 woes

2000-12-20 Thread Dragan Stancevic

On Tue, Dec 12, 2000, Andrey Savochkin [EMAIL PROTECTED] wrote:
; To answer your question in short, yet, we hope to fix the problem sooner or
; later.


I added the print out of the message to see in what state was the card
being left after it was wedged.

The card seems to be locking up with undefined opcodes, atleast according to
my specs. 

The command doesn't necessarly come from the driver, I'we done some
experimenting and it seems that sending the card an undefined opcode
will lock up the card with a different value in the command register.

I am still waiting for latest specs from intel, I wonder if the new
specs will define those values.


-- 
I knew I was alone, I was scared, it was getting dark and
it was a hardware problem.

-Dragan
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/