[Intel-gfx] [PATCH]drm_i915: remove unnecessary object pin for mode set

Jesse Barnes jbarnes at virtuousgeek.org
Thu Jun 11 18:36:12 CEST 2009


On Mon, 18 May 2009 10:10:06 +0800
Shaohua Li <shaohua.li at intel.com> wrote:

> On Fri, May 15, 2009 at 11:25:11PM +0800, Jesse Barnes wrote:
> > On Fri, 15 May 2009 10:49:33 +0800
> > Shaohua Li <shaohua.li at intel.com> wrote:
> > 
> > > I get this log when using xrandr set display resolution in kms:
> > > [   52.795810] [drm:i915_gem_object_unbind] *ERROR* Attempting to
> > > unbind pinned buffer [   52.795824] ------------[ cut
> > > here ]------------ [   52.795829] WARNING:
> > > at /workshop/kernel/git/my/linux/drivers/gpu/drm/i915/i915_gem_tiling.c:320
> > > i915_gem_set_tiling+0x3a9/0x412() [   52.795836] Hardware name:
> > > Calistoga & ICH7M Chipset [   52.795840] failed to unbind object
> > > for tiling switchModules linked in: [   52.795851] Pid: 1991,
> > > comm: X Not tainted 2.6.30-rc5 #318 [   52.795855] Call Trace:
> > > [   52.795868] [<c02475f8>] warn_slowpath_fmt+0x77/0xa6
> > > [   52.795879] [<c0617e60>] ? _spin_unlock_irqrestore+0x1c/0x31
> > > [   52.795887] [<c0247b9a>] ? release_console_sem+0x180/0x1ad
> > > [   52.795894] [<c0248078>] ? vprintk+0x2ab/0x2e0 [   52.795905]
> > > [<c0292f64>] ? __generic_file_aio_write_nolock+0x3d4/0x40c
> > > [   52.795913] [<c0615650>] ? printk+0x14/0x16 [   52.795922]
> > > [<c043fbbf>] ? i915_gem_object_unbind+0x43/0x200 [   52.795931]
> > > [<c0443e1f>] i915_gem_set_tiling+0x3a9/0x412 [   52.795940]
> > > [<c042cd43>] drm_ioctl+0x215/0x29b [   52.795947]  [<c0443a76>] ?
> > > i915_gem_set_tiling+0x0/0x412 [   52.795957]  [<c02fffb7>] ?
> > > ext3_file_write+0x1f/0x90 [   52.795966]  [<c02b738a>] ?
> > > do_sync_write+0xb0/0xee [   52.795976]  [<c02c2744>]
> > > vfs_ioctl+0x55/0x6e [   52.795985]  [<c02c2bf3>]
> > > do_vfs_ioctl+0x496/0x4cf [   52.795993]  [<c02b7cee>] ?
> > > vfs_write+0xf5/0x109 [   52.796002]  [<c02c2c5d>]
> > > sys_ioctl+0x31/0x4a [   52.796011]  [<c021de70>]
> > > sysenter_do_call+0x12/0x22 [   52.796017] ---[ end trace
> > > 8cb90508f72e0a4d ]---
> > > 
> > > dri_bo_unreference() try to free the front buffer and will set the
> > > tiling to NONE, but the bo is pined in intel_pipe_set_base(), so
> > > the warning is reported. It appears the bo isn't required to be
> > > pinned in intel_pipe_set_base(), as either 2d driver or intel fb
> > > will pin the front buffer, and the pin will confuse 2d driver.
> > > 
> > > Signed-off-by: Shaohua Li <shaohua.li at intel.com>
> > > 
> > 
> > Yes the 2D driver is confused here, but I'm pretty sure we want to
> > keep the pin in pipe_set_base.  With KMS we shouldn't have to do
> > userspace pinning at all.  I think this is really a 2D teardown
> > problem, not a kernel problem.
> Even 2d doesn't pin the bo, bo_unreference() will still try to set
> tiling, so the warning will reported too, as the bo is still pinned.

I think this is fixed now, by the 'unpin when changing tiling' in the
kernel fix?

Jesse

-- 
Jesse Barnes, Intel Open Source Technology Center



More information about the Intel-gfx mailing list