Hibernation broken since commit 274ad65c9d02 ("drm/radeon: hard reset r600 and newer GPU when hibernating.")

2016-10-14 Thread Sven Joachim
On 2016-09-15 11:04 -0400, Jerome Glisse wrote:

>> On Mon, Sep 5, 2016 at 10:25 PM, Jerome Glisse  wrote:
>> >> Recently I got myself a new laptop with the following integrated GPU:
>> >>
>> >> 00:01.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI]
>> >> Mullins [Radeon R3 Graphics] (rev 40)
>> >>
>> >> I found that hibernation is broken in Linux 4.7+ (it works in Linux 4.6)
>> >> and bisected it to commit 274ad65c9d02 ("drm/radeon: hard reset r600 and
>> >> newer GPU when hibernating.").
>> >>
>> >> This has already been reported three months ago, but for a much older
>> >> GPU, see the thread starting at
>> >> https://lists.freedesktop.org/archives/dri-devel/2016-June/110050.html.
>> >> The symptoms are exactly the same as described by Boris Petkov in that
>> >> thread: after "systemctl hibernate" the screen goes blank, but the
>> >> machine remains powered on and needs to be power-cycled.
>> >>
>> >> Any suggestions would be welcome.
>> >>
>> >> Cheers,
>> >>Sven
>> >
>> > I guess we can invert the logic and only do it for the GPU for which it fix
>> > hibernation.
>> 
>> Do you remember which asics this fixed?
>> 
>
> No that's the issue, i don't have hw anymore but according to bug it is AMD 
> FirePro
> M5170 and M6170 which would make them amdgpu afaict but i remember the hw was 
> using
> radeon so i am not sure how to figure out what GPU it was really.
>
> Bug https://bugzilla.redhat.com/show_bug.cgi?id=1269009

That bug is not public, unfortunately. :-(

Are there any news on this?  As of Linux 4.8.1, I keep reverting commit
274ad65c9d02, and I'd like not having to do that indefinitely.

Cheers,
   Sven


Hibernation broken since commit 274ad65c9d02 ("drm/radeon: hard reset r600 and newer GPU when hibernating.")

2016-09-15 Thread Pavel Machek
On Mon 2016-09-05 00:20:06, Sven Joachim wrote:
> Recently I got myself a new laptop with the following integrated GPU:
> 
> 00:01.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] 
> Mullins [Radeon R3 Graphics] (rev 40)
> 
> I found that hibernation is broken in Linux 4.7+ (it works in Linux 4.6)
> and bisected it to commit 274ad65c9d02 ("drm/radeon: hard reset r600 and
> newer GPU when hibernating.").
> 
> This has already been reported three months ago, but for a much older
> GPU, see the thread starting at
> https://lists.freedesktop.org/archives/dri-devel/2016-June/110050.html.
> The symptoms are exactly the same as described by Boris Petkov in that
> thread: after "systemctl hibernate" the screen goes blank, but the
> machine remains powered on and needs to be power-cycled.

If it is still unfixed, you may want to notify regressions maintainer,
and Linus.

Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) 
http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html


Hibernation broken since commit 274ad65c9d02 ("drm/radeon: hard reset r600 and newer GPU when hibernating.")

2016-09-15 Thread Jerome Glisse
> On Mon, Sep 5, 2016 at 10:25 PM, Jerome Glisse  wrote:
> >> Recently I got myself a new laptop with the following integrated GPU:
> >>
> >> 00:01.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI]
> >> Mullins [Radeon R3 Graphics] (rev 40)
> >>
> >> I found that hibernation is broken in Linux 4.7+ (it works in Linux 4.6)
> >> and bisected it to commit 274ad65c9d02 ("drm/radeon: hard reset r600 and
> >> newer GPU when hibernating.").
> >>
> >> This has already been reported three months ago, but for a much older
> >> GPU, see the thread starting at
> >> https://lists.freedesktop.org/archives/dri-devel/2016-June/110050.html.
> >> The symptoms are exactly the same as described by Boris Petkov in that
> >> thread: after "systemctl hibernate" the screen goes blank, but the
> >> machine remains powered on and needs to be power-cycled.
> >>
> >> Any suggestions would be welcome.
> >>
> >> Cheers,
> >>Sven
> >
> > I guess we can invert the logic and only do it for the GPU for which it fix
> > hibernation.
> 
> Do you remember which asics this fixed?
> 

No that's the issue, i don't have hw anymore but according to bug it is AMD 
FirePro
M5170 and M6170 which would make them amdgpu afaict but i remember the hw was 
using
radeon so i am not sure how to figure out what GPU it was really.

Bug https://bugzilla.redhat.com/show_bug.cgi?id=1269009

Cheers,
Jérôme


Hibernation broken since commit 274ad65c9d02 ("drm/radeon: hard reset r600 and newer GPU when hibernating.")

2016-09-15 Thread Alex Deucher
On Mon, Sep 5, 2016 at 10:25 PM, Jerome Glisse  wrote:
>> Recently I got myself a new laptop with the following integrated GPU:
>>
>> 00:01.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI]
>> Mullins [Radeon R3 Graphics] (rev 40)
>>
>> I found that hibernation is broken in Linux 4.7+ (it works in Linux 4.6)
>> and bisected it to commit 274ad65c9d02 ("drm/radeon: hard reset r600 and
>> newer GPU when hibernating.").
>>
>> This has already been reported three months ago, but for a much older
>> GPU, see the thread starting at
>> https://lists.freedesktop.org/archives/dri-devel/2016-June/110050.html.
>> The symptoms are exactly the same as described by Boris Petkov in that
>> thread: after "systemctl hibernate" the screen goes blank, but the
>> machine remains powered on and needs to be power-cycled.
>>
>> Any suggestions would be welcome.
>>
>> Cheers,
>>Sven
>
> I guess we can invert the logic and only do it for the GPU for which it fix
> hibernation.

Do you remember which asics this fixed?

Alex

>
> Cheers,
> Jérôme
> ___
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel


Hibernation broken since commit 274ad65c9d02 ("drm/radeon: hard reset r600 and newer GPU when hibernating.")

2016-09-05 Thread Jerome Glisse
> Recently I got myself a new laptop with the following integrated GPU:
> 
> 00:01.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI]
> Mullins [Radeon R3 Graphics] (rev 40)
> 
> I found that hibernation is broken in Linux 4.7+ (it works in Linux 4.6)
> and bisected it to commit 274ad65c9d02 ("drm/radeon: hard reset r600 and
> newer GPU when hibernating.").
> 
> This has already been reported three months ago, but for a much older
> GPU, see the thread starting at
> https://lists.freedesktop.org/archives/dri-devel/2016-June/110050.html.
> The symptoms are exactly the same as described by Boris Petkov in that
> thread: after "systemctl hibernate" the screen goes blank, but the
> machine remains powered on and needs to be power-cycled.
> 
> Any suggestions would be welcome.
> 
> Cheers,
>Sven

I guess we can invert the logic and only do it for the GPU for which it fix
hibernation.

Cheers,
Jérôme


Hibernation broken since commit 274ad65c9d02 ("drm/radeon: hard reset r600 and newer GPU when hibernating.")

2016-09-05 Thread Sven Joachim
Recently I got myself a new laptop with the following integrated GPU:

00:01.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] 
Mullins [Radeon R3 Graphics] (rev 40)

I found that hibernation is broken in Linux 4.7+ (it works in Linux 4.6)
and bisected it to commit 274ad65c9d02 ("drm/radeon: hard reset r600 and
newer GPU when hibernating.").

This has already been reported three months ago, but for a much older
GPU, see the thread starting at
https://lists.freedesktop.org/archives/dri-devel/2016-June/110050.html.
The symptoms are exactly the same as described by Boris Petkov in that
thread: after "systemctl hibernate" the screen goes blank, but the
machine remains powered on and needs to be power-cycled.

Any suggestions would be welcome.

Cheers,
   Sven


274ad65c9d02 ("drm/radeon: hard reset r600 and newer GPU when hibernating.")

2016-06-09 Thread Alex Deucher
On Wed, Jun 8, 2016 at 12:51 PM, Borislav Petkov  wrote:
> On Wed, Jun 08, 2016 at 12:44:12PM -0400, Alex Deucher wrote:
>> If the ring and IB tests pass on resume, you should be good to go.
>
> Yap, they do. I pasted that output earlier but here it is again:
>
> [   64.745988] [drm] ring test on 0 succeeded in 1 usecs
> [   64.920633] [drm] ring test on 5 succeeded in 1 usecs
> [   64.920637] [drm] UVD initialized successfully.
> [   64.920652] [drm] ib test on ring 0 succeeded in 0 usecs

I've applied Jerome's fix to my tree.

Thanks,

Alex

>
> --
> Regards/Gruss,
> Boris.
>
> ECO tip #101: Trim your mails when you reply.


274ad65c9d02 ("drm/radeon: hard reset r600 and newer GPU when hibernating.")

2016-06-08 Thread Borislav Petkov
On Wed, Jun 08, 2016 at 12:44:12PM -0400, Alex Deucher wrote:
> If the ring and IB tests pass on resume, you should be good to go.

Yap, they do. I pasted that output earlier but here it is again:

[   64.745988] [drm] ring test on 0 succeeded in 1 usecs
[   64.920633] [drm] ring test on 5 succeeded in 1 usecs
[   64.920637] [drm] UVD initialized successfully.
[   64.920652] [drm] ib test on ring 0 succeeded in 0 usecs

-- 
Regards/Gruss,
Boris.

ECO tip #101: Trim your mails when you reply.


274ad65c9d02 ("drm/radeon: hard reset r600 and newer GPU when hibernating.")

2016-06-08 Thread Borislav Petkov
On Wed, Jun 08, 2016 at 05:28:53PM +0200, Grigori Goronzy wrote:
> Are you sure it is using accelerated decoding? CPU load should be just 1-2%.

Ha, good point. So with mplayer vo=vdpau, CPU load was at something over 12%.

Doing:

$ mpv --vo=vdpau --hwdec=vdpau $file
 (+) Video --vid=1 (*) (h264)
 (+) Audio --aid=1 --alang=eng (*) (aac)
Trying to use hardware decoding.
AO: [alsa] 48000Hz stereo 2ch float
VO: [vdpau] 1280x720 vdpau
AV: 00:00:50 / 00:02:36 (32%) A-V:  0.000

did bring it down to 5-6ish.

  PID USER  PR  NIVIRTRESSHR S  %CPU %MEM TIME+ COMMAND
12482 boris 20   0 1026628  74272  47632 S   5.6  0.5   0:02.77 mpv

so I'm guessing this should be using hw accel now...

In any case, output looks fine again too.

Thanks.

-- 
Regards/Gruss,
Boris.

ECO tip #101: Trim your mails when you reply.


274ad65c9d02 ("drm/radeon: hard reset r600 and newer GPU when hibernating.")

2016-06-08 Thread Grigori Goronzy
On 2016-06-08 15:47, Borislav Petkov wrote:
> On Wed, Jun 08, 2016 at 03:30:34PM +0200, Christian König wrote:
> 
>> Try forcing mplayer to use VDPAU with "mplayer -vo vdpau $file".
> 
> All good. Actually, this hw accel thing is much better, I better make 
> it
> default :-P
> 

Are you sure it is using accelerated decoding? CPU load should be just 
1-2%. AFAIR you still have to explicitly enable the hardware accelerated 
codecs with mplayer. It might have changed at some point. Also try mpv 
instead, maybe. It's easier to enable decoding with that player, just 
specify --hwdec=vdpau on the command line and it'll use accelerated 
decoding whenever it can.

Grigori


274ad65c9d02 ("drm/radeon: hard reset r600 and newer GPU when hibernating.")

2016-06-08 Thread Borislav Petkov
On Wed, Jun 08, 2016 at 10:06:23AM -0400, Jerome Glisse wrote:
> To be clear, you mean that after hibernation video acceleration keeps working 
> ?

Apparently. At lest the vdpau output looks fine to me.

> Can you copy radeon dmesg after hibernation cycle (once you resumed
> from hibernation).

$ dmesg | grep -Ei "(radeon|drm)"

...

  (boot messages)

...
[8.149356] fbcon: radeondrmfb (fb0) is primary device
[8.218800] radeon :01:00.0: fb0: radeondrmfb frame buffer device
[8.238402] [drm] Initialized radeon 2.45.0 20080528 for :01:00.0 on 
minor 0

<-- hibernate.

[   64.711657] [drm] enabling PCIE gen 2 link speeds, disable with 
radeon.pcie_gen2=0
[   64.714898] [drm] PCIE GART of 512M enabled (table at 0x00142000).
[   64.714920] radeon :01:00.0: WB enabled
[   64.714923] radeon :01:00.0: fence driver on ring 0 use gpu addr 
0x2c00 and cpu addr 0x88042b342c00
[   64.715123] radeon :01:00.0: fence driver on ring 5 use gpu addr 
0x000521d0 and cpu addr 0xc900030121d0
[   64.745988] [drm] ring test on 0 succeeded in 1 usecs
[   64.920633] [drm] ring test on 5 succeeded in 1 usecs
[   64.920637] [drm] UVD initialized successfully.
[   64.920652] [drm] ib test on ring 0 succeeded in 0 usecs
[   65.128759] ata1.00: supports DRM functions and may not be fully accessible
[   65.128799] ata2.00: supports DRM functions and may not be fully accessible
[   65.133700] ata1.00: supports DRM functions and may not be fully accessible
[   65.133811] ata2.00: supports DRM functions and may not be fully accessible
[   65.566744] [drm] ib test on ring 5 succeeded

Let me know if you need more stuff dumped.

-- 
Regards/Gruss,
Boris.

ECO tip #101: Trim your mails when you reply.


274ad65c9d02 ("drm/radeon: hard reset r600 and newer GPU when hibernating.")

2016-06-08 Thread Borislav Petkov
On Wed, Jun 08, 2016 at 03:47:12PM +0200, Borislav Petkov wrote:
> All good. Actually, this hw accel thing is much better, I better make it
> default :-P

And yes, this is with Jérôme's fix to exclude r600 and r700 from hard
reset before hibernation. And after a s2d cycle I did earlier.

-- 
Regards/Gruss,
Boris.

ECO tip #101: Trim your mails when you reply.


274ad65c9d02 ("drm/radeon: hard reset r600 and newer GPU when hibernating.")

2016-06-08 Thread Borislav Petkov
On Wed, Jun 08, 2016 at 03:30:34PM +0200, Christian König wrote:

> Try forcing mplayer to use VDPAU with "mplayer -vo vdpau $file".

All good. Actually, this hw accel thing is much better, I better make it
default :-P

libavformat version 56.23.105 (internal)
libavformat file format detected.
[lavf] stream 0: video (h264), -vid 0
[lavf] stream 1: audio (aac), -aid 0, -alang eng
VIDEO:  [H264]  1280x720  24bpp  23.976 fps  1702.9 kbps (207.9 kbyte/s)
Clip info:
 major_brand: mp42
 minor_version: 0
 compatible_brands: isommp42
 creation_time: 2015-09-24 14:54:07
Load subtitles in ./
==
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
libavcodec version 56.26.100 (internal)
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==
==
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 44100 Hz, 2 ch, floatle, 192.0 kbit/6.80% (ratio: 23999->352800)
Selected audio codec: [ffaac] afm: ffmpeg (FFmpeg AAC (MPEG-2/MPEG-4 Audio))
==
AO: [alsa] 48000Hz 2ch floatle (4 bytes per sample)
Starting playback...
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
VO: [vdpau] 1280x720 => 1280x720 Planar YV12 
A:   3.5 V:   3.5 A-V:  0.000 ct:  0.042   0/  0  8%  1%  1.3% 0 0

-- 
Regards/Gruss,
Boris.

ECO tip #101: Trim your mails when you reply.


274ad65c9d02 ("drm/radeon: hard reset r600 and newer GPU when hibernating.")

2016-06-08 Thread Christian König
Yes, exactly.

> VO: [xv] 1280x720 => 1280x720 Planar YV12
Mplayer is using xv without any acceleration (except for color space 
conversion).

Try forcing mplayer to use VDPAU with "mplayer -vo vdpau $file".

Regards,
Christian.

Am 08.06.2016 um 15:26 schrieb Borislav Petkov:
> On Wed, Jun 08, 2016 at 01:50:28PM +0200, Christian König wrote:
>> What's the output of mplayer? Mplayer usually uses video acceleration when
>> it is available.
> Something like this?
>
> libavformat version 56.23.105 (internal)
> libavformat file format detected.
> [lavf] stream 0: video (h264), -vid 0
> [lavf] stream 1: audio (aac), -aid 0, -alang eng
> VIDEO:  [H264]  1280x720  24bpp  23.976 fps  1702.9 kbps (207.9 kbyte/s)
> Clip info:
>   major_brand: mp42
>   minor_version: 0
>   compatible_brands: isommp42
>   creation_time: 2015-09-24 14:54:07
> Load subtitles in ./
> ==
> Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
> libavcodec version 56.26.100 (internal)
> Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
> ==
> ==
> Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
> AUDIO: 44100 Hz, 2 ch, floatle, 192.0 kbit/6.80% (ratio: 23999->352800)
> Selected audio codec: [ffaac] afm: ffmpeg (FFmpeg AAC (MPEG-2/MPEG-4 Audio))
> ==
> AO: [alsa] 48000Hz 2ch floatle (4 bytes per sample)
> Starting playback...
> Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
> VO: [xv] 1280x720 => 1280x720 Planar YV12
> A:   1.5 V:   1.5 A-V:  0.001 ct:  0.041   0/  0  8%  2%  1.3% 0 0
>



274ad65c9d02 ("drm/radeon: hard reset r600 and newer GPU when hibernating.")

2016-06-08 Thread Borislav Petkov
On Wed, Jun 08, 2016 at 01:50:28PM +0200, Christian König wrote:
> What's the output of mplayer? Mplayer usually uses video acceleration when
> it is available.

Something like this?

libavformat version 56.23.105 (internal)
libavformat file format detected.
[lavf] stream 0: video (h264), -vid 0
[lavf] stream 1: audio (aac), -aid 0, -alang eng
VIDEO:  [H264]  1280x720  24bpp  23.976 fps  1702.9 kbps (207.9 kbyte/s)
Clip info:
 major_brand: mp42
 minor_version: 0
 compatible_brands: isommp42
 creation_time: 2015-09-24 14:54:07
Load subtitles in ./
==
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
libavcodec version 56.26.100 (internal)
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==
==
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 44100 Hz, 2 ch, floatle, 192.0 kbit/6.80% (ratio: 23999->352800)
Selected audio codec: [ffaac] afm: ffmpeg (FFmpeg AAC (MPEG-2/MPEG-4 Audio))
==
AO: [alsa] 48000Hz 2ch floatle (4 bytes per sample)
Starting playback...
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
VO: [xv] 1280x720 => 1280x720 Planar YV12 
A:   1.5 V:   1.5 A-V:  0.001 ct:  0.041   0/  0  8%  2%  1.3% 0 0

-- 
Regards/Gruss,
Boris.

ECO tip #101: Trim your mails when you reply.


274ad65c9d02 ("drm/radeon: hard reset r600 and newer GPU when hibernating.")

2016-06-08 Thread Christian König
Am 08.06.2016 um 13:36 schrieb Borislav Petkov:
> On Tue, Jun 07, 2016 at 05:51:52PM -0400, Jerome Glisse wrote:
>> Ok i don't have too much time to dig into r600 i assume that r700 breaks
>> the same way so could you verify that attached patch fix the issue for
>> you. Note that video decoding is likely broken for you after hibernation
>> but you might have never notice it.
> Probably. And that means I really haven't noticed.
>
> How do I test video decoding? mplayer seems to work fine :)

What's the output of mplayer? Mplayer usually uses video acceleration 
when it is available.

Regards,
Christian.

>
>>  From 8ed42906e430880ce01bc6f175f1c7c180529353 Mon Sep 17 00:00:00 2001
>> From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Glisse?= 
>> Date: Tue, 7 Jun 2016 17:43:04 -0400
>> Subject: [PATCH] drm/radeon: do not hard reset GPU while freezing on 
>> r600/r700
>>   family
>> MIME-Version: 1.0
>> Content-Type: text/plain; charset=UTF-8
>> Content-Transfer-Encoding: 8bit
>>
>> Seems r600/r700 does not like hard reset while freezing for hibernation
>> (regression due to 274ad65c9d02bdcbee9bae045517864c3521d530 which itself
>> is a fix for hibernation on some GPU families). Until i can debug further
>> issue with r600, let just disable this for r600/r700 as they are very
>> similar family and bug affecting one likely affect the other.
>>
>> Signed-off-by: Jérôme Glisse 
> Reported-and-tested-by: Borislav Petkov 
>



274ad65c9d02 ("drm/radeon: hard reset r600 and newer GPU when hibernating.")

2016-06-08 Thread Borislav Petkov
On Tue, Jun 07, 2016 at 05:51:52PM -0400, Jerome Glisse wrote:
> Ok i don't have too much time to dig into r600 i assume that r700 breaks
> the same way so could you verify that attached patch fix the issue for
> you. Note that video decoding is likely broken for you after hibernation
> but you might have never notice it.

Probably. And that means I really haven't noticed.

How do I test video decoding? mplayer seems to work fine :)

> From 8ed42906e430880ce01bc6f175f1c7c180529353 Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Glisse?= 
> Date: Tue, 7 Jun 2016 17:43:04 -0400
> Subject: [PATCH] drm/radeon: do not hard reset GPU while freezing on r600/r700
>  family
> MIME-Version: 1.0
> Content-Type: text/plain; charset=UTF-8
> Content-Transfer-Encoding: 8bit
> 
> Seems r600/r700 does not like hard reset while freezing for hibernation
> (regression due to 274ad65c9d02bdcbee9bae045517864c3521d530 which itself
> is a fix for hibernation on some GPU families). Until i can debug further
> issue with r600, let just disable this for r600/r700 as they are very
> similar family and bug affecting one likely affect the other.
> 
> Signed-off-by: Jérôme Glisse 

Reported-and-tested-by: Borislav Petkov 

-- 
Regards/Gruss,
Boris.

ECO tip #101: Trim your mails when you reply.


274ad65c9d02 ("drm/radeon: hard reset r600 and newer GPU when hibernating.")

2016-06-08 Thread Alex Deucher
On Wed, Jun 8, 2016 at 12:32 PM, Borislav Petkov  wrote:
> On Wed, Jun 08, 2016 at 05:28:53PM +0200, Grigori Goronzy wrote:
>> Are you sure it is using accelerated decoding? CPU load should be just 1-2%.
>
> Ha, good point. So with mplayer vo=vdpau, CPU load was at something over 12%.
>
> Doing:
>
> $ mpv --vo=vdpau --hwdec=vdpau $file
>  (+) Video --vid=1 (*) (h264)
>  (+) Audio --aid=1 --alang=eng (*) (aac)
> Trying to use hardware decoding.
> AO: [alsa] 48000Hz stereo 2ch float
> VO: [vdpau] 1280x720 vdpau
> AV: 00:00:50 / 00:02:36 (32%) A-V:  0.000
>
> did bring it down to 5-6ish.
>
>   PID USER  PR  NIVIRTRESSHR S  %CPU %MEM TIME+ COMMAND
> 12482 boris 20   0 1026628  74272  47632 S   5.6  0.5   0:02.77 mpv
>
> so I'm guessing this should be using hw accel now...
>
> In any case, output looks fine again too.

If the ring and IB tests pass on resume, you should be good to go.

Alex

>
> Thanks.
>
> --
> Regards/Gruss,
> Boris.
>
> ECO tip #101: Trim your mails when you reply.
> ___
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel


274ad65c9d02 ("drm/radeon: hard reset r600 and newer GPU when hibernating.")

2016-06-08 Thread Jerome Glisse
> On Wed, Jun 08, 2016 at 03:47:12PM +0200, Borislav Petkov wrote:
> > All good. Actually, this hw accel thing is much better, I better make it
> > default :-P
> 
> And yes, this is with Jérôme's fix to exclude r600 and r700 from hard
> reset before hibernation. And after a s2d cycle I did earlier.
> 

To be clear, you mean that after hibernation video acceleration keeps working ? 
Can
you copy radeon dmesg after hibernation cycle (once you resumed from 
hibernation).

Cheers,
Jérôme


274ad65c9d02 ("drm/radeon: hard reset r600 and newer GPU when hibernating.")

2016-06-08 Thread Christian König
Am 07.06.2016 um 23:51 schrieb Jerome Glisse:
>> On Mon, Jun 06, 2016 at 05:40:19PM -0400, Jerome Glisse wrote:
>>> Brokens how ? Symptoms ?
>> Whoops, sorry, I meant to elaborate...
>>
>> After doing:
>>
>>  echo "shutdown" > /sys/power/disk
>>  echo "disk" > /sys/power/state
>>
>> screen goes blank but machine remains powered on and doesn't go off. No
>> responses to keyboard presses, etc. The only thing left to do is the
>> reset button.
> Ok i don't have too much time to dig into r600 i assume that r700 breaks
> the same way so could you verify that attached patch fix the issue for
> you. Note that video decoding is likely broken for you after hibernation
> but you might have never notice it.

Patch is Reviewed-by: Christian König .

Please keep me CCed if you have time looking into this.

Regards,
Christian.

>
> Cheers,
> Jérôme



274ad65c9d02 ("drm/radeon: hard reset r600 and newer GPU when hibernating.")

2016-06-07 Thread Jerome Glisse
> On Mon, Jun 06, 2016 at 05:40:19PM -0400, Jerome Glisse wrote:
> > Brokens how ? Symptoms ?
> 
> Whoops, sorry, I meant to elaborate...
> 
> After doing:
> 
> echo "shutdown" > /sys/power/disk
> echo "disk" > /sys/power/state
> 
> screen goes blank but machine remains powered on and doesn't go off. No
> responses to keyboard presses, etc. The only thing left to do is the
> reset button.

Ok i don't have too much time to dig into r600 i assume that r700 breaks
the same way so could you verify that attached patch fix the issue for
you. Note that video decoding is likely broken for you after hibernation
but you might have never notice it.

Cheers,
Jérôme
-- next part --
A non-text attachment was scrubbed...
Name: 0001-drm-radeon-do-not-hard-reset-GPU-while-freezing-on-r.patch
Type: text/x-patch
Size: 1407 bytes
Desc: not available
URL: 



274ad65c9d02 ("drm/radeon: hard reset r600 and newer GPU when hibernating.")

2016-06-07 Thread Borislav Petkov
On Mon, Jun 06, 2016 at 05:40:19PM -0400, Jerome Glisse wrote:
> Brokens how ? Symptoms ?

Whoops, sorry, I meant to elaborate...

After doing:

echo "shutdown" > /sys/power/disk
echo "disk" > /sys/power/state

screen goes blank but machine remains powered on and doesn't go off. No
responses to keyboard presses, etc. The only thing left to do is the
reset button.

-- 
Regards/Gruss,
Boris.

ECO tip #101: Trim your mails when you reply.


274ad65c9d02 ("drm/radeon: hard reset r600 and newer GPU when hibernating.")

2016-06-06 Thread Jerome Glisse
> Hi,
> 
> commit in $Subject breaks suspend to disk on my box here. Reverting it
> ontop of 4.7-rc2 fixes the problem. DRM-specific messages in dmesg are:
> 

Brokens how ? Symptoms ?

Cheers,
Jérôme 


274ad65c9d02 ("drm/radeon: hard reset r600 and newer GPU when hibernating.")

2016-06-06 Thread Borislav Petkov
Hi,

commit in $Subject breaks suspend to disk on my box here. Reverting it
ontop of 4.7-rc2 fixes the problem. DRM-specific messages in dmesg are:

[6.837698] [drm] radeon kernel modesetting enabled.
[6.871372] [drm] initializing kernel modesetting (RV635 0x1002:0x9598 
0x1043:0x01DA 0x00).
[6.871387] [drm] register mmio base: 0xFEA2
[6.871388] [drm] register mmio size: 65536
[6.871497] [drm] Detected VRAM RAM=512M, BAR=256M
[6.871498] [drm] RAM width 128bits DDR
[6.875602] [drm] radeon: 512M of VRAM memory ready
[6.875603] [drm] radeon: 512M of GTT memory ready.
[6.875619] [drm] Loading RV635 Microcode
[6.888041] [drm] Internal thermal controller without fan control
[6.888100] [drm] radeon: power management initialized
[6.892400] [drm] GART: num cpu pages 131072, num gpu pages 131072
[6.893273] [drm] enabling PCIE gen 2 link speeds, disable with 
radeon.pcie_gen2=0
[6.920032] [drm] PCIE GART of 512M enabled (table at 0x00142000).
[6.920232] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[6.920232] [drm] Driver supports precise vblank timestamp query.
[6.920290] [drm] radeon: irq initialized.
[6.951284] [drm] ring test on 0 succeeded in 0 usecs
[7.125955] [drm] ring test on 5 succeeded in 1 usecs
[7.131079] [drm] UVD initialized successfully.
[7.135817] [drm] ib test on ring 0 succeeded in 0 usecs
[7.789092] [drm] ib test on ring 5 succeeded
[7.794502] [drm] Radeon Display Connectors
[7.798817] [drm] Connector 0:
[7.801963] [drm]   DVI-I-1
[7.804825] [drm]   HPD1
[7.807430] [drm]   DDC: 0x7e50 0x7e50 0x7e54 0x7e54 0x7e58 0x7e58 0x7e5c 
0x7e5c
[7.814942] [drm]   Encoders:
[7.817985] [drm] DFP1: INTERNAL_UNIPHY
[7.822230] [drm] CRT2: INTERNAL_KLDSCP_DAC2
[7.826913] [drm] Connector 1:
[7.830033] [drm]   DIN-1
[7.832715] [drm]   Encoders:
[7.835751] [drm] TV1: INTERNAL_KLDSCP_DAC2
[7.840349] [drm] Connector 2:
[7.843466] [drm]   DVI-I-2
[7.846326] [drm]   HPD2
[7.848926] [drm]   DDC: 0x7e40 0x7e40 0x7e44 0x7e44 0x7e48 0x7e48 0x7e4c 
0x7e4c
[7.856437] [drm]   Encoders:
[7.859479] [drm] CRT1: INTERNAL_KLDSCP_DAC1
[7.864162] [drm] DFP2: INTERNAL_KLDSCP_LVTMA
[7.941480] [drm] fb mappable at 0xC0243000
[7.945733] [drm] vram apper at 0xC000
[7.949897] [drm] size 9216000
[7.953019] [drm] fb depth is 24
[7.956327] [drm]pitch is 7680
[7.959930] fbcon: radeondrmfb (fb0) is primary device
[8.028816] radeon :01:00.0: fb0: radeondrmfb frame buffer device
[8.045087] [drm] Initialized radeon 2.45.0 20080528 for :01:00.0 on 
minor 0
[   28.158851] [drm] enabling PCIE gen 2 link speeds, disable with 
radeon.pcie_gen2=0
[   28.160612] [drm] PCIE GART of 512M enabled (table at 0x00142000).
[   28.191669] [drm] ring test on 0 succeeded in 1 usecs
[   28.366319] [drm] ring test on 5 succeeded in 1 usecs
[   28.366323] [drm] UVD initialized successfully.
[   28.366338] [drm] ib test on ring 0 succeeded in 0 usecs
[   28.604362] ata1.00: supports DRM functions and may not be fully accessible
[   28.604405] ata2.00: supports DRM functions and may not be fully accessible
[   28.609305] ata1.00: supports DRM functions and may not be fully accessible
[   28.609410] ata2.00: supports DRM functions and may not be fully accessible
[   29.014440] [drm] ib test on ring 5 succeeded


-- 
Regards/Gruss,
Boris.

ECO tip #101: Trim your mails when you reply.