[PATCH 06/19] drm/radeon/atom: Move prototype into shared location
Lee Jones
lee.jones at linaro.org
Fri Nov 6 21:49:36 UTC 2020
Both source files include atom.h, which seems like a reasonable
location to place an atom based function into.
Fixes the following W=1 kernel build warning(s):
drivers/gpu/drm/radeon/radeon_atombios.c:1791:6: warning: no previous prototype for ‘radeon_atom_get_tv_timings’ [-Wmissing-prototypes]
1791 | bool radeon_atom_get_tv_timings(struct radeon_device *rdev, int index,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
Cc: Alex Deucher <alexander.deucher at amd.com>
Cc: "Christian König" <christian.koenig at amd.com>
Cc: David Airlie <airlied at linux.ie>
Cc: Daniel Vetter <daniel at ffwll.ch>
Cc: amd-gfx at lists.freedesktop.org
Cc: dri-devel at lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones at linaro.org>
---
drivers/gpu/drm/radeon/atom.h | 6 ++++++
drivers/gpu/drm/radeon/atombios_encoders.c | 4 ----
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/radeon/atom.h b/drivers/gpu/drm/radeon/atom.h
index 1bf06c91cd959..cb93b83114dbe 100644
--- a/drivers/gpu/drm/radeon/atom.h
+++ b/drivers/gpu/drm/radeon/atom.h
@@ -154,6 +154,12 @@ bool atom_parse_data_header(struct atom_context *ctx, int index, uint16_t *size,
bool atom_parse_cmd_header(struct atom_context *ctx, int index,
uint8_t *frev, uint8_t *crev);
int atom_allocate_fb_scratch(struct atom_context *ctx);
+
+struct drm_display_mode;
+struct radeon_device;
+bool radeon_atom_get_tv_timings(struct radeon_device *rdev, int index,
+ struct drm_display_mode *mode);
+
#include "atom-types.h"
#include "atombios.h"
#include "ObjectID.h"
diff --git a/drivers/gpu/drm/radeon/atombios_encoders.c b/drivers/gpu/drm/radeon/atombios_encoders.c
index cc5ee1b3af84f..85f903caf12e1 100644
--- a/drivers/gpu/drm/radeon/atombios_encoders.c
+++ b/drivers/gpu/drm/radeon/atombios_encoders.c
@@ -296,10 +296,6 @@ static void radeon_atom_backlight_exit(struct radeon_encoder *encoder)
#endif
-/* evil but including atombios.h is much worse */
-bool radeon_atom_get_tv_timings(struct radeon_device *rdev, int index,
- struct drm_display_mode *mode);
-
static bool radeon_atom_mode_fixup(struct drm_encoder *encoder,
const struct drm_display_mode *mode,
struct drm_display_mode *adjusted_mode)
--
2.25.1
More information about the dri-devel
mailing list