[Intel-gfx] [PATCH] create known state at startup time

Jesse Barnes jbarnes at virtuousgeek.org
Mon Mar 16 19:33:04 CET 2009


On Sunday, February 15, 2009 7:22:09 pm Zhenyu Wang wrote:
> On 2009.02.14 06:32:40 +0800, Jesse Barnes wrote:
> > Per bug 19603 (and possibly others), we may need to shut everything down
> > at server startup time in order to re-route planes & pipes when we set
> > modes. However, since the pipe A force quirk went in, we haven't been
> > properly disabling pipe A at startup.  This patch pulls the CRTC
> > enable/disable code out of the DPMS function, and calls it instead at
> > startup time to really disable things.
> >
> > According to some tests, this patch may actually remove the need for the
> > force quirk as well; but we'll need additional testing to confirm that.
>
> ...
>
> > +/**
> > + * Sets the power management mode of the pipe and plane.
> > + *
> > + * This code should probably grow support for turning the cursor off and
> > back + * on appropriately at the same time as we're turning the pipe
> > off/on. + */
> > +static void
> > +i830_crtc_dpms(xf86CrtcPtr crtc, int mode)
> > +{
> > +    ScrnInfoPtr pScrn = crtc->scrn;
> > +    I830Ptr pI830 = I830PTR(pScrn);
> > +    I830CrtcPrivatePtr intel_crtc = crtc->driver_private;
> > +    int pipe = intel_crtc->pipe;
> > +    Bool disable_pipe = TRUE;
> > +
> > +    /* XXX: When our outputs are all unaware of DPMS modes other than
> > off and +     * on, we should map those modes to DPMSModeOff in the CRTC.
> > +     */
> > +    switch (mode) {
> > +    case DPMSModeOn:
> > +    case DPMSModeStandby:
> > +    case DPMSModeSuspend:
> > +       i830_crtc_enable(crtc);
> > +       break;
> > +    case DPMSModeOff:
> > +       if ((pipe != 0) || !(pI830->quirk_flag & QUIRK_PIPEA_FORCE))
> > +           disable_pipe = FALSE;
>
> Shouldn't this be, if (pipe == 0 && (pI830->quirk_flag &
> QUIRK_PIPEA_FORCE))?

Yes you're right; I reversed the logic but kept the old code.  Fixed.  I 
posted a new patch to the bug for testing.

-- 
Jesse Barnes, Intel Open Source Technology Center



More information about the Intel-gfx mailing list