drm/nouveau/drm/nouveau: Fix runtime PM leak in nv50_disp_atomic_commit()
authorLyude Paul <lyude@redhat.com>
Thu, 12 Jul 2018 17:02:53 +0000 (13:02 -0400)
committerBen Skeggs <bskeggs@redhat.com>
Mon, 16 Jul 2018 07:59:59 +0000 (17:59 +1000)
A CRTC being enabled doesn't mean it's on! It doesn't even necessarily
mean it's being used. This fixes runtime PM leaks on the P50 I've got
next to me.

Signed-off-by: Lyude Paul <lyude@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/dispnv50/disp.c

index 9382e99a0bc7cf3fb073c998c6baca354286ef72..31b12b4f321acba06095d4d41c0019caf7d1ffc1 100644 (file)
@@ -1878,7 +1878,7 @@ nv50_disp_atomic_commit(struct drm_device *dev,
                nv50_disp_atomic_commit_tail(state);
 
        drm_for_each_crtc(crtc, dev) {
-               if (crtc->state->enable) {
+               if (crtc->state->active) {
                        if (!drm->have_disp_power_ref) {
                                drm->have_disp_power_ref = true;
                                return 0;