Fix gnome-shell (and other page-flip users) hanging after suspend/resume because of the gma500's IRQs not working. This fixes 2 problems with the IRQ handling: 1. gma_power_off() calls gma_irq_uninstall() which does a free_irq(), but gma_power_on() called gma_irq_preinstall() + gma_irq_postinstall() which do not call request_irq. Replace the pre- + post-install calls with gma_irq_install() which does prep + request + post. 2. After fixing 1. IRQs still do not work on a Packard Bell Dot SC (Intel Atom N2600, cedarview) netbook. Cederview uses MSI interrupts and it seems that the BIOS re-configures things back to normal APIC based interrupts during S3 suspend. There is some MSI PCI-config registers save/restore code which tries to deal with this, but on the Packard Bell Dot SC this is not sufficient to restore MSI IRQ functionality after a suspend/resume. Replace the PCI-config registers save/restore with pci_disable_msi() on suspend + pci_enable_msi() on resume. Fixing e.g. gnome-shell hanging. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/20220906203852.527663-4-hdegoede@redhat.com (cherry picked from commit 235fdbc32d559db21e580f85035c59372704f09e)
30 lines
1022 B
C
30 lines
1022 B
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/**************************************************************************
|
|
* Copyright (c) 2009-2011, Intel Corporation.
|
|
* All Rights Reserved.
|
|
*
|
|
* Authors:
|
|
* Benjamin Defnet <benjamin.r.defnet@intel.com>
|
|
* Rajesh Poornachandran <rajesh.poornachandran@intel.com>
|
|
*
|
|
**************************************************************************/
|
|
|
|
#ifndef _PSB_IRQ_H_
|
|
#define _PSB_IRQ_H_
|
|
|
|
struct drm_crtc;
|
|
struct drm_device;
|
|
|
|
void gma_irq_preinstall(struct drm_device *dev);
|
|
void gma_irq_postinstall(struct drm_device *dev);
|
|
int gma_irq_install(struct drm_device *dev);
|
|
void gma_irq_uninstall(struct drm_device *dev);
|
|
|
|
int gma_crtc_enable_vblank(struct drm_crtc *crtc);
|
|
void gma_crtc_disable_vblank(struct drm_crtc *crtc);
|
|
u32 gma_crtc_get_vblank_counter(struct drm_crtc *crtc);
|
|
void gma_enable_pipestat(struct drm_psb_private *dev_priv, int pipe, u32 mask);
|
|
void gma_disable_pipestat(struct drm_psb_private *dev_priv, int pipe, u32 mask);
|
|
|
|
#endif /* _PSB_IRQ_H_ */
|