Bug 21715 - [i915 KMS] FBIOPUT_VSCREENINFO fails on DRM fb device
Summary: [i915 KMS] FBIOPUT_VSCREENINFO fails on DRM fb device
Status: CLOSED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: XOrg git
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Jesse Barnes
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-13 06:46 UTC by Tobias Jakobi
Modified: 2017-07-24 23:10 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Tobias Jakobi 2009-05-13 06:46:39 UTC
Hi there,

I just got KMS set up on my Intel i915 based laptop system.

Now using a 2.6.30-rc5 vanilla kernel (distro is Gentoo Linux), xorg-server-1.6.2_rc1, xf86-video-intel git master, mesa git master and libdrm git master.

fbcon works out of the box. I just load the i915 module with modeset=1 during the init process and voila: Native resolution on my laptop display.
Starting X also works fine and switching back and forth between VT and X works like a charm (and is very fast).

The only problem I encountered is that mplayer won't do any playback through the framebuffer device anymore. I tried both the fbdev and fbdev2 backend, but both fail.

fbdev gives me this:
Can't put VSCREENINFO: Invalid argument
FATAL: Cannot initialize video driver.

fbdev2 says nearly the same:
[fbdev2] Can't put VSCREENINFO: Invalid argument

I can't find any suspicious warnings or error in dmesg.
I found this on LKML: http://lkml.org/lkml/2009/4/28/95

Looks like the same problem to me. I didn't find a bugreport for this, so I decived to post it here. Hope this is the right component.

Greets,
Tobias
Comment 1 Jesse Barnes 2009-06-23 17:29:10 UTC
Yeah, this is the right place.  Adding support for more fb functionality is planned, but not high priority...
Comment 2 Shuang He 2009-06-23 18:23:33 UTC
Yes, I also met this issue. and You can temporarily work around this issue by comment out following lines in libvo/vo_fbdev.c:

#if 0
        if (fb_tty_fd >= 0 && ioctl(fb_tty_fd, KDSETMODE, KD_GRAPHICS) < 0) {
                mp_msg(MSGT_VO, MSGL_V, "Can't set graphics mode: %s\n", strerror(errno));
                close(fb_tty_fd);
                fb_tty_fd = -1;
        }
        if (ioctl(fb_dev_fd, FBIOPUT_VSCREENINFO, &fb_vinfo)) {
                mp_msg(MSGT_VO, MSGL_ERR, "Can't put VSCREENINFO: %s\n", strerror(errno));
                if (fb_tty_fd >= 0 && ioctl(fb_tty_fd, KDSETMODE, KD_TEXT) < 0) {
                        mp_msg(MSGT_VO, MSGL_ERR, "Can't restore text mode: %s\n", strerror(errno));
                }
                return 1;
        }
#endif
Comment 3 Jesse Barnes 2009-08-31 10:27:51 UTC
Changing summary; sounds like this is the ioctl that's failing.
Comment 4 Tobias Jakobi 2009-08-31 17:31:58 UTC
Does is make sense to retest this with a 2.6.31 kernel once there is a stable release? I'm asking because someone might know if this bug (?) is likely to be fixed in the next kernel release.
Comment 5 Jesse Barnes 2009-08-31 17:50:31 UTC
> --- Comment #4 from Tobias Jakobi <liquid.acid@gmx.net>  2009-08-31
> 17:31:58 PST --- Does is make sense to retest this with a 2.6.31
> kernel once there is a stable release? I'm asking because someone
> might know if this bug (?) is likely to be fixed in the next kernel
> release.

It won't be fixed in 2.6.31, but maybe 2.6.32.

Comment 6 Jesse Barnes 2009-11-20 13:02:48 UTC
Does this patchset help?

http://archive.netbsd.se/?ml=dri-devel&a=2009-11&m=11937282
Comment 7 Tobias Jakobi 2009-11-20 14:12:11 UTC
You mean the three patches (v3) by Clemens Ladisch?

Patching vanilla 2.6.31.6 with these doesn't work (obviously since drm_fb_helper.c is missing). So which kernel version should I use to apply the patches and do the checks?
Comment 8 Jesse Barnes 2009-11-20 14:18:12 UTC
Probably best to use Dave's development tree at git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6.git drm-next branch.
Comment 9 Tobias Jakobi 2009-11-21 02:51:21 UTC
Yep, that works much better.

Both the fbdev and the fbdev2 backend don't exit with an error anymore. fbdev2 renders fine, but I see some tearing. fbdev also renders, but the visuals are messed up - but that's probably a different issue.

So I'm happily voting for inclusion of Clemens' patchset! :)
Comment 10 Tobias Jakobi 2009-12-16 01:21:58 UTC
Resolving bug to FIXED, since patches are now in vanilla 2.6.32.1


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.