Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/radeon/radeon_audio: Move 'dce6_*()'s prototypes to shared header

Fixes the following W=1 kernel build warning(s):

drivers/gpu/drm/radeon/dce6_afmt.c:32:5: warning: no previous prototype for ‘dce6_endpoint_rreg’ [-Wmissing-prototypes]
32 | u32 dce6_endpoint_rreg(struct radeon_device *rdev,
| ^~~~~~~~~~~~~~~~~~
drivers/gpu/drm/radeon/dce6_afmt.c:46:6: warning: no previous prototype for ‘dce6_endpoint_wreg’ [-Wmissing-prototypes]
46 | void dce6_endpoint_wreg(struct radeon_device *rdev,
| ^~~~~~~~~~~~~~~~~~
drivers/gpu/drm/radeon/dce6_afmt.c:110:6: warning: no previous prototype for ‘dce6_afmt_select_pin’ [-Wmissing-prototypes]
110 | void dce6_afmt_select_pin(struct drm_encoder *encoder)
| ^~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/radeon/dce6_afmt.c:123:6: warning: no previous prototype for ‘dce6_afmt_write_latency_fields’ [-Wmissing-prototypes]
123 | void dce6_afmt_write_latency_fields(struct drm_encoder *encoder,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/radeon/dce6_afmt.c:152:6: warning: no previous prototype for ‘dce6_afmt_hdmi_write_speaker_allocation’ [-Wmissing-prototypes]
152 | void dce6_afmt_hdmi_write_speaker_allocation(struct drm_encoder *encoder,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/radeon/dce6_afmt.c:177:6: warning: no previous prototype for ‘dce6_afmt_dp_write_speaker_allocation’ [-Wmissing-prototypes]
177 | void dce6_afmt_dp_write_speaker_allocation(struct drm_encoder *encoder,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/radeon/dce6_afmt.c:202:6: warning: no previous prototype for ‘dce6_afmt_write_sad_regs’ [-Wmissing-prototypes]
202 | void dce6_afmt_write_sad_regs(struct drm_encoder *encoder,
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/radeon/dce6_afmt.c:268:6: warning: no previous prototype for ‘dce6_hdmi_audio_set_dto’ [-Wmissing-prototypes]
268 | void dce6_hdmi_audio_set_dto(struct radeon_device *rdev,
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/radeon/dce6_afmt.c:287:6: warning: no previous prototype for ‘dce6_dp_audio_set_dto’ [-Wmissing-prototypes]
287 | void dce6_dp_audio_set_dto(struct radeo_device *rdev,
| ^~~~~~~~~~~~~~~~~~~~~

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>

authored by

Lee Jones and committed by
Alex Deucher
7735a7c9 1c5ae3ba

+54 -16
+1
drivers/gpu/drm/radeon/dce6_afmt.c
··· 22 22 */ 23 23 #include <linux/hdmi.h> 24 24 25 + #include "dce6_afmt.h" 25 26 #include "radeon.h" 26 27 #include "radeon_audio.h" 27 28 #include "sid.h"
+52
drivers/gpu/drm/radeon/dce6_afmt.h
··· 1 + /* dce6_afmt.h -- Private header for radeon driver -*- linux-c -*- 2 + * 3 + * Copyright 2013 Advanced Micro Devices, Inc. 4 + * 5 + * Permission is hereby granted, free of charge, to any person obtaining a 6 + * copy of this software and associated documentation files (the "Software"), 7 + * to deal in the Software without restriction, including without limitation 8 + * the rights to use, copy, modify, merge, publish, distribute, sublicense, 9 + * and/or sell copies of the Software, and to permit persons to whom the 10 + * Software is furnished to do so, subject to the following conditions: 11 + * 12 + * The above copyright notice and this permission notice shall be included in 13 + * all copies or substantial portions of the Software. 14 + * 15 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 + * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR 19 + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 20 + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 21 + * OTHER DEALINGS IN THE SOFTWARE. 22 + * 23 + */ 24 + 25 + #ifndef __DCE6_AFMT_H__ 26 + #define __DCE6_AFMT_H__ 27 + 28 + struct cea_sad; 29 + struct drm_connector; 30 + struct drm_display_mode; 31 + struct drm_encoder; 32 + struct radeon_crtc; 33 + struct radeon_device; 34 + 35 + u32 dce6_endpoint_rreg(struct radeon_device *rdev, u32 offset, u32 reg); 36 + void dce6_endpoint_wreg(struct radeon_device *rdev, u32 offset, u32 reg, u32 v); 37 + void dce6_afmt_write_sad_regs(struct drm_encoder *encoder, 38 + struct cea_sad *sads, int sad_count); 39 + void dce6_afmt_hdmi_write_speaker_allocation(struct drm_encoder *encoder, 40 + u8 *sadb, int sad_count); 41 + void dce6_afmt_dp_write_speaker_allocation(struct drm_encoder *encoder, 42 + u8 *sadb, int sad_count); 43 + void dce6_afmt_write_latency_fields(struct drm_encoder *encoder, 44 + struct drm_connector *connector, 45 + struct drm_display_mode *mode); 46 + void dce6_afmt_select_pin(struct drm_encoder *encoder); 47 + void dce6_hdmi_audio_set_dto(struct radeon_device *rdev, 48 + struct radeon_crtc *crtc, unsigned int clock); 49 + void dce6_dp_audio_set_dto(struct radeon_device *rdev, 50 + struct radeon_crtc *crtc, unsigned int clock); 51 + 52 + #endif /* __DCE6_AFMT_H__ */
+1 -16
drivers/gpu/drm/radeon/radeon_audio.c
··· 25 25 #include <linux/gcd.h> 26 26 27 27 #include <drm/drm_crtc.h> 28 + #include "dce6_afmt.h" 28 29 #include "evergreen_hdmi.h" 29 30 #include "radeon.h" 30 31 #include "atom.h" ··· 35 34 u8 enable_mask); 36 35 void dce6_audio_enable(struct radeon_device *rdev, struct r600_audio_pin *pin, 37 36 u8 enable_mask); 38 - u32 dce6_endpoint_rreg(struct radeon_device *rdev, u32 offset, u32 reg); 39 - void dce6_endpoint_wreg(struct radeon_device *rdev, 40 - u32 offset, u32 reg, u32 v); 41 - void dce6_afmt_write_sad_regs(struct drm_encoder *encoder, 42 - struct cea_sad *sads, int sad_count); 43 - void dce6_afmt_hdmi_write_speaker_allocation(struct drm_encoder *encoder, 44 - u8 *sadb, int sad_count); 45 - void dce6_afmt_dp_write_speaker_allocation(struct drm_encoder *encoder, 46 - u8 *sadb, int sad_count); 47 - void dce6_afmt_write_latency_fields(struct drm_encoder *encoder, 48 - struct drm_connector *connector, struct drm_display_mode *mode); 49 37 struct r600_audio_pin* r600_audio_get_pin(struct radeon_device *rdev); 50 38 struct r600_audio_pin* dce6_audio_get_pin(struct radeon_device *rdev); 51 - void dce6_afmt_select_pin(struct drm_encoder *encoder); 52 39 void r600_hdmi_audio_set_dto(struct radeon_device *rdev, 53 - struct radeon_crtc *crtc, unsigned int clock); 54 - void dce6_hdmi_audio_set_dto(struct radeon_device *rdev, 55 - struct radeon_crtc *crtc, unsigned int clock); 56 - void dce6_dp_audio_set_dto(struct radeon_device *rdev, 57 40 struct radeon_crtc *crtc, unsigned int clock); 58 41 void r600_set_avi_packet(struct radeon_device *rdev, u32 offset, 59 42 unsigned char *buffer, size_t size);