[PATCH] Disable CRTCs when disabling the outputs

Piotr Redlewski predlewski at gmail.com
Mon Jun 22 03:01:16 PDT 2015


2015-06-22 9:49 GMT+02:00 Michel Dänzer <michel at daenzer.net>:

> On 21.06.2015 23:30, Piotr Redlewski wrote:
> > When turning the outputs off (DPMSModeOff), CRTCs stayed enabled. This
> led
> > to higher card temperatures than with fglrx driver.
> >
> > Signed-off-by: Piotr Redlewski <predlewski at gmail.com>
> > ---
> >  src/drmmode_display.c | 9 ++++++++-
> >  1 file changed, 8 insertions(+), 1 deletion(-)
> >
> > diff --git a/src/drmmode_display.c b/src/drmmode_display.c
> > index 3564853..04b4341 100644
> > --- a/src/drmmode_display.c
> > +++ b/src/drmmode_display.c
> > @@ -342,7 +342,14 @@ drmmode_do_crtc_dpms(xf86CrtcPtr crtc, int mode)
> >  static void
> >  drmmode_crtc_dpms(xf86CrtcPtr crtc, int mode)
> >  {
> > -     /* Nothing to do. drmmode_do_crtc_dpms() is called as appropriate
> */
> > +     drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
> > +     drmmode_ptr drmmode = drmmode_crtc->drmmode;
> > +
> > +     /* Disable unused CRTCs */
> > +     if (!crtc->enabled && mode != DPMSModeOn) {
>
> Maybe this should be
>
>         if (!crtc->enabled || mode != DPMSModeOn) {
>
> or can it actually happen that !crtc->enabled and mode == DPMSModeOn?
>
> ​Just wanted to be safe here, but I think you are right. I'll send v2
later today.


> > +             drmModeSetCrtc(drmmode->fd,
> drmmode_crtc->mode_crtc->crtc_id,
> > +                            0, 0, 0, NULL, 0, NULL);
> > +     }
> >  }
> >
> >  static PixmapPtr
> >
>
> Other than that, looks good to me.
>
>
> --
> Earthling Michel Dänzer               |               http://www.amd.com
> Libre software enthusiast             |             Mesa and X developer
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.x.org/archives/xorg-driver-ati/attachments/20150622/c0f76686/attachment.html>


More information about the xorg-driver-ati mailing list