Bug 24009

Summary: sometimes blank screen when openarena start in non-native mode
Product: DRI Reporter: zhao jian <jian.j.zhao>
Component: DRM/IntelAssignee: Wang Zhenyu <zhenyu.z.wang>
Status: CLOSED FIXED QA Contact:
Severity: major    
Priority: high CC: eric, jbarnes
Version: XOrg gitKeywords: patch
Hardware: Other   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
xorg.0.log
none
plane flush wait interruptible fix
none
wait rendering to fb bo before modesetting
none
updated patch none

Description zhao jian 2009-09-17 23:59:41 UTC
Created attachment 29655 [details]
xorg.0.log

System Environment:
--------------------------
Arch:           i386
Platform:       GM45
Libdrm:         (master)cdd325b59a17a614b90fc2f8b388175e6d79e3cf
Mesa:           (mesa_7_6_branch)fac38e8c8f1814ae54703b872db8c6dd21c34a3b
Xserver:        (server-1.6-branch)3044711412d0a08ba65a491bd2441c0c8980f5e2
Xf86_video_intel:   (master)b8c5c996e888485c3a16d645c8490592534a7882
Kernel: (master)74fca6a42863ffacaf7ba6f1936a9f228950f657

Bug detailed description:
-------------------------
Start X and the openarena, it sometimes blank screen when it enters openarena and sometimes it becomes blank screen when it exit the game. It is caused by the mode change when enter/exit the game in non-native mode. If I set the games resolution to align with its screen, there will be no such issue. This issue also exists on 965GM. 

Reproduce steps:
----------------
1. xinit &
2. run openarena
Comment 1 Jesse Barnes 2009-11-20 12:55:56 UTC
Does it happen with all panel fitting modes?
Comment 2 zhao jian 2009-11-22 19:11:27 UTC
(In reply to comment #1)
> Does it happen with all panel fitting modes?
Yes. With all combinations between X and app(they are in different mode) it will be blank screen, but if the X set to a lower resolution and openarena set to a higher resolution, then the openarena can't be started with the following error, is it acceptable or is it another bug?  
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  129 (XFree86-VidModeExtension)
  Minor opcode of failed request:  10 (XF86VidModeSwitchToMode)
  Value in failed request:  0x113
  Serial number of failed request:  137
  Current serial number in output stream:  139

Comment 3 Wang Zhenyu 2009-11-23 22:20:02 UTC
Created attachment 31432 [details] [review]
plane flush wait interruptible fix

Please help to test with this patch against 'drm-intel-next' branch.
Comment 4 zhao jian 2009-11-24 01:18:48 UTC
(In reply to comment #3)
> Created an attachment (id=31432) [details]
> plane flush wait interruptible fix
> Please help to test with this patch against 'drm-intel-next' branch.

With the your patch I tested it about 20 times consecutively on GM45, it works well. But if the X set to a lower resolution and openarena set to a higher resolution, then the openarena can't be started with the following error, is it acceptable or is it another bug?  
X Error of failed request:  BadValue (integer parameter out of range for
operation)
  Major opcode of failed request:  129 (XFree86-VidModeExtension)
  Minor opcode of failed request:  10 (XF86VidModeSwitchToMode)
  Value in failed request:  0x113
  Serial number of failed request:  137
  Current serial number in output stream:  139
Comment 5 Wang Zhenyu 2009-11-24 21:07:54 UTC
yeah, I think that should be different.
Comment 6 Gordon Jin 2009-11-30 21:37:31 UTC
Jian, please file a separate bug for the X error issue.

Zhenyu, where's your patch committed? for-linus?
Comment 7 Wang Zhenyu 2009-11-30 21:40:42 UTC
No, it's not committed. And I think I have a simpler patch for it, it's against xf86-video-intel instead. I haven't tested it at all, you may help to verify if it works.
Comment 8 Wang Zhenyu 2009-11-30 21:41:41 UTC
Created attachment 31614 [details] [review]
wait rendering to fb bo before modesetting

Test patch against xf86-video-intel.
Comment 9 Wang Zhenyu 2009-11-30 22:24:51 UTC
Created attachment 31615 [details] [review]
updated patch
Comment 10 Wang Zhenyu 2009-12-02 00:33:01 UTC
Jesse thought origin kernel patch might be better, so ignore the DDX patch testing.
Comment 11 zhao jian 2009-12-02 00:45:48 UTC
(In reply to comment #10)
> Jesse thought origin kernel patch might be better, so ignore the DDX patch
> testing.

OK. But we have tested this patch this afternoon, it works well on GM45.(more than 20 times consecutively) So, both your patch in kernel and the patch in 2D driver can fix the bug.
Comment 12 Gordon Jin 2009-12-02 00:53:51 UTC
Good. Can we push this to 2.6.32?

We failed to fix this important bug in Q3 release. I hope we can include it in Q4 release.
Comment 13 Wang Zhenyu 2010-01-18 23:40:45 UTC
Fixed in linus tree.
commit b9241ea31fae4887104e5d1b3b18f4009c25a0c4
Author: Zhenyu Wang <zhenyuw@linux.intel.com>
Date:   Wed Nov 25 13:09:39 2009 +0800

    drm/i915: Don't wait interruptible for possible plane buffer flush
    
Comment 14 zhao jian 2010-01-27 20:11:00 UTC
(In reply to comment #13)
> Fixed in linus tree.
> commit b9241ea31fae4887104e5d1b3b18f4009c25a0c4
> Author: Zhenyu Wang <zhenyuw@linux.intel.com>
> Date:   Wed Nov 25 13:09:39 2009 +0800
>     drm/i915: Don't wait interruptible for possible plane buffer flush

We tested with 2.6.33-rc5, it works well on GM965 now but still fail on GM45. 
Comment 15 Wang Zhenyu 2010-02-21 20:57:16 UTC
Should be fixed in recent kernel, pls test 2.6.33-rc8.
Comment 16 zhao jian 2010-02-25 00:07:17 UTC
(In reply to comment #15)
> Should be fixed in recent kernel, pls test 2.6.33-rc8.

It was fixed with the new code. 
Comment 17 Elizabeth 2017-10-06 14:54:31 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.