Skip to content
  1. Nov 09, 2013
    • Alex Deucher's avatar
      drm/radeon: use HDP_MEM_COHERENCY_FLUSH_CNTL for sdma as well · d45fd24d
      Alex Deucher authored
      
      
      The new HDP flush method doesn't seem to work reliably on
      sDMA either, so use the old method here too.
      
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      d45fd24d
    • Ilija Hadzic's avatar
      drm/radeon/kms: add crtc_disable function for legacy crtc · 520a8718
      Ilija Hadzic authored
      
      
      To plug the VRAM memory leak (see previous patch for
      details) we must unpin the frame buffer when disabling the
      CRTC. This warrants the addition of disable function for legacy
      CRTC, which puts the CRTC in DPMS-OFF state and unpins the
      frame buffer if there is one associated with the CRTC.
      
      Signed-off-by: default avatarIlija Hadzic <ihadzic@research.bell-labs.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      520a8718
    • Ilija Hadzic's avatar
      drm/radeon/kms: unpin fb in atombios crtc disable · 75b871e2
      Ilija Hadzic authored
      
      
      When drm_helper_disable_unused_functions calls disable
      function of the CRTC, it also sets the crtc->fb pointer
      to NULL. This can later (when the mode on that CRTC is setup
      again from user space) cause ***_do_set_base functions to
      "think" that there is no old buffer and skip the unpinning
      code. Consequently, the buffer that has been NULL-ified in
      drm_helper_disable_unused_functions will never be unpinned
      causing a leak in VRAM.
      
      This patch plugs the leak by unpinning the frame buffer
      in crtc_disable function.
      
      Signed-off-by: default avatarIlija Hadzic <ihadzic@research.bell-labs.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      75b871e2
    • Anssi Hannula's avatar
      drm/radeon/audio: fix missing multichannel PCM SAD in some cases · 0f57bca9
      Anssi Hannula authored
      
      
      The current code writing SADs to the audio registers seems to assume
      that there is at most a single SAD per audio format.
      
      However, that is not the case. Especially for PCM it is somewhat common
      for sinks to have two SADs, one for 8-channel and one for 2-channel
      audio, which may have different supported sample rates (i.e. the sink
      supports stereo audio at higher sample rates than multichannel audio).
      
      Because of this, only the 2-channel SAD may be used if it appears before
      the 8-channel SAD. Unless other SADs require otherwise, this may cause
      the ALSA HDA driver to allow stereo playback only.
      
      Fix the code to pick the PCM SAD with the highest number of channels,
      while merging the rate masks of PCM SADs with lower amount of channels
      into the additional stereo rate mask byte.
      
      Technically there are even more cases to handle (multiple non-PCM SADs
      of the same type, more than two PCM SADs with varying channel counts,
      etc), but those have not actually been encountered in the field and
      handling them would be non-trivial.
      
      Example affected EDID from Onkyo TX-SR674 specifying 192kHz stereo
      support and 96kHz 8-channel support (and other 8-channel compressed
      formats):
      00ffffffffffff003dcb010000000001
      ffff0103800000780a0dc9a057479827
      12484c00000001010101010101010101
      010101010101011d8018711c1620582c
      2500c48e2100009e011d007251d01e20
      6e285500c48e2100001e000000fc0054
      582d53523637342020202020000000fd
      00313d0f2e08000a202020202020019b
      02032f724f8504030f0e07069413121e
      1d1615012f097f070f1f071707503707
      503f07c0834f000066030c00ffff808c
      0ad08a20e02d10103e9600c48e210000
      18011d80d0721c1620102c2580c48e21
      00009e011d00bc52d01e20b8285540c4
      8e2100001e8c0ad090204031200c4055
      00c48e210000180000000000000000a8
      
      Signed-off-by: default avatarAnssi Hannula <anssi.hannula@iki.fi>
      Tested-by: default avatarAndre Heider <a.heider@gmail.com>
      Cc: Rafał Miłecki <zajec5@gmail.com>
      Acked-by: default avatarRafał Miłecki <zajec5@gmail.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      0f57bca9
  2. Nov 08, 2013