summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/radeon_audio.c
Commit message (Collapse)AuthorAgeFilesLines
* drm/radeon: Add a common function for DFS handlingSlava Grigorev2016-01-271-0/+12
| | | | | | | | | | | Move encoding of DFS (digital frequency synthesizer) divider into a separate function and improve calculation precision. Signed-off-by: Slava Grigorev <slava.grigorev@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
* drm/radeon: cleaned up VCO output settings for DP audioSlava Grigorev2016-01-271-7/+1
| | | | | | | | | | This is preparation for the fixes in the following patches. Signed-off-by: Slava Grigorev <slava.grigorev@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
* drm/radeon: fix HDMI quantization_range for pre-DCE5 asicsAlex Deucher2015-08-281-7/+9
| | | | | | | | | | | Support for output_csc is only available on DCE5 and newer so don't mess with the HDMI quantization_range on pre-DCE5 asics. bug: https://bugs.freedesktop.org/show_bug.cgi?id=83226 Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
* drm/radeon: rework audio modeset to handle non-audio hdmi featuresAlex Deucher2015-07-291-26/+39
| | | | | | | Need to setup the deep color and avi packets regardless of audio setup. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: rework audio detect (v4)Alex Deucher2015-07-291-83/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | 1. Always assign audio function pointers even if the display does not support audio. We need to properly disable the audio stream when when using a non-audio capable monitor. Fixes purple line on some hdmi monitors. 2. Check if a pin is in use by another encoder before disabling it. v2: make sure we've fetched the edid before checking audio and look up the encoder before calling audio_detect since connector->encoder may not be assigned yet. Separate pin and afmt. They are allocated at different times and have no dependency on eachother. v3: fix connector fetching in encoder functions v4: fix missed dig->pin check in dce6_afmt_write_latency_fields bugs: https://bugzilla.kernel.org/show_bug.cgi?id=93701 https://bugzilla.redhat.com/show_bug.cgi?id=1236337 https://bugs.freedesktop.org/show_bug.cgi?id=91041 Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
* drm/radeon: only check the sink type on DP connectorsAlex Deucher2015-06-301-9/+9
| | | | | | | Avoids a crash on pre-DP asics that support HDMI. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
* Merge tag 'v4.1-rc6' into drm-nextDave Airlie2015-06-041-15/+12
|\ | | | | | | | | | | | | Linux 4.1-rc6 backmerge 4.1-rc6 as some of the later pull reqs are based on newer bases and I'd prefer to do the fixup myself.
| * Revert "drm/radeon: only mark audio as connected if the monitor supports it ↵Alex Deucher2015-05-271-15/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | (v3)" This breaks too many things. bugs: https://bugzilla.kernel.org/show_bug.cgi?id=99041 https://bugs.freedesktop.org/show_bug.cgi?id=90681 This reverts commit 0f55db36d49d45b80eff0c0a2a498766016f458b. Cc: stable@vger.kernel.org
* | drm/radeon: clean up radeon_audio_enableAlex Deucher2015-05-281-9/+9
|/ | | | | | | | - make it static - fix mask/bool handling for last param Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
* drm/radeon: don't setup audio on asics that don't support itAlex Deucher2015-05-051-0/+4
| | | | | | | | | bug: https://bugzilla.kernel.org/show_bug.cgi?id=97701 Reported-by: Mikael Pettersson <mikpelinux@gmail.com> Tested-by: Mikael Pettersson <mikpelinux@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
* drm/radeon: only mark audio as connected if the monitor supports it (v3)Alex Deucher2015-04-271-12/+15
| | | | | | | | | | | Otherwise the driver may try and send audio which may confuse the monitor. v2: set pin to NULL if no audio v3: avoid crash with analog encoders Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
* drm/radeon: drop dce6_dp_enableAlex Deucher2015-04-271-2/+1
| | | | | | | | It's mostly duplicated with evergreen_dp_enable. This is a prerequisite for fix implemented in another patch. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
* drm/radeon: setup quantization_range in AVI infoframeAlex Deucher2015-03-191-0/+24
| | | | | | | | | | If the display supports selectable range, set the range based on what the user has selected for output csc. bug: https://bugs.freedesktop.org/show_bug.cgi?id=83226 Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: properly set dto for dp on DCE4/5Alex Deucher2015-03-031-1/+8
| | | | | | | If DCPLL or ext PLL is used, use the disp clk. If PPLL is used, use the dp clock. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon/audio: update EDID derived fields in modesetAlex Deucher2015-03-031-5/+6
| | | | | | | | | We don't necessarily have an EDID at this point when audio detect gets called. Ideally we'd update these fields in detect, but that requires a larger rework of the display detect code. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: don't toggle audio state in modesetAlex Deucher2015-03-031-12/+1
| | | | | | | Should be done only at detect time to avoid spurious state changes on the audio side. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon/audio: set mute around state setupAlex Deucher2015-03-031-1/+2
| | | | | | To avoid possible sound artifacts while setting up audio. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: assign pin in detectAlex Deucher2015-03-031-3/+3
| | | | | | We need the pin from detect on, it's too late in dpms. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: fix the audio dpms callbacksAlex Deucher2015-03-031-4/+4
| | | | | | | | | | | | | Don't touch the audio enable bits as these are already handled in display detection. Enable the hdmi secondary streams in hdmi enable to match dp. Rename dp dpms callback to be consistent with hdmi. bug: https://bugs.freedesktop.org/show_bug.cgi?id=89327 https://bugzilla.kernel.org/show_bug.cgi?id=93921 Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: use NULL rather then 0 in audio detectAlex Deucher2015-01-221-1/+1
| | | | Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: whitespace clean up in radeon_audio.cAlex Deucher2015-01-221-35/+35
| | | | | | | | Clean up some formatting in radeon_audio.c to be more consistent with the rest of the driver. Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* radeon/audio: enable DP audioSlava Grigorev2015-01-221-0/+37
| | | | | | Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Slava Grigorev <slava.grigorev@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* radeon/audio: moved audio caps programming to audio_hotplug() functionSlava Grigorev2015-01-221-35/+43
| | | | | | Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Slava Grigorev <slava.grigorev@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* radeon/audio: applied audio_dpms() and audio_mode_set() callsSlava Grigorev2015-01-221-0/+14
| | | | | | Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Slava Grigorev <slava.grigorev@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* radeon/audio: consolidate audio_mode_set() functionsSlava Grigorev2015-01-221-11/+61
| | | | | | Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Slava Grigorev <slava.grigorev@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* radeon/audio: moved mute programming to a separate functionSlava Grigorev2015-01-221-0/+19
| | | | | | Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Slava Grigorev <slava.grigorev@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* radeon/audio: moved audio packet programming to a separate functionSlava Grigorev2015-01-221-0/+19
| | | | | | Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Slava Grigorev <slava.grigorev@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* radeon/audio: set_avi_packet() function cleanupSlava Grigorev2015-01-221-11/+32
| | | | | | Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Slava Grigorev <slava.grigorev@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* radeon: moved HDMI color depth programming to a separate functionSlava Grigorev2015-01-221-0/+22
| | | | | | Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Slava Grigorev <slava.grigorev@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* radeon/audio: moved VBI packet programming to separate functionsAlex Deucher2015-01-221-0/+18
| | | | | | Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Slava Grigorev <slava.grigorev@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* radeon/audio: consolidate update_acr() functions (v2)Slava Grigorev2015-01-221-0/+100
| | | | | | | V2: fix missing dce6 callback Signed-off-by: Slava Grigorev <slava.grigorev@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* radeon/audio: consolidate update_avi_infoframe() functionsSlava Grigorev2015-01-221-0/+20
| | | | | | Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Slava Grigorev <slava.grigorev@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* radeon/audio: consolidate audio_set_dto() functionsSlava Grigorev2015-01-221-1/+44
| | | | | | Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Slava Grigorev <slava.grigorev@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* radeon/audio: consolidate audio_fini() functionsSlava Grigorev2015-01-221-0/+13
| | | | | | Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Slava Grigorev <slava.grigorev@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* radeon/audio: consolidate audio_enable() functionsSlava Grigorev2015-01-221-4/+13
| | | | | | Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Slava Grigorev <slava.grigorev@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* radeon/audio: consolidate select_pin() functionsSlava Grigorev2015-01-221-0/+11
| | | | | | Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Slava Grigorev <slava.grigorev@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* radeon/audio: consolidate audio_get_pin() functionsSlava Grigorev2015-01-221-0/+19
| | | | | | Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Slava Grigorev <slava.grigorev@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* radeon/audio: consolidate write_latency_fields() functionsSlava Grigorev2015-01-221-0/+34
| | | | | Signed-off-by: Slava Grigorev <slava.grigorev@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* radeon/audio: consolidate write_speaker_allocation() functionsSlava Grigorev2015-01-221-0/+53
| | | | | | Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Slava Grigorev <slava.grigorev@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* radeon/audio: consolidate write_sad_regs() functionsAlex Deucher2015-01-221-0/+72
| | | | | | Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Slava Grigorev <slava.grigorev@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* radeon/audio: defined initial audio interface that gets initialized via ↵Slava Grigorev2015-01-221-1/+95
| | | | | | | | detect() call Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Slava Grigorev <slava.grigorev@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* radeon/audio: consolidate audio_init() functionsSlava Grigorev2015-01-221-0/+90
Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Slava Grigorev <slava.grigorev@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
OpenPOWER on IntegriCloud