drm/irq: Ditch DRIVER_IRQ_SHARED
This is only used by drm_irq_install(), which is an optional helper. For legacy pci devices this is required (due to interrupt sharing without msi/msi-x), and just making this the default exactly matches the behaviour of all existing drivers using the drm_irq_install() helpers. In case that ever becomes wrong drivers can roll their own irq handling, as many drivers already do (for other reasons like needing a threaded interrupt handler, or having an entire pile of different interrupt sources). v2: Rebase v3: Improve commit message (Emil) Cc: Sam Ravnborg <sam@ravnborg.org> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190129104248.26607-3-daniel.vetter@ffwll.ch
This commit is contained in:
parent
0e2a933b02
commit
1ff494813b
|
@ -1189,7 +1189,7 @@ amdgpu_get_crtc_scanout_position(struct drm_device *dev, unsigned int pipe,
|
|||
static struct drm_driver kms_driver = {
|
||||
.driver_features =
|
||||
DRIVER_USE_AGP | DRIVER_ATOMIC |
|
||||
DRIVER_IRQ_SHARED | DRIVER_GEM |
|
||||
DRIVER_GEM |
|
||||
DRIVER_PRIME | DRIVER_RENDER | DRIVER_MODESET | DRIVER_SYNCOBJ,
|
||||
.load = amdgpu_driver_load_kms,
|
||||
.open = amdgpu_driver_open_kms,
|
||||
|
|
|
@ -120,8 +120,8 @@ int drm_irq_install(struct drm_device *dev, int irq)
|
|||
if (dev->driver->irq_preinstall)
|
||||
dev->driver->irq_preinstall(dev);
|
||||
|
||||
/* Install handler */
|
||||
if (drm_core_check_feature(dev, DRIVER_IRQ_SHARED))
|
||||
/* PCI devices require shared interrupts. */
|
||||
if (dev->pdev)
|
||||
sh_flags = IRQF_SHARED;
|
||||
|
||||
ret = request_irq(irq, dev->driver->irq_handler,
|
||||
|
|
|
@ -468,8 +468,7 @@ static const struct file_operations psb_gem_fops = {
|
|||
};
|
||||
|
||||
static struct drm_driver driver = {
|
||||
.driver_features = DRIVER_IRQ_SHARED | \
|
||||
DRIVER_MODESET | DRIVER_GEM,
|
||||
.driver_features = DRIVER_MODESET | DRIVER_GEM,
|
||||
.load = psb_driver_load,
|
||||
.unload = psb_driver_unload,
|
||||
.lastclose = drm_fb_helper_lastclose,
|
||||
|
|
|
@ -3209,7 +3209,7 @@ static struct drm_driver driver = {
|
|||
* deal with them for Intel hardware.
|
||||
*/
|
||||
.driver_features =
|
||||
DRIVER_IRQ_SHARED | DRIVER_GEM | DRIVER_PRIME |
|
||||
DRIVER_GEM | DRIVER_PRIME |
|
||||
DRIVER_RENDER | DRIVER_MODESET | DRIVER_ATOMIC | DRIVER_SYNCOBJ,
|
||||
.release = i915_driver_release,
|
||||
.open = i915_driver_open,
|
||||
|
|
|
@ -57,7 +57,7 @@ static const struct file_operations mga_driver_fops = {
|
|||
static struct drm_driver driver = {
|
||||
.driver_features =
|
||||
DRIVER_USE_AGP | DRIVER_PCI_DMA | DRIVER_LEGACY |
|
||||
DRIVER_HAVE_DMA | DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED,
|
||||
DRIVER_HAVE_DMA | DRIVER_HAVE_IRQ,
|
||||
.dev_priv_size = sizeof(drm_mga_buf_priv_t),
|
||||
.load = mga_driver_load,
|
||||
.unload = mga_driver_unload,
|
||||
|
|
|
@ -245,7 +245,6 @@ static struct pci_driver qxl_pci_driver = {
|
|||
|
||||
static struct drm_driver qxl_driver = {
|
||||
.driver_features = DRIVER_GEM | DRIVER_MODESET | DRIVER_PRIME |
|
||||
DRIVER_IRQ_SHARED |
|
||||
DRIVER_ATOMIC,
|
||||
|
||||
.dumb_create = qxl_mode_dumb_create,
|
||||
|
|
|
@ -57,7 +57,7 @@ static const struct file_operations r128_driver_fops = {
|
|||
static struct drm_driver driver = {
|
||||
.driver_features =
|
||||
DRIVER_USE_AGP | DRIVER_PCI_DMA | DRIVER_SG | DRIVER_LEGACY |
|
||||
DRIVER_HAVE_DMA | DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED,
|
||||
DRIVER_HAVE_DMA | DRIVER_HAVE_IRQ,
|
||||
.dev_priv_size = sizeof(drm_r128_buf_priv_t),
|
||||
.load = r128_driver_load,
|
||||
.preclose = r128_driver_preclose,
|
||||
|
|
|
@ -534,9 +534,7 @@ radeon_get_crtc_scanout_position(struct drm_device *dev, unsigned int pipe,
|
|||
|
||||
static struct drm_driver kms_driver = {
|
||||
.driver_features =
|
||||
DRIVER_USE_AGP |
|
||||
DRIVER_IRQ_SHARED | DRIVER_GEM |
|
||||
DRIVER_PRIME | DRIVER_RENDER,
|
||||
DRIVER_USE_AGP | DRIVER_GEM | DRIVER_PRIME | DRIVER_RENDER,
|
||||
.load = radeon_driver_load_kms,
|
||||
.open = radeon_driver_open_kms,
|
||||
.postclose = radeon_driver_postclose_kms,
|
||||
|
|
|
@ -70,8 +70,7 @@ static const struct file_operations via_driver_fops = {
|
|||
|
||||
static struct drm_driver driver = {
|
||||
.driver_features =
|
||||
DRIVER_USE_AGP | DRIVER_HAVE_IRQ | DRIVER_LEGACY |
|
||||
DRIVER_IRQ_SHARED,
|
||||
DRIVER_USE_AGP | DRIVER_HAVE_IRQ | DRIVER_LEGACY,
|
||||
.load = via_driver_load,
|
||||
.unload = via_driver_unload,
|
||||
.open = via_driver_open,
|
||||
|
|
|
@ -1582,7 +1582,7 @@ static const struct file_operations vmwgfx_driver_fops = {
|
|||
};
|
||||
|
||||
static struct drm_driver driver = {
|
||||
.driver_features = DRIVER_IRQ_SHARED |
|
||||
.driver_features =
|
||||
DRIVER_MODESET | DRIVER_PRIME | DRIVER_RENDER | DRIVER_ATOMIC,
|
||||
.load = vmw_driver_load,
|
||||
.unload = vmw_driver_unload,
|
||||
|
|
|
@ -221,8 +221,7 @@ static void vbox_master_drop(struct drm_device *dev, struct drm_file *file_priv)
|
|||
|
||||
static struct drm_driver driver = {
|
||||
.driver_features =
|
||||
DRIVER_MODESET | DRIVER_GEM | DRIVER_IRQ_SHARED |
|
||||
DRIVER_PRIME | DRIVER_ATOMIC,
|
||||
DRIVER_MODESET | DRIVER_GEM | DRIVER_PRIME | DRIVER_ATOMIC,
|
||||
.dev_priv_size = 0,
|
||||
|
||||
.lastclose = drm_fb_helper_lastclose,
|
||||
|
|
|
@ -100,20 +100,20 @@ enum drm_driver_feature {
|
|||
* Set up DRM AGP support, see drm_agp_init(), the DRM core will manage
|
||||
* AGP resources. New drivers don't need this.
|
||||
*/
|
||||
DRIVER_USE_AGP = BIT(24),
|
||||
DRIVER_USE_AGP = BIT(25),
|
||||
/**
|
||||
* @DRIVER_LEGACY:
|
||||
*
|
||||
* Denote a legacy driver using shadow attach. Do not use.
|
||||
*/
|
||||
DRIVER_LEGACY = BIT(25),
|
||||
DRIVER_LEGACY = BIT(26),
|
||||
/**
|
||||
* @DRIVER_PCI_DMA:
|
||||
*
|
||||
* Driver is capable of PCI DMA, mapping of PCI DMA buffers to userspace
|
||||
* will be enabled. Only for legacy drivers. Do not use.
|
||||
*/
|
||||
DRIVER_PCI_DMA = BIT(26),
|
||||
DRIVER_PCI_DMA = BIT(27),
|
||||
/**
|
||||
* @DRIVER_SG:
|
||||
*
|
||||
|
@ -121,7 +121,7 @@ enum drm_driver_feature {
|
|||
* scatter/gather buffers will be enabled. Only for legacy drivers. Do
|
||||
* not use.
|
||||
*/
|
||||
DRIVER_SG = BIT(27),
|
||||
DRIVER_SG = BIT(28),
|
||||
|
||||
/**
|
||||
* @DRIVER_HAVE_DMA:
|
||||
|
@ -129,7 +129,7 @@ enum drm_driver_feature {
|
|||
* Driver supports DMA, the userspace DMA API will be supported. Only
|
||||
* for legacy drivers. Do not use.
|
||||
*/
|
||||
DRIVER_HAVE_DMA = BIT(28),
|
||||
DRIVER_HAVE_DMA = BIT(29),
|
||||
/**
|
||||
* @DRIVER_HAVE_IRQ:
|
||||
*
|
||||
|
@ -139,17 +139,7 @@ enum drm_driver_feature {
|
|||
* drm_irq_uninstall() helper functions, or roll their own irq support
|
||||
* code by calling request_irq() directly.
|
||||
*/
|
||||
DRIVER_HAVE_IRQ = BIT(29),
|
||||
/**
|
||||
* @DRIVER_IRQ_SHARED:
|
||||
*
|
||||
* Indicates to drm_irq_install() that a shared irq should be requested.
|
||||
*
|
||||
* FIXME: This should be an explicit argument for non-legacy drivers, or
|
||||
* at least the default for PCI devices (which would cover all current
|
||||
* users).
|
||||
*/
|
||||
DRIVER_IRQ_SHARED = BIT(30),
|
||||
DRIVER_HAVE_IRQ = BIT(30),
|
||||
/**
|
||||
* @DRIVER_KMS_LEGACY_CONTEXT:
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue