Ticket #11729: drm-nouveau-set-irq_enabled-manually.patch

File drm-nouveau-set-irq_enabled-manually.patch, 1.4 KB (added by Cédric Schieli <cschieli@…>, 6 years ago)

Kernel patch

  • drivers/gpu/drm/nouveau/nouveau_drm.c

    From 7d3428cd4b2ad51af86fdbdf8284ca38fa95e601 Mon Sep 17 00:00:00 2001
    From: Ilia Mirkin <imirkin@alum.mit.edu>
    Date: Thu, 30 Jan 2014 00:53:00 +0000
    Subject: drm/nouveau: set irq_enabled manually
    
    Since commit 0fa9061ae8c ("drm/nouveau/mc: handle irq-related setup
    ourselves"), drm_device->irq_enabled remained unset. This is needed in
    order to properly wait for a vblank event in the generic drm code.
    
    See https://bugs.freedesktop.org/show_bug.cgi?id=74195
    
    Reported-by: Jan Janecek <janjanjanx@gmail.com>
    Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
    Cc: stable@vger.kernel.org # 3.10+
    Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
    ---
    diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c
    index 78c8e71..89c484d 100644
    a b nouveau_drm_load(struct drm_device *dev, unsigned long flags) 
    376376        if (ret)
    377377                goto fail_device;
    378378
     379        dev->irq_enabled = true;
     380
    379381        /* workaround an odd issue on nvc1 by disabling the device's
    380382         * nosnoop capability.  hopefully won't cause issues until a
    381383         * better fix is found - assuming there is one...
    nouveau_drm_remove(struct pci_dev *pdev) 
    475477        struct nouveau_drm *drm = nouveau_drm(dev);
    476478        struct nouveau_object *device;
    477479
     480        dev->irq_enabled = false;
    478481        device = drm->client.base.device;
    479482        drm_put_dev(dev);
    480483