[Intel-gfx] [PATCH] DRI2: Don't swap pipes under DRI2

Jesse Barnes jbarnes at virtuousgeek.org
Fri Jan 16 19:02:06 CET 2009


On Tuesday, January 13, 2009 7:06 pm Li Peng wrote:
> On Tue, 2009-01-13 at 08:47 -0800, Jesse Barnes wrote:
> > On Tuesday, January 13, 2009 1:19 am Li Peng wrote:
> > > On Tue, 2009-01-13 at 15:27 +0800, Zhenyu Wang wrote:
> > > > On 2009.01.07 18:38:19 -0800, Jesse Barnes wrote:
> > > > > On Wednesday, January 7, 2009 6:25 pm Li Peng wrote:
> > > > > > Resend to fix patch format
> > > > > >
> > > > > > >From ea9fc2a5c4737d26464bb4533ff0c8af739f42f4 Mon Sep 17
> > > > > > > 00:00:00 2001
> > > > > >
> > > > > > From: Li Peng <peng.li at intel.com>
> > > > > > Date: Thu, 8 Jan 2009 10:13:05 +0800
> > > > > > Subject: Don't swap pipes under DRI2, it fixes VT switch failure
> > > > > > on 945GM
> > > > > >
> > > > > > Signed-off-by: Li Peng <peng.li at intel.com>
> > > > > > ---
> > > > > >  src/i830_driver.c |    1 +
> > > > > >  1 files changed, 1 insertions(+), 0 deletions(-)
> > > > > >
> > > > > > diff --git a/src/i830_driver.c b/src/i830_driver.c
> > > > > > index beb134d..5489890 100644
> > > > > > --- a/src/i830_driver.c
> > > > > > +++ b/src/i830_driver.c
> > > > > > @@ -2960,6 +2960,7 @@ I830SwapPipes(ScrnInfoPtr pScrn)
> > > > > >      * Also make sure the DRM can handle the swap.
> > > > > >      */
> > > > > >     if (I830LVDSPresent(pScrn) && !IS_I965GM(pI830) &&
> > > > > > !IS_GM45(pI830) && +       (pI830->directRenderingType !=
> > > > > > DRI_DRI2) &&
> > > > > >         (pI830->directRenderingType != DRI_XF86DRI ||
> > > > > >  	(pI830->directRenderingType == DRI_XF86DRI && pI830->drmMinor
> > > > > > >= 10))) { xf86DrvMsg(pScrn->scrnIndex, X_INFO, "adjusting
> > > > > > plane->pipe mappings "
> > > > >
> > > > > It would be nice if we could allow the pipe/plane swap and make
> > > > > DRI2 work correctly in that case.  But I just ran into this today
> > > > > too, so it would be nice to have fixed or at least worked around
> > > > > for now (i.e. this should go into the 2.6 release).
> > > >
> > > > drmMinor is still 6 in kernel now, so this swapping never happen now,
> > > > which means fbc on pre-965 mobile has already been broken.
> > > >
> > > > So many difference between recent drm i915 vs. code in origin drm
> > > > git, that I don't know what should be the right fix. We may disable
> > > > fbc now for 2.6.0, and fix it later. Idea?
> > >
> > > Disable fbc doesn't fix this problem in my test on 945GM.
> >
> > An alternate fix for this is to prevent waiting on disabled pipes and to
> > timeout properly in libdrm's vblank wait function.  Both of those patches
> > are upstream now so this one shouldn't be required.
>
> I tried Eric's drm-intel-2.6.28 kernel branch, xf86-video-intel 2.5.99.2
> and latest libdrm, still got this problem.

Yeah Zhenyu and I discussed this on Tue.  I mistakenly thought that this patch 
fixed the same bug we saw in the compiz VT switch hang, but it's actually a 
separate fix for the fact that pipe swapping seems to have broken (which 
isn't surprising; we haven't tested it much since the required DRM minor 
never made it upstream).  Zhenyu may have an update here; he was tracking the 
pipe swap breakage (looked like the routing was wrong after VT switch).

-- 
Jesse Barnes, Intel Open Source Technology Center



More information about the Intel-gfx mailing list