Bug 90449

Summary: [SKL Bisected] XV fails
Product: DRI Reporter: xubin <bin.a.xu>
Component: DRM/IntelAssignee: Intel GFX Bugs mailing list <intel-gfx-bugs>
Status: CLOSED FIXED QA Contact: Intel GFX Bugs mailing list <intel-gfx-bugs>
Severity: normal    
Priority: high CC: intel-gfx-bugs
Version: unspecifiedKeywords: bisect_pending
Hardware: Other   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
dmesg
none
dmesg update none

Description xubin 2015-05-14 10:12:14 UTC
Created attachment 115765 [details]
dmesg

==System Environment==
--------------------------
Regression: Yes. Good commit: de4de566f84b87f4d5f8265b11932088adb19896
Non-working platforms: SKLY

==kernel==
--------------------------
nightly: 6cf0fff478fa64991c2b7f2a44f2815d7a43a0b5 (fails)
    drm-intel-nightly: 2015y-05m-13d-09h-28m-49s UTC integration manifest
-queued:  65de797816eadb227c45b0127d7ff92410fa3814 (fails)
    drm/edid: fix a debug message
-fixes: 364aece01a2dd748fc36a1e8bf52ef639b0857bd (works)
    drm/i915: Avoid GPU hang when coming out of s3 or s4


==Bug detailed description==
-----------------------------
Start X,then mplayer -vo xv XXXX, video can't play successfully,and the screen is blue.

==Reproduce steps==
---------------------------- 
1. xinit &
2. mplayer -vo xv XXXX
Comment 1 xubin 2015-05-15 04:22:31 UTC
Created attachment 115792 [details]
dmesg update
Comment 2 xubin 2015-05-15 04:33:53 UTC
==System Environment==
--------------------------
Regression: Yes.  Bisect is in progressing .
I can find a good commit on drm-intel-next-queued branch.
Good commit: de4de566f84b87f4d5f8265b11932088adb19896
Non-working platforms: SKLY

==kernel==
--------------------------
nightly: 6cf0fff478fa64991c2b7f2a44f2815d7a43a0b5 (fails)
    drm-intel-nightly: 2015y-05m-13d-09h-28m-49s UTC integration manifest
-queued:  65de797816eadb227c45b0127d7ff92410fa3814 (fails)
    drm/edid: fix a debug message
-fixes: 364aece01a2dd748fc36a1e8bf52ef639b0857bd (works)
    drm/i915: Avoid GPU hang when coming out of s3 or s4

==Bug detailed description==
-----------------------------
Connect with three monitors,then start X and mplayer -vo xv MPEG-2.mpeg,
Result :
all three monitors  can't play video successfully,and all the screens are blue.

==Reproduce steps==
---------------------------- 
1. connected with three monitors.
2. xinit &
3. mplayer -vo xv MPEG-2.mpeg.
Comment 3 Ander Conselvan de Oliveira 2015-05-15 12:23:45 UTC
(In reply to xubin from comment #2)
> Regression: Yes.  Bisect is in progressing .

Waiting for bisect results.
Comment 4 xubin 2015-05-18 07:32:56 UTC
==Bisect results==
----------------------------
Bisect shows: 5ceafac3a55f18c82eb4845edd2599cae64f6347 is the first bad commit.

commit 5ceafac3a55f18c82eb4845edd2599cae64f6347
Author:     Chandra Konduru <chandra.konduru@intel.com>
AuthorDate: Wed Apr 15 15:15:02 2015 -0700
Commit:     Daniel Vetter <daniel.vetter@ffwll.ch>
CommitDate: Mon May 4 10:15:03 2015 +0200

    drm/i915: skylake sprite plane scaling using shared scalers

    This patch enables skylake sprite plane display scaling using shared
    scalers atomic desgin.

    v2:
    -use single copy of scaler limits (Matt)

    v3:
    -detaching scalers moved to crtc commit path (Matt)

    v4:
    -changes to align with updated scaler structures (Matt, me)
    -keep sprite src rect in 16.16 format (Matt, Daniel)

    v5:
    -rebased on top of 90/270 rotation changes (me)
    -Refactored skl_update_plane to reduce its size (Daniel)
     It is a step towards having a single function covering all planes.

    Signed-off-by: Chandra Konduru <chandra.konduru@intel.com>
    Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
    Testcase: igt/kms_plane_scaling
    Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Comment 5 chandra 2015-05-18 19:27:15 UTC
Based on kernel logs attached to the bug, there is a request to do plane scaling along with colorkey. Because skl hw doesn't support plane scaling and colorkey at the same time, request is failed which is expected behavior. 

To make it work, either we need to give up colorkey or scaler support when both are requested on a plane. To xv operate, allow colorkey continue to work without using scaler. Then behavior would be similar to platforms without plane scaler support. In this approach driver avoids failure by keeping src==dst by fudging them. Working with Ville reviewing this approach to address the issue.

By the way, I am not able to reproduce the issue with mp4 file with single eDP display. Need couple clarifications on reproducing:
1) Is issue happening only with 3 displays? or with any of 1 or 2 displays too?
2) What 3 displays output ports and sinks are you using? Are they in clone or independent heads?
3) What is the kernel version?
4) can you attach the clip that you are using?
Comment 6 chandra 2015-05-18 21:49:39 UTC
When earlier I played mp4 clip, mplayer isn't requesting scaling so issue not reported. 
Found a mpeg2 clip, and with that clip, mplayer is requesting scaling so issue can be reproduced. And it is confirmed that both colorkey and scaling were requested and that's why video playback fails.

Working on a fix.
Comment 7 chandra 2015-05-18 23:22:19 UTC
Patch ready: http://lists.freedesktop.org/archives/intel-gfx/2015-May/066906.html

Now mplayer properly plays video.
Comment 8 xubin 2015-05-19 08:13:13 UTC
Test with the patch ,the issue didn't exist now.
Comment 9 Ander Conselvan de Oliveira 2015-05-22 09:58:45 UTC
Fixed in -nightly by

commit 225c228a028388b215e1f8a18546af2c2802bbb5
Author: Chandra Konduru <chandra.konduru@intel.com>
Date:   Mon May 18 16:18:44 2015 -0700

    drm/i915/skl: don't fail colorkey + scaler request
Comment 10 xubin 2015-05-26 00:57:21 UTC
Works well on latest drm-intel-nightly branch,so verified.
Comment 11 Elizabeth 2017-10-06 14:29:54 UTC
Closing old verified.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.