diff options
author | Dave Airlie <airlied@redhat.com> | 2009-09-21 00:33:58 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2009-09-21 01:00:27 -0400 |
commit | 28d520433b6375740990ab99d69b0d0067fd656b (patch) | |
tree | d3affea0fb69f84b9c924c03d78c5df23946306f /drivers/gpu/drm/i915/intel_display.c | |
parent | aadd4e17452d3d5c2269cd2b000b7de7cfb6c79e (diff) |
drm/vgaarb: add VGA arbitration support to the drm and kms.
VGA arb requires DRM support for non-kms drivers, to turn on/off
irqs when disabling the mem/io regions.
VGA arb requires KMS support for GPUs where we can turn off VGA
decoding. Currently we know how to do this for intel and radeon
kms drivers, which allows them to be removed from the arbiter.
This patch comes from Fedora rawhide kernel.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_display.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_display.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 155719ff99d1..0227b1652906 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -3917,3 +3917,20 @@ struct drm_encoder *intel_best_encoder(struct drm_connector *connector) | |||
3917 | 3917 | ||
3918 | return &intel_output->enc; | 3918 | return &intel_output->enc; |
3919 | } | 3919 | } |
3920 | |||
3921 | /* | ||
3922 | * set vga decode state - true == enable VGA decode | ||
3923 | */ | ||
3924 | int intel_modeset_vga_set_state(struct drm_device *dev, bool state) | ||
3925 | { | ||
3926 | struct drm_i915_private *dev_priv = dev->dev_private; | ||
3927 | u16 gmch_ctrl; | ||
3928 | |||
3929 | pci_read_config_word(dev_priv->bridge_dev, INTEL_GMCH_CTRL, &gmch_ctrl); | ||
3930 | if (state) | ||
3931 | gmch_ctrl &= ~INTEL_GMCH_VGA_DISABLE; | ||
3932 | else | ||
3933 | gmch_ctrl |= INTEL_GMCH_VGA_DISABLE; | ||
3934 | pci_write_config_word(dev_priv->bridge_dev, INTEL_GMCH_CTRL, gmch_ctrl); | ||
3935 | return 0; | ||
3936 | } | ||