Lee Jones
baa65242dd
drm/radeon/radeon_audio: Move 'dce3_2_*' prototypes to shared location
...
Fixes the following W=1 kernel build warning(s):
drivers/gpu/drm/radeon/dce3_1_afmt.c:30:6: warning: no previous prototype for ‘dce3_2_afmt_hdmi_write_speaker_allocation’ [-Wmissing-prototypes]
30 | void dce3_2_afmt_hdmi_write_speaker_allocation(struct drm_encoder *encoder,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/radeon/dce3_1_afmt.c:48:6: warning: no previous prototype for ‘dce3_2_afmt_dp_write_speaker_allocation’ [-Wmissing-prototypes]
48 | void dce3_2_afmt_dp_write_speaker_allocation(struct drm_encoder *encoder,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/radeon/dce3_1_afmt.c:66:6: warning: no previous prototype for ‘dce3_2_afmt_write_sad_regs’ [-Wmissing-prototypes]
66 | void dce3_2_afmt_write_sad_regs(struct drm_encoder *encoder,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/radeon/dce3_1_afmt.c:116:6: warning: no previous prototype for ‘dce3_2_audio_set_dto’ [-Wmissing-prototypes]
116 | void dce3_2_audio_set_dto(struct radeon_device *rdev,
| ^~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/radeon/dce3_1_afmt.c:170:6: warning: no previous prototype for ‘dce3_2_hdmi_update_acr’ [-Wmissing-prototypes]
170 | void dce3_2_hdmi_update_acr(struct drm_encoder *encoder, long offset,
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/radeon/dce3_1_afmt.c:202:6: warning: no previous prototype for ‘dce3_2_set_audio_packet’ [-Wmissing-prototypes]
202 | void dce3_2_set_audio_packet(struct drm_encoder *encoder, u32 offset)
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/radeon/dce3_1_afmt.c:223:6: warning: no previous prototype for ‘dce3_2_set_mute’ [-Wmissing-prototypes]
223 | void dce3_2_set_mute(struct drm_encoder *encoder, u32 offset, bool mute)
| ^~~~~~~~~~~~~~~
Cc: Alex Deucher <alexander.deucher@amd.com >
Cc: "Christian König" <christian.koenig@amd.com >
Cc: David Airlie <airlied@linux.ie >
Cc: Daniel Vetter <daniel@ffwll.ch >
Cc: Slava Grigorev <slava.grigorev@amd.com >
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-11-16 15:56:33 -05:00
Slava Grigorev
a64c9dab1c
drm/radeon: Add a common function for DFS handling
...
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
2016-01-27 12:48:32 -05:00
Alex Deucher
d0ea397e22
drm/radeon: rework audio detect (v4)
...
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
2015-07-29 15:48:05 -04:00
Alex Deucher
0106219361
drm/radeon: clean up radeon_audio_enable
...
- make it static
- fix mask/bool handling for last param
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Cc: stable@vger.kernel.org
2015-05-28 00:03:39 -04:00
Slava Grigorev
6f945693be
radeon/audio: applied audio_dpms() and audio_mode_set() calls
...
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 >
2015-01-22 10:42:17 -05:00
Slava Grigorev
6e72376dcc
radeon/audio: consolidate audio_mode_set() functions
...
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 >
2015-01-22 10:42:17 -05:00
Slava Grigorev
3be2e7d0e7
radeon/audio: moved mute programming to a separate function
...
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 >
2015-01-22 10:42:15 -05:00
Slava Grigorev
1852c9a09a
radeon/audio: moved audio packet programming to a separate function
...
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 >
2015-01-22 10:42:14 -05:00
Slava Grigorev
baa7d8e451
radeon/audio: set_avi_packet() function cleanup
...
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 >
2015-01-22 10:42:14 -05:00
Slava Grigorev
be273e58f0
radeon: moved HDMI color depth programming to a separate function
...
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 >
2015-01-22 10:42:12 -05:00
Alex Deucher
930a978512
radeon/audio: moved VBI packet programming to separate functions
...
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 >
2015-01-22 10:42:12 -05:00
Slava Grigorev
64424d6e45
radeon/audio: consolidate update_acr() functions (v2)
...
V2: fix missing dce6 callback
Signed-off-by: Slava Grigorev <slava.grigorev@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2015-01-22 10:42:11 -05:00
Slava Grigorev
96ea7afbc2
radeon/audio: consolidate update_avi_infoframe() functions
...
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 >
2015-01-22 10:42:10 -05:00
Slava Grigorev
a85d682a65
radeon/audio: consolidate audio_set_dto() functions
...
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 >
2015-01-22 10:42:10 -05:00
Slava Grigorev
7991d66501
radeon/audio: consolidate audio_fini() functions
...
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 >
2015-01-22 10:42:09 -05:00
Slava Grigorev
8bf598207e
radeon/audio: consolidate audio_enable() functions
...
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 >
2015-01-22 10:42:08 -05:00
Slava Grigorev
88252d7728
radeon/audio: consolidate select_pin() functions
...
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 >
2015-01-22 10:42:07 -05:00
Slava Grigorev
3cdde027aa
radeon/audio: consolidate audio_get_pin() functions
...
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 >
2015-01-22 10:42:07 -05:00
Slava Grigorev
87654f87af
radeon/audio: consolidate write_latency_fields() functions
...
Signed-off-by: Slava Grigorev <slava.grigorev@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2015-01-22 10:42:06 -05:00
Slava Grigorev
00a9d4bcf8
radeon/audio: consolidate write_speaker_allocation() functions
...
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 >
2015-01-22 10:42:05 -05:00
Alex Deucher
070a2e63f6
radeon/audio: consolidate write_sad_regs() functions
...
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 >
2015-01-22 10:41:55 -05:00
Slava Grigorev
1a626b68fb
radeon/audio: defined initial audio interface that gets initialized via 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 >
2015-01-22 10:39:00 -05:00
Slava Grigorev
bfc1f97d8a
radeon/audio: consolidate audio_init() functions
...
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 >
2015-01-22 10:38:59 -05:00