linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* 274ad65c9d02 ("drm/radeon: hard reset r600 and newer GPU when hibernating.")
@ 2016-06-06 14:02 Borislav Petkov
  2016-06-06 21:40 ` Jerome Glisse
  0 siblings, 1 reply; 18+ messages in thread
From: Borislav Petkov @ 2016-06-06 14:02 UTC (permalink / raw)
  To: Jérôme Glisse
  Cc: Christian König, Alex Deucher, dri-devel, lkml

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: 0xFEA20000
[    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 0x0000000000142000).
[    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 0xC0000000
[    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 0000:01:00.0: fb0: radeondrmfb frame buffer device
[    8.045087] [drm] Initialized radeon 2.45.0 20080528 for 0000: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 0x0000000000142000).
[   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.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: 274ad65c9d02 ("drm/radeon: hard reset r600 and newer GPU when hibernating.")
  2016-06-06 14:02 274ad65c9d02 ("drm/radeon: hard reset r600 and newer GPU when hibernating.") Borislav Petkov
@ 2016-06-06 21:40 ` Jerome Glisse
  2016-06-06 22:00   ` Borislav Petkov
  0 siblings, 1 reply; 18+ messages in thread
From: Jerome Glisse @ 2016-06-06 21:40 UTC (permalink / raw)
  To: Borislav Petkov; +Cc: Christian König, Alex Deucher, dri-devel, lkml

> 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 

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: 274ad65c9d02 ("drm/radeon: hard reset r600 and newer GPU when hibernating.")
  2016-06-06 21:40 ` Jerome Glisse
@ 2016-06-06 22:00   ` Borislav Petkov
  2016-06-07 21:51     ` Jerome Glisse
  0 siblings, 1 reply; 18+ messages in thread
From: Borislav Petkov @ 2016-06-06 22:00 UTC (permalink / raw)
  To: Jerome Glisse; +Cc: Christian König, Alex Deucher, dri-devel, lkml

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.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: 274ad65c9d02 ("drm/radeon: hard reset r600 and newer GPU when hibernating.")
  2016-06-06 22:00   ` Borislav Petkov
@ 2016-06-07 21:51     ` Jerome Glisse
  2016-06-08  7:38       ` Christian König
  2016-06-08 11:36       ` Borislav Petkov
  0 siblings, 2 replies; 18+ messages in thread
From: Jerome Glisse @ 2016-06-07 21:51 UTC (permalink / raw)
  To: Borislav Petkov; +Cc: Christian König, Alex Deucher, dri-devel, lkml

[-- Attachment #1: Type: text/plain, Size: 699 bytes --]

> 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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-drm-radeon-do-not-hard-reset-GPU-while-freezing-on-r.patch --]
[-- Type: text/x-patch; name=0001-drm-radeon-do-not-hard-reset-GPU-while-freezing-on-r.patch, Size: 1407 bytes --]

From 8ed42906e430880ce01bc6f175f1c7c180529353 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Glisse?= <jglisse@redhat.com>
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 <jglisse@redhat.com>
---
 drivers/gpu/drm/radeon/radeon_device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c
index e721e6b..e61c763 100644
--- a/drivers/gpu/drm/radeon/radeon_device.c
+++ b/drivers/gpu/drm/radeon/radeon_device.c
@@ -1631,7 +1631,7 @@ int radeon_suspend_kms(struct drm_device *dev, bool suspend,
 	radeon_agp_suspend(rdev);
 
 	pci_save_state(dev->pdev);
-	if (freeze && rdev->family >= CHIP_R600) {
+	if (freeze && rdev->family >= CHIP_CEDAR) {
 		rdev->asic->asic_reset(rdev, true);
 		pci_restore_state(dev->pdev);
 	} else if (suspend) {
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: 274ad65c9d02 ("drm/radeon: hard reset r600 and newer GPU when hibernating.")
  2016-06-07 21:51     ` Jerome Glisse
@ 2016-06-08  7:38       ` Christian König
  2016-06-08 11:36       ` Borislav Petkov
  1 sibling, 0 replies; 18+ messages in thread
From: Christian König @ 2016-06-08  7:38 UTC (permalink / raw)
  To: Jerome Glisse, Borislav Petkov; +Cc: Alex Deucher, dri-devel, lkml

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 <christian.koenig@amd.com>.

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

Regards,
Christian.

>
> Cheers,
> Jérôme

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: 274ad65c9d02 ("drm/radeon: hard reset r600 and newer GPU when hibernating.")
  2016-06-07 21:51     ` Jerome Glisse
  2016-06-08  7:38       ` Christian König
@ 2016-06-08 11:36       ` Borislav Petkov
  2016-06-08 11:50         ` Christian König
  1 sibling, 1 reply; 18+ messages in thread
From: Borislav Petkov @ 2016-06-08 11:36 UTC (permalink / raw)
  To: Jerome Glisse; +Cc: Christian König, Alex Deucher, dri-devel, lkml

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?= <jglisse@redhat.com>
> 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 <jglisse@redhat.com>

Reported-and-tested-by: Borislav Petkov <bp@suse.de>

-- 
Regards/Gruss,
    Boris.

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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: 274ad65c9d02 ("drm/radeon: hard reset r600 and newer GPU when hibernating.")
  2016-06-08 11:36       ` Borislav Petkov
@ 2016-06-08 11:50         ` Christian König
  2016-06-08 13:26           ` Borislav Petkov
  0 siblings, 1 reply; 18+ messages in thread
From: Christian König @ 2016-06-08 11:50 UTC (permalink / raw)
  To: Borislav Petkov, Jerome Glisse; +Cc: Alex Deucher, dri-devel, lkml

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?= <jglisse@redhat.com>
>> 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 <jglisse@redhat.com>
> Reported-and-tested-by: Borislav Petkov <bp@suse.de>
>

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: 274ad65c9d02 ("drm/radeon: hard reset r600 and newer GPU when hibernating.")
  2016-06-08 11:50         ` Christian König
@ 2016-06-08 13:26           ` Borislav Petkov
  2016-06-08 13:30             ` Christian König
  0 siblings, 1 reply; 18+ messages in thread
From: Borislav Petkov @ 2016-06-08 13:26 UTC (permalink / raw)
  To: Christian König; +Cc: Jerome Glisse, Alex Deucher, dri-devel, lkml

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.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: 274ad65c9d02 ("drm/radeon: hard reset r600 and newer GPU when hibernating.")
  2016-06-08 13:26           ` Borislav Petkov
@ 2016-06-08 13:30             ` Christian König
  2016-06-08 13:47               ` Borislav Petkov
  0 siblings, 1 reply; 18+ messages in thread
From: Christian König @ 2016-06-08 13:30 UTC (permalink / raw)
  To: Borislav Petkov; +Cc: Jerome Glisse, Alex Deucher, dri-devel, lkml

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
>

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: 274ad65c9d02 ("drm/radeon: hard reset r600 and newer GPU when hibernating.")
  2016-06-08 13:30             ` Christian König
@ 2016-06-08 13:47               ` Borislav Petkov
  2016-06-08 13:55                 ` Borislav Petkov
  2016-06-08 15:28                 ` Grigori Goronzy
  0 siblings, 2 replies; 18+ messages in thread
From: Borislav Petkov @ 2016-06-08 13:47 UTC (permalink / raw)
  To: Christian König; +Cc: Jerome Glisse, Alex Deucher, dri-devel, lkml

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.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: 274ad65c9d02 ("drm/radeon: hard reset r600 and newer GPU when hibernating.")
  2016-06-08 13:47               ` Borislav Petkov
@ 2016-06-08 13:55                 ` Borislav Petkov
  2016-06-08 14:06                   ` Jerome Glisse
  2016-06-08 15:28                 ` Grigori Goronzy
  1 sibling, 1 reply; 18+ messages in thread
From: Borislav Petkov @ 2016-06-08 13:55 UTC (permalink / raw)
  To: Christian König; +Cc: Jerome Glisse, Alex Deucher, dri-devel, lkml

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.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: 274ad65c9d02 ("drm/radeon: hard reset r600 and newer GPU when hibernating.")
  2016-06-08 13:55                 ` Borislav Petkov
@ 2016-06-08 14:06                   ` Jerome Glisse
  2016-06-08 14:18                     ` Borislav Petkov
  0 siblings, 1 reply; 18+ messages in thread
From: Jerome Glisse @ 2016-06-08 14:06 UTC (permalink / raw)
  To: Borislav Petkov; +Cc: Christian König, Alex Deucher, dri-devel, lkml

> 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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: 274ad65c9d02 ("drm/radeon: hard reset r600 and newer GPU when hibernating.")
  2016-06-08 14:06                   ` Jerome Glisse
@ 2016-06-08 14:18                     ` Borislav Petkov
  0 siblings, 0 replies; 18+ messages in thread
From: Borislav Petkov @ 2016-06-08 14:18 UTC (permalink / raw)
  To: Jerome Glisse; +Cc: Christian König, Alex Deucher, dri-devel, lkml

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 0000:01:00.0: fb0: radeondrmfb frame buffer device
[    8.238402] [drm] Initialized radeon 2.45.0 20080528 for 0000: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 0x0000000000142000).
[   64.714920] radeon 0000:01:00.0: WB enabled
[   64.714923] radeon 0000:01:00.0: fence driver on ring 0 use gpu addr 0x0000000020000c00 and cpu addr 0xffff88042b342c00
[   64.715123] radeon 0000:01:00.0: fence driver on ring 5 use gpu addr 0x00000000000521d0 and cpu addr 0xffffc900030121d0
[   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.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: 274ad65c9d02 ("drm/radeon: hard reset r600 and newer GPU when hibernating.")
  2016-06-08 13:47               ` Borislav Petkov
  2016-06-08 13:55                 ` Borislav Petkov
@ 2016-06-08 15:28                 ` Grigori Goronzy
  2016-06-08 16:32                   ` Borislav Petkov
  1 sibling, 1 reply; 18+ messages in thread
From: Grigori Goronzy @ 2016-06-08 15:28 UTC (permalink / raw)
  To: Borislav Petkov
  Cc: Christian König, Alex Deucher, Jerome Glisse, lkml, dri-devel

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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: 274ad65c9d02 ("drm/radeon: hard reset r600 and newer GPU when hibernating.")
  2016-06-08 15:28                 ` Grigori Goronzy
@ 2016-06-08 16:32                   ` Borislav Petkov
  2016-06-08 16:44                     ` Alex Deucher
  0 siblings, 1 reply; 18+ messages in thread
From: Borislav Petkov @ 2016-06-08 16:32 UTC (permalink / raw)
  To: Grigori Goronzy
  Cc: Christian König, Alex Deucher, Jerome Glisse, lkml, dri-devel

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  NI    VIRT    RES    SHR 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.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: 274ad65c9d02 ("drm/radeon: hard reset r600 and newer GPU when hibernating.")
  2016-06-08 16:32                   ` Borislav Petkov
@ 2016-06-08 16:44                     ` Alex Deucher
  2016-06-08 16:51                       ` Borislav Petkov
  0 siblings, 1 reply; 18+ messages in thread
From: Alex Deucher @ 2016-06-08 16:44 UTC (permalink / raw)
  To: Borislav Petkov
  Cc: Grigori Goronzy, Alex Deucher, Jerome Glisse,
	Christian König, Maling list - DRI developers, lkml

On Wed, Jun 8, 2016 at 12:32 PM, Borislav Petkov <bp@alien8.de> 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  NI    VIRT    RES    SHR 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@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: 274ad65c9d02 ("drm/radeon: hard reset r600 and newer GPU when hibernating.")
  2016-06-08 16:44                     ` Alex Deucher
@ 2016-06-08 16:51                       ` Borislav Petkov
  2016-06-09 15:40                         ` Alex Deucher
  0 siblings, 1 reply; 18+ messages in thread
From: Borislav Petkov @ 2016-06-08 16:51 UTC (permalink / raw)
  To: Alex Deucher
  Cc: Grigori Goronzy, Alex Deucher, Jerome Glisse,
	Christian König, Maling list - DRI developers, lkml

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.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: 274ad65c9d02 ("drm/radeon: hard reset r600 and newer GPU when hibernating.")
  2016-06-08 16:51                       ` Borislav Petkov
@ 2016-06-09 15:40                         ` Alex Deucher
  0 siblings, 0 replies; 18+ messages in thread
From: Alex Deucher @ 2016-06-09 15:40 UTC (permalink / raw)
  To: Borislav Petkov
  Cc: Grigori Goronzy, Alex Deucher, Jerome Glisse,
	Christian König, Maling list - DRI developers, lkml

On Wed, Jun 8, 2016 at 12:51 PM, Borislav Petkov <bp@alien8.de> 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.

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2016-06-09 15:40 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-06 14:02 274ad65c9d02 ("drm/radeon: hard reset r600 and newer GPU when hibernating.") Borislav Petkov
2016-06-06 21:40 ` Jerome Glisse
2016-06-06 22:00   ` Borislav Petkov
2016-06-07 21:51     ` Jerome Glisse
2016-06-08  7:38       ` Christian König
2016-06-08 11:36       ` Borislav Petkov
2016-06-08 11:50         ` Christian König
2016-06-08 13:26           ` Borislav Petkov
2016-06-08 13:30             ` Christian König
2016-06-08 13:47               ` Borislav Petkov
2016-06-08 13:55                 ` Borislav Petkov
2016-06-08 14:06                   ` Jerome Glisse
2016-06-08 14:18                     ` Borislav Petkov
2016-06-08 15:28                 ` Grigori Goronzy
2016-06-08 16:32                   ` Borislav Petkov
2016-06-08 16:44                     ` Alex Deucher
2016-06-08 16:51                       ` Borislav Petkov
2016-06-09 15:40                         ` Alex Deucher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).