Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Commits on Sep 1, 2013
  1. drm/radeon: use new drm_kick_out_firmware()

    authored
    Kick out firmware DRM and fbdev drivers via the new
    drm_kick_out_firmware() before loading radeon.
    
    Cc: Alex Deucher <alexander.deucher@amd.com>
    Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
  2. drm/i915: use new drm_kick_out_firmware()

    authored
    Use the new DRM infrastructure to kick out firmware DRM drivers before
    loading i915.
    
    Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
    Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
  3. drm: nouveau: kick out firmware drivers during probe

    authored
    Use the new DRM infrastructure to kick out firmware drivers before probing
    the real driver.
    
    Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com>
    Cc: Ben Skeggs <bskeggs@redhat.com>
    Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
  4. drm: add helpers to kick out firmware drivers

    authored
    If we load a real hardware DRM driver, we want all firmware drivers to be
    unloaded. Historically, this was done via
    remove_conflicting_framebuffers(), but for DRM drivers (like SimpleDRM) we
    need a new way.
    
    This patch introduces DRIVER_FIRMWARE and DRM apertures to provide a quite
    similar way to kick out firmware DRM drivers. Additionally, unlike the
    fbdev equivalent, DRM firmware drivers can now query the system whether a
    real hardware driver is already loaded and prevent loading themselves.
    
    Whenever a real hardware DRM driver is loaded which claims to provide the
    boot fw FB, we invalidate the firmware framebuffer. Otherwise, simpledrm
    could be loaded again, after a real hw-driver was unloaded (which is
    very unlikely to work, except if hw-drivers reset fw FBs during unload).
    Note that fbdev doesn't provide such protection against late driver
    probing.
    
    Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
    Tested-by: Stephen Warren <swarren@nvidia.com>
  5. drm: simpledrm: add fbdev fallback support

    authored
    Create a simple fbdev device during SimpleDRM setup so legacy user-space
    and fbcon can use it.
    
    Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
    Tested-by: Stephen Warren <swarren@nvidia.com>
  6. drm: add SimpleDRM driver

    authored
    The SimpleDRM driver binds to simple-framebuffer devices and provides a
    DRM/KMS API. It provides only a single CRTC+encoder+connector combination
    plus one initial mode.
    
    Userspace can create one dumb-buffer and attach it to the CRTC. Only if
    the buffer is destroyed, a new buffer can be created. The buffer is
    directly mapped into user-space, so we have only resources for a single
    buffer. Otherwise, shadow buffers plus damage-request would be needed.
    
    Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
    Tested-by: Stephen Warren <swarren@nvidia.com>
  7. Merge remote-tracking branch 'tip/x86/fb' into sdrm

    authored
    Merge x86 fb-setup cleanup from tip tree.
  8. drm: fix DRM_IOCTL_MODE_GETFB handle-leak

    authored
    DRM_IOCTL_MODE_GETFB is used to retrieve information about a given
    framebuffer ID. It is a read-only helper and was thus declassified for
    unprivileged access in:
    
      commit a14b1b4
      Author: Mandeep Singh Baines <mandeep.baines@gmail.com>
      Date:   Fri Jan 20 12:11:16 2012 -0800
    
          drm: remove master fd restriction on mode setting getters
    
    However, alongside width, height and stride information,
    DRM_IOCTL_MODE_GETFB also passes back a handle to the underlying buffer of
    the framebuffer. This handle allows users to mmap() it and read or write
    into it. Obviously, this should be restricted to DRM-Master.
    
    With the current setup, *any* process with access to /dev/dri/card0 (which
    means any process with access to hardware-accelerated rendering) can
    access the current screen framebuffer and modify it ad libitum.
    
    For backwards-compatibility reasons we want to keep the
    DRM_IOCTL_MODE_GETFB call unprivileged. Besides, it provides quite useful
    information regarding screen setup. So we simply test whether the caller
    is the current DRM-Master and if not, we return 0 as handle, which is
    always invalid. A following DRM_IOCTL_GEM_CLOSE on this handle will fail
    with EINVAL, but we accept this. Users shouldn't test for errors during
    GEM_CLOSE, anyway. And it is still better as a failing MODE_GETFB call.
    
    v2: add capable(CAP_SYS_ADMIN) check for compatibility with i-g-t
    
    Cc: <stable@vger.kernel.org>
    Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
    Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Commits on Aug 29, 2013
  1. Merge tag 'drm-intel-next-2013-08-23' of git://people.freedesktop.org…

    Dave Airlie authored
    …/~danvet/drm-intel into drm-next
    
    Need to get my stuff out the door ;-) Highlights:
    - pc8+ support from Paulo
    - more vma patches from Ben.
    - Kconfig option to enable preliminary support by default (Josh
      Triplett)
    - Optimized cpu cache flush handling and support for write-through caching
      of display planes on Iris (Chris)
    - rc6 tuning from Stéphane Marchesin for more stability
    - VECS seqno wrap/semaphores fix (Ben)
    - a pile of smaller cleanups and improvements all over
    
    Note that I've ditched Ben's execbuf vma conversion for 3.12 since not yet
    ready. But there's still other vma conversion stuff in here.
    
    * tag 'drm-intel-next-2013-08-23' of git://people.freedesktop.org/~danvet/drm-intel: (62 commits)
      drm/i915: Print seqnos as unsigned in debugfs
      drm/i915: Fix context size calculation on SNB/IVB/VLV
      drm/i915: Use POSTING_READ in lcpll code
      drm/i915: enable Package C8+ by default
      drm/i915: add i915.pc8_timeout function
      drm/i915: add i915_pc8_status debugfs file
      drm/i915: allow package C8+ states on Haswell (disabled)
      drm/i915: fix SDEIMR assertion when disabling LCPLL
      drm/i915: grab force_wake when restoring LCPLL
      drm/i915: drop WaMbcDriverBootEnable workaround
      drm/i915: Cleaning up the relocate entry function
      drm/i915: merge HSW and SNB PM irq handlers
      drm/i915: fix how we mask PMIMR when adding work to the queue
      drm/i915: don't queue PM events we won't process
      drm/i915: don't disable/reenable IVB error interrupts when not needed
      drm/i915: add dev_priv->pm_irq_mask
      drm/i915: don't update GEN6_PMIMR when it's not needed
      drm/i915: wrap GEN6_PMIMR changes
      drm/i915: wrap GTIMR changes
      drm/i915: add the FCLK case to intel_ddi_get_cdclk_freq
      ...
  2. @keith-packard

    drm: Advertise async page flip ability through GETCAP ioctl

    keith-packard authored Dave Airlie committed
    Let applications know whether the kernel supports asynchronous page
    flipping.
    
    Signed-off-by: Keith Packard <keithp@keithp.com>
    Signed-off-by: Dave Airlie <airlied@gmail.com>
  3. @keith-packard

    drm: Add DRM_MODE_PAGE_FLIP_ASYNC flag definition

    keith-packard authored Dave Airlie committed
    This requests that the driver perform the page flip as soon as
    possible, not necessarily waiting for vblank.
    
    Signed-off-by: Keith Packard <keithp@keithp.com>
    Signed-off-by: Dave Airlie <airlied@gmail.com>
  4. @keith-packard

    drm: Pass page flip ioctl flags to driver

    keith-packard authored Dave Airlie committed
    This lets drivers see the flags requested by the application
    
    [airlied: fixup for rcar/imx/msm]
    
    Signed-off-by: Keith Packard <keithp@keithp.com>
    Signed-off-by: Dave Airlie <airlied@gmail.com>
  5. @airlied

    drm/omap: tiler: clear buffer properly

    Dan Carpenter authored airlied committed
    We're taking the sizeof() the wrong thing so it doesn't clear the whole
    buffer.
    
    Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
    Acked-by: Rob Clark <robdclark@gmail.com>
    Signed-off-by: Dave Airlie <airlied@gmail.com>
  6. @thierryreding @airlied

    drm/prime: Remove PRIME handles only if supported

    thierryreding authored airlied committed
    Drivers that don't support PRIME will not have initialized the PRIME
    specific private component of struct drm_file. If called for such
    drivers, the drm_gem_remove_prime_handles() function will crash. Fix
    it by checking for PRIME support prior to removing the PRIME handles.
    
    Signed-off-by: Thierry Reding <treding@nvidia.com>
    Signed-off-by: Dave Airlie <airlied@gmail.com>
  7. @airlied

    drm: Remove the dithering_mode_property field

    Damien Lespiau authored airlied committed
    Unfortunately, I haven't been thorough enough in:
    
      commit ddecb10
      Author: Lespiau, Damien <damien.lespiau@intel.com>
      Date:   Tue Aug 20 00:53:04 2013 +0100
    
          drm: Remove drm_mode_create_dithering_property()
    
    And forgot to remove the dithering_mode_property member of struct
    drm_mode_config.
    
    Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
    Signed-off-by: Dave Airlie <airlied@gmail.com>
  8. @airlied

    drm/prime: double lock typo

    Dan Carpenter authored airlied committed
    There is a typo so deadlocks on error instead of unlocking.
    
    Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
    Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
    Signed-off-by: Dave Airlie <airlied@gmail.com>
  9. @airlied

    drm/vmwgfx: fix error return code in vmw_driver_load()

    Wei Yongjun authored airlied committed
    Fix to return -ENOMEM in the fence manager init error handling
    case instead of 0, as done elsewhere in this function.
    
    Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
    Acked-by: Dmitry Torokhov <dtor@vmware.com>
    Signed-off-by: Dave Airlie <airlied@gmail.com>
  10. @airlied

    drm: implement experimental render nodes

    authored airlied committed
    Render nodes provide an API for userspace to use non-privileged GPU
    commands without any running DRM-Master. It is useful for offscreen
    rendering, GPGPU clients, and normal render clients which do not perform
    modesetting.
    
    Compared to legacy clients, render clients no longer need any
    authentication to perform client ioctls. Instead, user-space controls
    render/client access to GPUs via filesystem access-modes on the
    render-node. Once a render-node was opened, a client has full access to
    the client/render operations on the GPU. However, no modesetting or ioctls
    that affect global state are allowed on render nodes.
    
    To prevent privilege-escalation, drivers must explicitly state that they
    support render nodes. They must mark their render-only ioctls as
    DRM_RENDER_ALLOW so render clients can use them. Furthermore, they must
    support clients without any attached master.
    
    If filesystem access-modes are not enough for fine-grained access control
    to render nodes (very unlikely, considering the versaitlity of FS-ACLs),
    you may still fall-back to fd-passing from server to client (which allows
    arbitrary access-control). However, note that revoking access is
    currently impossible and unlikely to get implemented.
    
    Note: Render clients no longer have any associated DRM-Master as they are
    supposed to be independent of any server state. DRM core highly depends on
    file_priv->master to be non-NULL for modesetting/ctx/etc. commands.
    Therefore, drivers must be very careful to not require DRM-Master if they
    support DRIVER_RENDER.
    
    So far render-nodes are protected by "drm_rnodes". As long as this
    module-parameter is not set to 1, a driver will not create render nodes.
    This allows us to experiment with the API a bit before we stabilize it.
    
    v2: drop insecure GEM_FLINK to force use of dmabuf
    
    Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>
  11. @airlied

    video/hdmi: Rename HDMI_IDENTIFIER to HDMI_IEEE_OUI

    Lespiau, Damien authored airlied committed
    HDMI_IDENTIFIER was felt too generic, rename it to what it is, the IEEE
    OUI corresponding to HDMI Licensing, LLC.
    
    http://standards.ieee.org/develop/regauth/oui/oui.txt
    
    Cc: Thierry Reding <thierry.reding@gmail.com>
    Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
    Reviewed-by: Thierry Reding <treding@nvidia.com>
    Signed-off-by: Dave Airlie <airlied@gmail.com>
  12. @airlied

    drm/i915/hdmi: Write HDMI vendor specific infoframes

    Lespiau, Damien authored airlied committed
    With all the common infoframe bits now in place, we can finally write
    the vendor specific infoframes in our driver.
    
    Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
    Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
    Reviewed-by: Thierry Reding <treding@nvidia.com>
    Signed-off-by: Dave Airlie <airlied@gmail.com>
  13. @airlied

    drm: Add a helper to forge HDMI vendor infoframes

    Lespiau, Damien authored airlied committed
    This can then be used by DRM drivers to setup their vendor infoframes.
    
    v2: Fix hmdi typo (Simon Farnsworth)
    v3: Adapt to the hdmi_vendor_infoframe rename
    
    Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
    Reviewed-by: Simon Farnsworth <simon.farnsworth@onelan.co.uk>
    Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
    Reviewed-by: Thierry Reding <treding@nvidia.com>
    Signed-off-by: Dave Airlie <airlied@gmail.com>
  14. @airlied

    video/hdmi: Use hdmi_vendor_infoframe for the HDMI specific infoframe

    Lespiau, Damien authored airlied committed
    We just got rid of the version of hdmi_vendor_infoframe that had a byte
    array for anyone to poke at. It's now time to shuffle around the naming
    of hdmi_hdmi_infoframe to make hdmi_vendor_infoframe become the HDMI
    vendor specific structure.
    
    Cc: Thierry Reding <thierry.reding@gmail.com>
    Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
    Reviewed-by: Thierry Reding <treding@nvidia.com>
    Signed-off-by: Dave Airlie <airlied@gmail.com>
  15. @airlied

    video/hdmi: Hook the HDMI vendor infoframe with the generic _pack()

    Lespiau, Damien authored airlied committed
    With this last bit, hdmi_infoframe_pack() is now able to pack any
    infoframe we support.
    
    At the same time, because it's impractical to make two commits out of
    this, we get rid of the version that encourages the open coding of the
    vendor infoframe packing. We can do so because the only user of this API
    has been ported in:
    
      Author: Damien Lespiau <damien.lespiau@intel.com>
      Date:   Mon Aug 12 18:08:37 2013 +0100
    
          gpu: host1x: Port the HDMI vendor infoframe code the common helpers
    
    v2: Change oui to be an unsigned int (Ville Syrjälä)
    
    Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
    Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
    Reviewed-by: Thierry Reding <treding@nvidia.com>
    Signed-off-by: Dave Airlie <airlied@gmail.com>
  16. @airlied

    drm/edid: Move HDMI_IDENTIFIER to hdmi.h

    Lespiau, Damien authored airlied committed
    We'll need the HDMI OUI for the HDMI vendor infoframe data, so let's
    move the DRM one to hdmi.h, might as well use the hdmi header to store
    some hdmi defines.
    
    (Note that, in fact, infoframes are part of the CEA-861 standard, and
    only the HDMI vendor specific infoframe is special to HDMI, but
    details..)
    
    Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
    Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
    Reviewed-by: Thierry Reding <treding@nvidia.com>
    Signed-off-by: Dave Airlie <airlied@gmail.com>
  17. @airlied

    gpu: host1x: Port the HDMI vendor infoframe code the common helpers

    Lespiau, Damien authored airlied committed
    I just wrote the bits to define and pack HDMI vendor specific infoframe.
    Port the host1x driver to use those so I can refactor the infoframe code
    a bit more.
    
    This changes the length of the infoframe payload from 6 to 5, which is
    enough for the "frame packing" stereo format.
    
    v2: Pimp up the commit message with the note about the length
        (Ville Syrjälä)
    
    Cc: Thierry Reding <thierry.reding@gmail.com>
    Cc: Terje Bergström <tbergstrom@nvidia.com>
    Cc: linux-tegra@vger.kernel.org
    
    Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
    Reviewed-by: Thierry Reding <treding@nvidia.com>
    Signed-off-by: Dave Airlie <airlied@gmail.com>
  18. @airlied

    video/hdmi: Introduce helpers for the HDMI vendor specific infoframe

    Lespiau, Damien authored airlied committed
    Provide the same programming model than the other infoframe types.
    
    The generic _pack() function can't handle those yet as we need to move
    the vendor OUI in the generic hdmi_vendor_infoframe structure to know
    which kind of vendor infoframe we are dealing with.
    
    v2: Fix the value of Side-by-side (half), hmdi typo, pack 3D_Ext_Data
        (Ville Syrjälä)
    v3: Future proof the sending of 3D_Ext_Data (Ville Syrjälä), Fix
        multi-lines comment style (Thierry Reding)
    
    Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
    Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
    Reviewed-by: Thierry Reding <treding@nvidia.com>
    Signed-off-by: Dave Airlie <airlied@gmail.com>
  19. @airlied

    video/hdmi: Derive the bar data valid bit from the bar data fields

    Lespiau, Damien authored airlied committed
    Just like:
    
      Author: Damien Lespiau <damien.lespiau@intel.com>
      Date:   Mon Aug 12 11:53:24 2013 +0100
    
          video/hdmi: Don't let the user of this API create invalid infoframes
    
    But this time for the horizontal/vertical bar data present bits.
    
    Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
    Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
    Reviewed-by: Thierry Reding <treding@nvidia.com>
    Signed-off-by: Dave Airlie <airlied@gmail.com>
  20. @airlied

    video/hdmi: Don't let the user of this API create invalid infoframes

    Lespiau, Damien authored airlied committed
    To set the active aspect ratio value in the AVI infoframe today, you not
    only have to set the active_aspect field, but also the active_info_valid
    bit. Out of the 1 user of this API, we had 100% misuse, forgetting the
    _valid bit. This was fixed in:
    
      Author: Damien Lespiau <damien.lespiau@intel.com>
      Date:   Tue Aug 6 20:32:17 2013 +0100
    
          drm: Don't generate invalid AVI infoframes for CEA modes
    
    We can do better and derive the _valid bit from the user wanting to set
    the active aspect ratio.
    
    v2: Fix multi-lines comment style (Thierry Reding)
    
    Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
    Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
    Reviewed-by: Thierry Reding <treding@nvidia.com>
    Signed-off-by: Dave Airlie <airlied@gmail.com>
  21. @airlied

    drm: Add support for alternate clocks of 4k modes

    Lespiau, Damien authored airlied committed
    v2: Fix hmdi typo (Simon Farnsworth, Ville Syrjälä)
    
    Suggested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
    Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
    Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
    Reviewed-by: Simon Farnsworth <simon.farnsworth@onelan.co.uk>
    Reviewed-by: Thierry Reding <treding@nvidia.com>
    Signed-off-by: Dave Airlie <airlied@gmail.com>
  22. @airlied

    drm/edid: Parse the HDMI CEA block and look for 4k modes

    Lespiau, Damien authored airlied committed
    HDMI 1.4 adds 4 "4k x 2k" modes in the the CEA vendor specific block.
    
    With this commit, we now parse this block and expose the 4k modes that
    we find there.
    
    v2: Fix the "4096x2160" string (nice catch!), add comments about
        do_hdmi_vsdb_modes() arguments and make it clearer that offset is
        relative to the end of the required fields of the HDMI VSDB
        (Ville Syrjälä)
    
    v3: Fix 'Unknow' typo (Simon Farnsworth)
    
    Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
    Tested-by: Cancan Feng <cancan.feng@intel.com>
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=67030
    Reviewed-by: Simon Farnsworth <simon.farnsworth@onelan.co.uk>
    Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
    Reviewed-by: Thierry Reding <treding@nvidia.com>
    Signed-off-by: Dave Airlie <airlied@gmail.com>
  23. @airlied

    drm/edid: Fix add_cea_modes() style issues

    Lespiau, Damien authored airlied committed
    A few styles issues have crept in here, fix them before touching this
    code again.
    
    v2: constify arguments that can be (Ville Syrjälä)
    v3: constify, but better (Ville Syrjälä)
    
    Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
    Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
    Reviewed-by: Thierry Reding <treding@nvidia.com>
    Signed-off-by: Dave Airlie <airlied@gmail.com>
  24. @airlied

    drm: Don't export drm_find_cea_extension() any more

    Lespiau, Damien authored airlied committed
    This function is only used inside drm_edid.c.
    
    Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
    Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
    Reviewed-by: Thierry Reding <treding@nvidia.com>
    Signed-off-by: Dave Airlie <airlied@gmail.com>
  25. nouveau: add runtime PM support (v0.9)

    Dave Airlie authored
    This hooks nouveau up to the runtime PM system to enable
    dynamic power management for secondary GPUs in switchable
    and optimus laptops.
    
    a) rewrite suspend/resume printks to hide them during dynamic s/r
    to avoid cluttering logs
    b) add runtime pm suspend to irq handler, crtc display, ioctl handler,
    connector status,
    c) handle hdmi audio dynamic power on/off using magic register.
    
    v0.5:
    make sure we hit D3 properly
    fix fbdev_set_suspend locking interaction, we only will poweroff if we have no
    active crtcs/fbcon anyways.
    add reference for active crtcs.
    sprinkle mark last busy for autosuspend timeout
    
    v0.6:
    allow more flexible debugging - to avoid log spam
    add option to enable/disable dynpm
    got to D3Cold
    
    v0.7:
    add hdmi audio support.
    
    v0.8:
    call autosuspend from idle, so pci config space access doesn't go straight
    back to sleep, this makes starting X faster.
    only signal usage if we actually handle the irq, otherwise usb keeps us awake.
    fix nv50 display active powerdown
    
    v0.9:
    use masking function to enable hdmi audio
    set busy when we fail to suspend
    
    Signed-off-by: Dave Airlie <airlied@redhat.com>
  26. drm: allow open of dynamic off devices.

    Dave Airlie authored
    Signed-off-by: Dave Airlie <airlied@redhat.com>
  27. @airlied

    snd/hda: add runtime suspend/resume on optimus support (v4)

    airlied authored Dave Airlie committed
    Add support for HDMI audio device on VGA cards that powerdown
    to D3cold using non-standard ACPI/PCI infrastructure (optimus).
    
    This does a couple of things to make it work:
    
    a) add a set of power ops for the hdmi domain, and enables them
    via vga_switcheroo when we are a switcheroo controlled card. This
    just replaces the runtime resume operation so that when the card
    is in D3cold the userspace pci config space access via sysfs,
    the vga switcheroon runtime resume gets called first and it calls
    the GPU resume callback before calling the sound card runtime
    resume.
    
    b) standard ACPI/PCI stacks won't put a device into D3cold without
    an ACPI handle, but since the hdmi audio devices on gpus don't have
    an ACPI handle, we need to manually force the device into D3cold
    after suspend from the switcheroo path only.
    
    c) don't try and do runtime s/r when the GPU is off.
    
    d) call runtime suspend/resume during switcheroo suspend/resume
    this is to make sure the runtime stack knows to try and resume
    the hdmi audio device for pci config space access.
    
    v2: fix incorrect runtime call suspend->resume.
    
    v3: rework irq handler to avoid false irq when we are resuming
    but haven't runtime resumed yet, don't bother trying D3cold,
    it won't work, just set it manually ourselves, move runtime s/r
    calls outside the main s/r hook. enable dnyamic pm properly by
    dropping reference.
    
    v4: put back irq handler check just wrap it with cap check
    
    Acked-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Dave Airlie <airlied@redhat.com>
Something went wrong with that request. Please try again.