* [PATCH 01/43] drm/radeon/atombios_encoders: Move 'radeon_atom_get_tv_timings()'s prototype into shared location
2020-11-16 17:29 [RESEND 00/43] Rid W=1 warnings from GPU Lee Jones
@ 2020-11-16 17:29 ` Lee Jones
2020-11-16 19:25 ` Alex Deucher
2020-11-16 17:29 ` [PATCH 02/43] drm/radeon/radeon: Move prototype into shared header Lee Jones
` (10 subsequent siblings)
11 siblings, 1 reply; 27+ messages in thread
From: Lee Jones @ 2020-11-16 17:29 UTC (permalink / raw)
To: lee.jones
Cc: linux-kernel, Alex Deucher, Christian König, David Airlie,
Daniel Vetter, amd-gfx, dri-devel
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@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
drivers/gpu/drm/radeon/atombios_encoders.c | 5 +--
drivers/gpu/drm/radeon/radeon_atombios.c | 1 +
drivers/gpu/drm/radeon/radeon_atombios.h | 37 ++++++++++++++++++++++
3 files changed, 39 insertions(+), 4 deletions(-)
create mode 100644 drivers/gpu/drm/radeon/radeon_atombios.h
diff --git a/drivers/gpu/drm/radeon/atombios_encoders.c b/drivers/gpu/drm/radeon/atombios_encoders.c
index cc5ee1b3af84f..683de198e18d9 100644
--- a/drivers/gpu/drm/radeon/atombios_encoders.c
+++ b/drivers/gpu/drm/radeon/atombios_encoders.c
@@ -33,6 +33,7 @@
#include <drm/radeon_drm.h>
#include "atom.h"
+#include "radeon_atombios.h"
#include "radeon.h"
#include "radeon_asic.h"
#include "radeon_audio.h"
@@ -296,10 +297,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)
diff --git a/drivers/gpu/drm/radeon/radeon_atombios.c b/drivers/gpu/drm/radeon/radeon_atombios.c
index 5d25917251892..71bf2ed172697 100644
--- a/drivers/gpu/drm/radeon/radeon_atombios.c
+++ b/drivers/gpu/drm/radeon/radeon_atombios.c
@@ -34,6 +34,7 @@
#include "atom.h"
#include "atom-bits.h"
#include "radeon_asic.h"
+#include "radeon_atombios.h"
extern void
radeon_add_atom_encoder(struct drm_device *dev, uint32_t encoder_enum,
diff --git a/drivers/gpu/drm/radeon/radeon_atombios.h b/drivers/gpu/drm/radeon/radeon_atombios.h
new file mode 100644
index 0000000000000..b7c76920feb7d
--- /dev/null
+++ b/drivers/gpu/drm/radeon/radeon_atombios.h
@@ -0,0 +1,37 @@
+/* radeon_atombios.h -- Private header for radeon driver -*- linux-c -*-
+ *
+ * Copyright 2007-8 Advanced Micro Devices, Inc.
+ * Copyright 2008 Red Hat Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Authors: Dave Airlie
+ * Alex Deucher
+ */
+
+#ifndef __RADEON_ATOMBIOS_H__
+#define __RADEON_ATOMBIOS_H__
+
+struct drm_display_mode;
+struct radeon_device;
+
+bool radeon_atom_get_tv_timings(struct radeon_device *rdev, int index,
+ struct drm_display_mode *mode);
+
+#endif /* __RADEON_ATOMBIOS_H__ */
--
2.25.1
^ permalink raw reply related [flat|nested] 27+ messages in thread
* Re: [PATCH 01/43] drm/radeon/atombios_encoders: Move 'radeon_atom_get_tv_timings()'s prototype into shared location
2020-11-16 17:29 ` [PATCH 01/43] drm/radeon/atombios_encoders: Move 'radeon_atom_get_tv_timings()'s prototype into shared location Lee Jones
@ 2020-11-16 19:25 ` Alex Deucher
2020-11-17 8:42 ` Lee Jones
0 siblings, 1 reply; 27+ messages in thread
From: Alex Deucher @ 2020-11-16 19:25 UTC (permalink / raw)
To: Lee Jones
Cc: David Airlie, LKML, amd-gfx list, Maling list - DRI developers,
Alex Deucher, Christian König
On Mon, Nov 16, 2020 at 12:30 PM Lee Jones <lee.jones@linaro.org> wrote:
>
> 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@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Applied. Thanks!
Alex
> ---
> drivers/gpu/drm/radeon/atombios_encoders.c | 5 +--
> drivers/gpu/drm/radeon/radeon_atombios.c | 1 +
> drivers/gpu/drm/radeon/radeon_atombios.h | 37 ++++++++++++++++++++++
> 3 files changed, 39 insertions(+), 4 deletions(-)
> create mode 100644 drivers/gpu/drm/radeon/radeon_atombios.h
>
> diff --git a/drivers/gpu/drm/radeon/atombios_encoders.c b/drivers/gpu/drm/radeon/atombios_encoders.c
> index cc5ee1b3af84f..683de198e18d9 100644
> --- a/drivers/gpu/drm/radeon/atombios_encoders.c
> +++ b/drivers/gpu/drm/radeon/atombios_encoders.c
> @@ -33,6 +33,7 @@
> #include <drm/radeon_drm.h>
>
> #include "atom.h"
> +#include "radeon_atombios.h"
> #include "radeon.h"
> #include "radeon_asic.h"
> #include "radeon_audio.h"
> @@ -296,10 +297,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)
> diff --git a/drivers/gpu/drm/radeon/radeon_atombios.c b/drivers/gpu/drm/radeon/radeon_atombios.c
> index 5d25917251892..71bf2ed172697 100644
> --- a/drivers/gpu/drm/radeon/radeon_atombios.c
> +++ b/drivers/gpu/drm/radeon/radeon_atombios.c
> @@ -34,6 +34,7 @@
> #include "atom.h"
> #include "atom-bits.h"
> #include "radeon_asic.h"
> +#include "radeon_atombios.h"
>
> extern void
> radeon_add_atom_encoder(struct drm_device *dev, uint32_t encoder_enum,
> diff --git a/drivers/gpu/drm/radeon/radeon_atombios.h b/drivers/gpu/drm/radeon/radeon_atombios.h
> new file mode 100644
> index 0000000000000..b7c76920feb7d
> --- /dev/null
> +++ b/drivers/gpu/drm/radeon/radeon_atombios.h
> @@ -0,0 +1,37 @@
> +/* radeon_atombios.h -- Private header for radeon driver -*- linux-c -*-
> + *
> + * Copyright 2007-8 Advanced Micro Devices, Inc.
> + * Copyright 2008 Red Hat Inc.
> + *
> + * Permission is hereby granted, free of charge, to any person obtaining a
> + * copy of this software and associated documentation files (the "Software"),
> + * to deal in the Software without restriction, including without limitation
> + * the rights to use, copy, modify, merge, publish, distribute, sublicense,
> + * and/or sell copies of the Software, and to permit persons to whom the
> + * Software is furnished to do so, subject to the following conditions:
> + *
> + * The above copyright notice and this permission notice shall be included in
> + * all copies or substantial portions of the Software.
> + *
> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
> + * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
> + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
> + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
> + * OTHER DEALINGS IN THE SOFTWARE.
> + *
> + * Authors: Dave Airlie
> + * Alex Deucher
> + */
> +
> +#ifndef __RADEON_ATOMBIOS_H__
> +#define __RADEON_ATOMBIOS_H__
> +
> +struct drm_display_mode;
> +struct radeon_device;
> +
> +bool radeon_atom_get_tv_timings(struct radeon_device *rdev, int index,
> + struct drm_display_mode *mode);
> +
> +#endif /* __RADEON_ATOMBIOS_H__ */
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH 01/43] drm/radeon/atombios_encoders: Move 'radeon_atom_get_tv_timings()'s prototype into shared location
2020-11-16 19:25 ` Alex Deucher
@ 2020-11-17 8:42 ` Lee Jones
0 siblings, 0 replies; 27+ messages in thread
From: Lee Jones @ 2020-11-17 8:42 UTC (permalink / raw)
To: Alex Deucher
Cc: David Airlie, LKML, amd-gfx list, Maling list - DRI developers,
Alex Deucher, Christian König
On Mon, 16 Nov 2020, Alex Deucher wrote:
> On Mon, Nov 16, 2020 at 12:30 PM Lee Jones <lee.jones@linaro.org> wrote:
> >
> > 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@amd.com>
> > Cc: "Christian König" <christian.koenig@amd.com>
> > Cc: David Airlie <airlied@linux.ie>
> > Cc: Daniel Vetter <daniel@ffwll.ch>
> > Cc: amd-gfx@lists.freedesktop.org
> > Cc: dri-devel@lists.freedesktop.org
> > Signed-off-by: Lee Jones <lee.jones@linaro.org>
>
> Applied. Thanks!
Superstar! Thanks Alex.
--
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 27+ messages in thread
* [PATCH 02/43] drm/radeon/radeon: Move prototype into shared header
2020-11-16 17:29 [RESEND 00/43] Rid W=1 warnings from GPU Lee Jones
2020-11-16 17:29 ` [PATCH 01/43] drm/radeon/atombios_encoders: Move 'radeon_atom_get_tv_timings()'s prototype into shared location Lee Jones
@ 2020-11-16 17:29 ` Lee Jones
2020-11-16 19:29 ` Alex Deucher
2020-11-16 17:29 ` [PATCH 03/43] drm/radeon/radeon_kms: Move 'radeon_*_kms' prototypes to " Lee Jones
` (9 subsequent siblings)
11 siblings, 1 reply; 27+ messages in thread
From: Lee Jones @ 2020-11-16 17:29 UTC (permalink / raw)
To: lee.jones
Cc: linux-kernel, Alex Deucher, Christian König, David Airlie,
Daniel Vetter, Sumit Semwal, amd-gfx, dri-devel, linux-media,
linaro-mm-sig
Unfortunately, a suitable one didn't already exist.
Fixes the following W=1 kernel build warning(s):
drivers/gpu/drm/radeon/radeon_device.c:637:6: warning: no previous prototype for ‘radeon_device_is_virtual’ [-Wmissing-prototypes]
637 | bool radeon_device_is_virtual(void)
| ^~~~~~~~~~~~~~~~~~~~~~~~
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: Sumit Semwal <sumit.semwal@linaro.org>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Cc: linux-media@vger.kernel.org
Cc: linaro-mm-sig@lists.linaro.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
drivers/gpu/drm/radeon/radeon_device.c | 1 +
drivers/gpu/drm/radeon/radeon_device.h | 32 ++++++++++++++++++++++++++
drivers/gpu/drm/radeon/radeon_drv.c | 3 +--
3 files changed, 34 insertions(+), 2 deletions(-)
create mode 100644 drivers/gpu/drm/radeon/radeon_device.h
diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c
index 7f384ffe848a7..ad572f965190b 100644
--- a/drivers/gpu/drm/radeon/radeon_device.c
+++ b/drivers/gpu/drm/radeon/radeon_device.c
@@ -42,6 +42,7 @@
#include <drm/drm_probe_helper.h>
#include <drm/radeon_drm.h>
+#include "radeon_device.h"
#include "radeon_reg.h"
#include "radeon.h"
#include "atom.h"
diff --git a/drivers/gpu/drm/radeon/radeon_device.h b/drivers/gpu/drm/radeon/radeon_device.h
new file mode 100644
index 0000000000000..3112b99ae36f1
--- /dev/null
+++ b/drivers/gpu/drm/radeon/radeon_device.h
@@ -0,0 +1,32 @@
+/* radeon_device.h -- Private header for radeon device -*- linux-c -*-
+ *
+ * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 2000 VA Linux Systems, Inc., Fremont, California.
+ * All rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef __RADEON_DEVICE_H__
+#define __RADEON_DEVICE_H__
+
+bool radeon_device_is_virtual(void);
+
+#endif /* __RADEON_DEVICE_H__ */
diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c
index f813eb5e140dd..536b246b9a6aa 100644
--- a/drivers/gpu/drm/radeon/radeon_drv.c
+++ b/drivers/gpu/drm/radeon/radeon_drv.c
@@ -52,6 +52,7 @@
#include "radeon_drv.h"
#include "radeon.h"
+#include "radeon_device.h"
/*
* KMS wrapper.
@@ -293,8 +294,6 @@ MODULE_DEVICE_TABLE(pci, pciidlist);
static const struct drm_driver kms_driver;
-bool radeon_device_is_virtual(void);
-
static int radeon_pci_probe(struct pci_dev *pdev,
const struct pci_device_id *ent)
{
--
2.25.1
^ permalink raw reply related [flat|nested] 27+ messages in thread
* Re: [PATCH 02/43] drm/radeon/radeon: Move prototype into shared header
2020-11-16 17:29 ` [PATCH 02/43] drm/radeon/radeon: Move prototype into shared header Lee Jones
@ 2020-11-16 19:29 ` Alex Deucher
0 siblings, 0 replies; 27+ messages in thread
From: Alex Deucher @ 2020-11-16 19:29 UTC (permalink / raw)
To: Lee Jones
Cc: David Airlie, LKML, amd-gfx list, Christian König,
moderated list:DMA BUFFER SHARING FRAMEWORK,
Maling list - DRI developers, Alex Deucher, linux-media
On Mon, Nov 16, 2020 at 12:30 PM Lee Jones <lee.jones@linaro.org> wrote:
>
> Unfortunately, a suitable one didn't already exist.
>
> Fixes the following W=1 kernel build warning(s):
>
> drivers/gpu/drm/radeon/radeon_device.c:637:6: warning: no previous prototype for ‘radeon_device_is_virtual’ [-Wmissing-prototypes]
> 637 | bool radeon_device_is_virtual(void)
> | ^~~~~~~~~~~~~~~~~~~~~~~~
>
> 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: Sumit Semwal <sumit.semwal@linaro.org>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Cc: linux-media@vger.kernel.org
> Cc: linaro-mm-sig@lists.linaro.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Applied. Thanks!
Alex
> ---
> drivers/gpu/drm/radeon/radeon_device.c | 1 +
> drivers/gpu/drm/radeon/radeon_device.h | 32 ++++++++++++++++++++++++++
> drivers/gpu/drm/radeon/radeon_drv.c | 3 +--
> 3 files changed, 34 insertions(+), 2 deletions(-)
> create mode 100644 drivers/gpu/drm/radeon/radeon_device.h
>
> diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c
> index 7f384ffe848a7..ad572f965190b 100644
> --- a/drivers/gpu/drm/radeon/radeon_device.c
> +++ b/drivers/gpu/drm/radeon/radeon_device.c
> @@ -42,6 +42,7 @@
> #include <drm/drm_probe_helper.h>
> #include <drm/radeon_drm.h>
>
> +#include "radeon_device.h"
> #include "radeon_reg.h"
> #include "radeon.h"
> #include "atom.h"
> diff --git a/drivers/gpu/drm/radeon/radeon_device.h b/drivers/gpu/drm/radeon/radeon_device.h
> new file mode 100644
> index 0000000000000..3112b99ae36f1
> --- /dev/null
> +++ b/drivers/gpu/drm/radeon/radeon_device.h
> @@ -0,0 +1,32 @@
> +/* radeon_device.h -- Private header for radeon device -*- linux-c -*-
> + *
> + * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
> + * Copyright 2000 VA Linux Systems, Inc., Fremont, California.
> + * All rights reserved.
> + *
> + * Permission is hereby granted, free of charge, to any person obtaining a
> + * copy of this software and associated documentation files (the "Software"),
> + * to deal in the Software without restriction, including without limitation
> + * the rights to use, copy, modify, merge, publish, distribute, sublicense,
> + * and/or sell copies of the Software, and to permit persons to whom the
> + * Software is furnished to do so, subject to the following conditions:
> + *
> + * The above copyright notice and this permission notice (including the next
> + * paragraph) shall be included in all copies or substantial portions of the
> + * Software.
> + *
> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
> + * PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
> + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
> + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
> + * DEALINGS IN THE SOFTWARE.
> + */
> +
> +#ifndef __RADEON_DEVICE_H__
> +#define __RADEON_DEVICE_H__
> +
> +bool radeon_device_is_virtual(void);
> +
> +#endif /* __RADEON_DEVICE_H__ */
> diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c
> index f813eb5e140dd..536b246b9a6aa 100644
> --- a/drivers/gpu/drm/radeon/radeon_drv.c
> +++ b/drivers/gpu/drm/radeon/radeon_drv.c
> @@ -52,6 +52,7 @@
>
> #include "radeon_drv.h"
> #include "radeon.h"
> +#include "radeon_device.h"
>
> /*
> * KMS wrapper.
> @@ -293,8 +294,6 @@ MODULE_DEVICE_TABLE(pci, pciidlist);
>
> static const struct drm_driver kms_driver;
>
> -bool radeon_device_is_virtual(void);
> -
> static int radeon_pci_probe(struct pci_dev *pdev,
> const struct pci_device_id *ent)
> {
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 27+ messages in thread
* [PATCH 03/43] drm/radeon/radeon_kms: Move 'radeon_*_kms' prototypes to shared header
2020-11-16 17:29 [RESEND 00/43] Rid W=1 warnings from GPU Lee Jones
2020-11-16 17:29 ` [PATCH 01/43] drm/radeon/atombios_encoders: Move 'radeon_atom_get_tv_timings()'s prototype into shared location Lee Jones
2020-11-16 17:29 ` [PATCH 02/43] drm/radeon/radeon: Move prototype into shared header Lee Jones
@ 2020-11-16 17:29 ` Lee Jones
2020-11-16 19:31 ` Alex Deucher
2020-11-16 17:29 ` [PATCH 04/43] drm/radeon/radeon_kms: Fix misnaming of 'radeon_info_ioctl's dev param Lee Jones
` (8 subsequent siblings)
11 siblings, 1 reply; 27+ messages in thread
From: Lee Jones @ 2020-11-16 17:29 UTC (permalink / raw)
To: lee.jones
Cc: linux-kernel, Alex Deucher, Christian König, David Airlie,
Daniel Vetter, Sumit Semwal, amd-gfx, dri-devel, linux-media,
linaro-mm-sig
Fixes the following W=1 kernel build warning(s):
drivers/gpu/drm/radeon/radeon_kms.c:756:5: warning: no previous prototype for ‘radeon_get_vblank_counter_kms’ [-Wmissing-prototypes]
756 | u32 radeon_get_vblank_counter_kms(struct drm_crtc *crtc)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/radeon/radeon_kms.c:826:5: warning: no previous prototype for ‘radeon_enable_vblank_kms’ [-Wmissing-prototypes]
826 | int radeon_enable_vblank_kms(struct drm_crtc *crtc)
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/radeon/radeon_kms.c:853:6: warning: no previous prototype for ‘radeon_disable_vblank_kms’ [-Wmissing-prototypes]
853 | void radeon_disable_vblank_kms(struct drm_crtc *crtc)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
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: Sumit Semwal <sumit.semwal@linaro.org>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Cc: linux-media@vger.kernel.org
Cc: linaro-mm-sig@lists.linaro.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
drivers/gpu/drm/radeon/radeon_display.c | 1 +
drivers/gpu/drm/radeon/radeon_kms.c | 1 +
drivers/gpu/drm/radeon/radeon_kms.h | 35 +++++++++++++++++++++++++
3 files changed, 37 insertions(+)
create mode 100644 drivers/gpu/drm/radeon/radeon_kms.h
diff --git a/drivers/gpu/drm/radeon/radeon_display.c b/drivers/gpu/drm/radeon/radeon_display.c
index eb0d4cb95f0a6..3a6fedad002d7 100644
--- a/drivers/gpu/drm/radeon/radeon_display.c
+++ b/drivers/gpu/drm/radeon/radeon_display.c
@@ -44,6 +44,7 @@
#include "atom.h"
#include "radeon.h"
+#include "radeon_kms.h"
static void avivo_crtc_load_lut(struct drm_crtc *crtc)
{
diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c
index 3d31c04e4b3db..001940bca90a6 100644
--- a/drivers/gpu/drm/radeon/radeon_kms.c
+++ b/drivers/gpu/drm/radeon/radeon_kms.c
@@ -41,6 +41,7 @@
#include "radeon.h"
#include "radeon_asic.h"
#include "radeon_drv.h"
+#include "radeon_kms.h"
#if defined(CONFIG_VGA_SWITCHEROO)
bool radeon_has_atpx(void);
diff --git a/drivers/gpu/drm/radeon/radeon_kms.h b/drivers/gpu/drm/radeon/radeon_kms.h
new file mode 100644
index 0000000000000..36e73cea92154
--- /dev/null
+++ b/drivers/gpu/drm/radeon/radeon_kms.h
@@ -0,0 +1,35 @@
+/* radeon_kms.h -- Private header for radeon driver -*- linux-c -*-
+ *
+ * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 2000 VA Linux Systems, Inc., Fremont, California.
+ * All rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+#ifndef __RADEON_KMS_H__
+#define __RADEON_KMS_H__
+
+u32 radeon_get_vblank_counter_kms(struct drm_crtc *crtc);
+int radeon_enable_vblank_kms(struct drm_crtc *crtc);
+void radeon_disable_vblank_kms(struct drm_crtc *crtc);
+
+#endif /* __RADEON_KMS_H__ */
--
2.25.1
^ permalink raw reply related [flat|nested] 27+ messages in thread
* Re: [PATCH 03/43] drm/radeon/radeon_kms: Move 'radeon_*_kms' prototypes to shared header
2020-11-16 17:29 ` [PATCH 03/43] drm/radeon/radeon_kms: Move 'radeon_*_kms' prototypes to " Lee Jones
@ 2020-11-16 19:31 ` Alex Deucher
0 siblings, 0 replies; 27+ messages in thread
From: Alex Deucher @ 2020-11-16 19:31 UTC (permalink / raw)
To: Lee Jones
Cc: David Airlie, LKML, amd-gfx list, Christian König,
moderated list:DMA BUFFER SHARING FRAMEWORK,
Maling list - DRI developers, Alex Deucher, linux-media
On Mon, Nov 16, 2020 at 12:30 PM Lee Jones <lee.jones@linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
> drivers/gpu/drm/radeon/radeon_kms.c:756:5: warning: no previous prototype for ‘radeon_get_vblank_counter_kms’ [-Wmissing-prototypes]
> 756 | u32 radeon_get_vblank_counter_kms(struct drm_crtc *crtc)
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/gpu/drm/radeon/radeon_kms.c:826:5: warning: no previous prototype for ‘radeon_enable_vblank_kms’ [-Wmissing-prototypes]
> 826 | int radeon_enable_vblank_kms(struct drm_crtc *crtc)
> | ^~~~~~~~~~~~~~~~~~~~~~~~
> drivers/gpu/drm/radeon/radeon_kms.c:853:6: warning: no previous prototype for ‘radeon_disable_vblank_kms’ [-Wmissing-prototypes]
> 853 | void radeon_disable_vblank_kms(struct drm_crtc *crtc)
> | ^~~~~~~~~~~~~~~~~~~~~~~~~
>
> 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: Sumit Semwal <sumit.semwal@linaro.org>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Cc: linux-media@vger.kernel.org
> Cc: linaro-mm-sig@lists.linaro.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Applied. Thanks!
Alex
> ---
> drivers/gpu/drm/radeon/radeon_display.c | 1 +
> drivers/gpu/drm/radeon/radeon_kms.c | 1 +
> drivers/gpu/drm/radeon/radeon_kms.h | 35 +++++++++++++++++++++++++
> 3 files changed, 37 insertions(+)
> create mode 100644 drivers/gpu/drm/radeon/radeon_kms.h
>
> diff --git a/drivers/gpu/drm/radeon/radeon_display.c b/drivers/gpu/drm/radeon/radeon_display.c
> index eb0d4cb95f0a6..3a6fedad002d7 100644
> --- a/drivers/gpu/drm/radeon/radeon_display.c
> +++ b/drivers/gpu/drm/radeon/radeon_display.c
> @@ -44,6 +44,7 @@
>
> #include "atom.h"
> #include "radeon.h"
> +#include "radeon_kms.h"
>
> static void avivo_crtc_load_lut(struct drm_crtc *crtc)
> {
> diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c
> index 3d31c04e4b3db..001940bca90a6 100644
> --- a/drivers/gpu/drm/radeon/radeon_kms.c
> +++ b/drivers/gpu/drm/radeon/radeon_kms.c
> @@ -41,6 +41,7 @@
> #include "radeon.h"
> #include "radeon_asic.h"
> #include "radeon_drv.h"
> +#include "radeon_kms.h"
>
> #if defined(CONFIG_VGA_SWITCHEROO)
> bool radeon_has_atpx(void);
> diff --git a/drivers/gpu/drm/radeon/radeon_kms.h b/drivers/gpu/drm/radeon/radeon_kms.h
> new file mode 100644
> index 0000000000000..36e73cea92154
> --- /dev/null
> +++ b/drivers/gpu/drm/radeon/radeon_kms.h
> @@ -0,0 +1,35 @@
> +/* radeon_kms.h -- Private header for radeon driver -*- linux-c -*-
> + *
> + * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
> + * Copyright 2000 VA Linux Systems, Inc., Fremont, California.
> + * All rights reserved.
> + *
> + * Permission is hereby granted, free of charge, to any person obtaining a
> + * copy of this software and associated documentation files (the "Software"),
> + * to deal in the Software without restriction, including without limitation
> + * the rights to use, copy, modify, merge, publish, distribute, sublicense,
> + * and/or sell copies of the Software, and to permit persons to whom the
> + * Software is furnished to do so, subject to the following conditions:
> + *
> + * The above copyright notice and this permission notice (including the next
> + * paragraph) shall be included in all copies or substantial portions of the
> + * Software.
> + *
> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
> + * PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
> + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
> + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
> + * DEALINGS IN THE SOFTWARE.
> + *
> + */
> +
> +#ifndef __RADEON_KMS_H__
> +#define __RADEON_KMS_H__
> +
> +u32 radeon_get_vblank_counter_kms(struct drm_crtc *crtc);
> +int radeon_enable_vblank_kms(struct drm_crtc *crtc);
> +void radeon_disable_vblank_kms(struct drm_crtc *crtc);
> +
> +#endif /* __RADEON_KMS_H__ */
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 27+ messages in thread
* [PATCH 04/43] drm/radeon/radeon_kms: Fix misnaming of 'radeon_info_ioctl's dev param
2020-11-16 17:29 [RESEND 00/43] Rid W=1 warnings from GPU Lee Jones
` (2 preceding siblings ...)
2020-11-16 17:29 ` [PATCH 03/43] drm/radeon/radeon_kms: Move 'radeon_*_kms' prototypes to " Lee Jones
@ 2020-11-16 17:29 ` Lee Jones
2020-11-16 19:32 ` Alex Deucher
2020-11-16 17:29 ` [PATCH 05/43] drm/radeon: Move radeon_ttm{init,fini} to shared location Lee Jones
` (7 subsequent siblings)
11 siblings, 1 reply; 27+ messages in thread
From: Lee Jones @ 2020-11-16 17:29 UTC (permalink / raw)
To: lee.jones
Cc: linux-kernel, Alex Deucher, Christian König, David Airlie,
Daniel Vetter, amd-gfx, dri-devel
Fixes the following W=1 kernel build warning(s):
drivers/gpu/drm/radeon/radeon_kms.c:226: warning: Function parameter or member 'dev' not described in 'radeon_info_ioctl'
drivers/gpu/drm/radeon/radeon_kms.c:226: warning: Excess function parameter 'rdev' description in 'radeon_info_ioctl'
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: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
drivers/gpu/drm/radeon/radeon_kms.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c
index 001940bca90a6..50cee4880bb46 100644
--- a/drivers/gpu/drm/radeon/radeon_kms.c
+++ b/drivers/gpu/drm/radeon/radeon_kms.c
@@ -214,7 +214,7 @@ static void radeon_set_filp_rights(struct drm_device *dev,
/**
* radeon_info_ioctl - answer a device specific request.
*
- * @rdev: radeon device pointer
+ * @dev: drm device pointer
* @data: request object
* @filp: drm filp
*
--
2.25.1
^ permalink raw reply related [flat|nested] 27+ messages in thread
* Re: [PATCH 04/43] drm/radeon/radeon_kms: Fix misnaming of 'radeon_info_ioctl's dev param
2020-11-16 17:29 ` [PATCH 04/43] drm/radeon/radeon_kms: Fix misnaming of 'radeon_info_ioctl's dev param Lee Jones
@ 2020-11-16 19:32 ` Alex Deucher
0 siblings, 0 replies; 27+ messages in thread
From: Alex Deucher @ 2020-11-16 19:32 UTC (permalink / raw)
To: Lee Jones
Cc: David Airlie, LKML, amd-gfx list, Maling list - DRI developers,
Alex Deucher, Christian König
On Mon, Nov 16, 2020 at 12:30 PM Lee Jones <lee.jones@linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
> drivers/gpu/drm/radeon/radeon_kms.c:226: warning: Function parameter or member 'dev' not described in 'radeon_info_ioctl'
> drivers/gpu/drm/radeon/radeon_kms.c:226: warning: Excess function parameter 'rdev' description in 'radeon_info_ioctl'
>
> 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: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Applied. Thanks!
Alex
> ---
> drivers/gpu/drm/radeon/radeon_kms.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c
> index 001940bca90a6..50cee4880bb46 100644
> --- a/drivers/gpu/drm/radeon/radeon_kms.c
> +++ b/drivers/gpu/drm/radeon/radeon_kms.c
> @@ -214,7 +214,7 @@ static void radeon_set_filp_rights(struct drm_device *dev,
> /**
> * radeon_info_ioctl - answer a device specific request.
> *
> - * @rdev: radeon device pointer
> + * @dev: drm device pointer
> * @data: request object
> * @filp: drm filp
> *
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 27+ messages in thread
* [PATCH 05/43] drm/radeon: Move radeon_ttm{init,fini} to shared location
2020-11-16 17:29 [RESEND 00/43] Rid W=1 warnings from GPU Lee Jones
` (3 preceding siblings ...)
2020-11-16 17:29 ` [PATCH 04/43] drm/radeon/radeon_kms: Fix misnaming of 'radeon_info_ioctl's dev param Lee Jones
@ 2020-11-16 17:29 ` Lee Jones
2020-11-16 19:36 ` [PATCH 05/43] drm/radeon: Move radeon_ttm{init, fini} " Alex Deucher
2020-11-16 17:29 ` [PATCH 06/43] drm/radeon/radeon_legacy_encoders: Move 'radeon_add_legacy_encoder' prototype to shared header Lee Jones
` (6 subsequent siblings)
11 siblings, 1 reply; 27+ messages in thread
From: Lee Jones @ 2020-11-16 17:29 UTC (permalink / raw)
To: lee.jones
Cc: linux-kernel, Alex Deucher, Christian König, David Airlie,
Daniel Vetter, Sumit Semwal, amd-gfx, dri-devel, linux-media,
linaro-mm-sig
Fixes the following W=1 kernel build warning(s):
drivers/gpu/drm/radeon/radeon_ttm.c: At top level:
drivers/gpu/drm/radeon/radeon_ttm.c:817:5: warning: no previous prototype for ‘radeon_ttm_init’ [-Wmissing-prototypes]
817 | int radeon_ttm_init(struct radeon_device *rdev)
| ^~~~~~~~~~~~~~~
drivers/gpu/drm/radeon/radeon_ttm.c:878:6: warning: no previous prototype for ‘radeon_ttm_fini’ [-Wmissing-prototypes]
878 | void radeon_ttm_fini(struct radeon_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: Sumit Semwal <sumit.semwal@linaro.org>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Cc: linux-media@vger.kernel.org
Cc: linaro-mm-sig@lists.linaro.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
drivers/gpu/drm/radeon/radeon_object.c | 3 +--
drivers/gpu/drm/radeon/radeon_ttm.c | 1 +
drivers/gpu/drm/radeon/radeon_ttm.h | 36 ++++++++++++++++++++++++++
3 files changed, 38 insertions(+), 2 deletions(-)
create mode 100644 drivers/gpu/drm/radeon/radeon_ttm.h
diff --git a/drivers/gpu/drm/radeon/radeon_object.c b/drivers/gpu/drm/radeon/radeon_object.c
index ab81e35cb0606..8bc5ad1d65857 100644
--- a/drivers/gpu/drm/radeon/radeon_object.c
+++ b/drivers/gpu/drm/radeon/radeon_object.c
@@ -40,9 +40,8 @@
#include "radeon.h"
#include "radeon_trace.h"
+#include "radeon_ttm.h"
-int radeon_ttm_init(struct radeon_device *rdev);
-void radeon_ttm_fini(struct radeon_device *rdev);
static void radeon_bo_clear_surface_reg(struct radeon_bo *bo);
/*
diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c
index 2939e71ceb700..28b300ed200ea 100644
--- a/drivers/gpu/drm/radeon/radeon_ttm.c
+++ b/drivers/gpu/drm/radeon/radeon_ttm.c
@@ -51,6 +51,7 @@
#include "radeon_reg.h"
#include "radeon.h"
+#include "radeon_ttm.h"
static int radeon_ttm_debugfs_init(struct radeon_device *rdev);
static void radeon_ttm_debugfs_fini(struct radeon_device *rdev);
diff --git a/drivers/gpu/drm/radeon/radeon_ttm.h b/drivers/gpu/drm/radeon/radeon_ttm.h
new file mode 100644
index 0000000000000..91ea7141bc812
--- /dev/null
+++ b/drivers/gpu/drm/radeon/radeon_ttm.h
@@ -0,0 +1,36 @@
+/* radeon_ttm.h -- Private header for radeon driver -*- linux-c -*-
+ *
+ * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 2000 VA Linux Systems, Inc., Fremont, California.
+ * All rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+#ifndef __RADEON_TTM_H__
+#define __RADEON_TTM_H__
+
+struct radeon_device;
+
+int radeon_ttm_init(struct radeon_device *rdev);
+void radeon_ttm_fini(struct radeon_device *rdev);
+
+#endif /* __RADEON_TTM_H__ */
--
2.25.1
^ permalink raw reply related [flat|nested] 27+ messages in thread
* Re: [PATCH 05/43] drm/radeon: Move radeon_ttm{init, fini} to shared location
2020-11-16 17:29 ` [PATCH 05/43] drm/radeon: Move radeon_ttm{init,fini} to shared location Lee Jones
@ 2020-11-16 19:36 ` Alex Deucher
0 siblings, 0 replies; 27+ messages in thread
From: Alex Deucher @ 2020-11-16 19:36 UTC (permalink / raw)
To: Lee Jones
Cc: David Airlie, LKML, amd-gfx list, Christian König,
moderated list:DMA BUFFER SHARING FRAMEWORK,
Maling list - DRI developers, Alex Deucher, linux-media
On Mon, Nov 16, 2020 at 12:30 PM Lee Jones <lee.jones@linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
> drivers/gpu/drm/radeon/radeon_ttm.c: At top level:
> drivers/gpu/drm/radeon/radeon_ttm.c:817:5: warning: no previous prototype for ‘radeon_ttm_init’ [-Wmissing-prototypes]
> 817 | int radeon_ttm_init(struct radeon_device *rdev)
> | ^~~~~~~~~~~~~~~
> drivers/gpu/drm/radeon/radeon_ttm.c:878:6: warning: no previous prototype for ‘radeon_ttm_fini’ [-Wmissing-prototypes]
> 878 | void radeon_ttm_fini(struct radeon_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: Sumit Semwal <sumit.semwal@linaro.org>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Cc: linux-media@vger.kernel.org
> Cc: linaro-mm-sig@lists.linaro.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Applied. Thanks!
Alex
> ---
> drivers/gpu/drm/radeon/radeon_object.c | 3 +--
> drivers/gpu/drm/radeon/radeon_ttm.c | 1 +
> drivers/gpu/drm/radeon/radeon_ttm.h | 36 ++++++++++++++++++++++++++
> 3 files changed, 38 insertions(+), 2 deletions(-)
> create mode 100644 drivers/gpu/drm/radeon/radeon_ttm.h
>
> diff --git a/drivers/gpu/drm/radeon/radeon_object.c b/drivers/gpu/drm/radeon/radeon_object.c
> index ab81e35cb0606..8bc5ad1d65857 100644
> --- a/drivers/gpu/drm/radeon/radeon_object.c
> +++ b/drivers/gpu/drm/radeon/radeon_object.c
> @@ -40,9 +40,8 @@
>
> #include "radeon.h"
> #include "radeon_trace.h"
> +#include "radeon_ttm.h"
>
> -int radeon_ttm_init(struct radeon_device *rdev);
> -void radeon_ttm_fini(struct radeon_device *rdev);
> static void radeon_bo_clear_surface_reg(struct radeon_bo *bo);
>
> /*
> diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c
> index 2939e71ceb700..28b300ed200ea 100644
> --- a/drivers/gpu/drm/radeon/radeon_ttm.c
> +++ b/drivers/gpu/drm/radeon/radeon_ttm.c
> @@ -51,6 +51,7 @@
>
> #include "radeon_reg.h"
> #include "radeon.h"
> +#include "radeon_ttm.h"
>
> static int radeon_ttm_debugfs_init(struct radeon_device *rdev);
> static void radeon_ttm_debugfs_fini(struct radeon_device *rdev);
> diff --git a/drivers/gpu/drm/radeon/radeon_ttm.h b/drivers/gpu/drm/radeon/radeon_ttm.h
> new file mode 100644
> index 0000000000000..91ea7141bc812
> --- /dev/null
> +++ b/drivers/gpu/drm/radeon/radeon_ttm.h
> @@ -0,0 +1,36 @@
> +/* radeon_ttm.h -- Private header for radeon driver -*- linux-c -*-
> + *
> + * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
> + * Copyright 2000 VA Linux Systems, Inc., Fremont, California.
> + * All rights reserved.
> + *
> + * Permission is hereby granted, free of charge, to any person obtaining a
> + * copy of this software and associated documentation files (the "Software"),
> + * to deal in the Software without restriction, including without limitation
> + * the rights to use, copy, modify, merge, publish, distribute, sublicense,
> + * and/or sell copies of the Software, and to permit persons to whom the
> + * Software is furnished to do so, subject to the following conditions:
> + *
> + * The above copyright notice and this permission notice (including the next
> + * paragraph) shall be included in all copies or substantial portions of the
> + * Software.
> + *
> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
> + * PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
> + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
> + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
> + * DEALINGS IN THE SOFTWARE.
> + *
> + */
> +
> +#ifndef __RADEON_TTM_H__
> +#define __RADEON_TTM_H__
> +
> +struct radeon_device;
> +
> +int radeon_ttm_init(struct radeon_device *rdev);
> +void radeon_ttm_fini(struct radeon_device *rdev);
> +
> +#endif /* __RADEON_TTM_H__ */
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 27+ messages in thread
* [PATCH 06/43] drm/radeon/radeon_legacy_encoders: Move 'radeon_add_legacy_encoder' prototype to shared header
2020-11-16 17:29 [RESEND 00/43] Rid W=1 warnings from GPU Lee Jones
` (4 preceding siblings ...)
2020-11-16 17:29 ` [PATCH 05/43] drm/radeon: Move radeon_ttm{init,fini} to shared location Lee Jones
@ 2020-11-16 17:29 ` Lee Jones
2020-11-16 19:37 ` Alex Deucher
2020-11-16 17:29 ` [PATCH 07/43] drm/radeon/radeon_legacy_encoders: Move 'radeon_add_legacy_encoder's prototype to shared location Lee Jones
` (5 subsequent siblings)
11 siblings, 1 reply; 27+ messages in thread
From: Lee Jones @ 2020-11-16 17:29 UTC (permalink / raw)
To: lee.jones
Cc: linux-kernel, Alex Deucher, Christian König, David Airlie,
Daniel Vetter, Sumit Semwal, amd-gfx, dri-devel, linux-media,
linaro-mm-sig
Fixes the following W=1 kernel build warning(s):
drivers/gpu/drm/radeon/radeon_legacy_encoders.c:1745:1: warning: no previous prototype for ‘radeon_add_legacy_encoder’ [-Wmissing-prototypes]
1745 | radeon_add_legacy_encoder(struct drm_device *dev, uint32_t encoder_enum, uint32_t supported_device)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
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: Sumit Semwal <sumit.semwal@linaro.org>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Cc: linux-media@vger.kernel.org
Cc: linaro-mm-sig@lists.linaro.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
drivers/gpu/drm/radeon/radeon_encoders.c | 4 +--
.../gpu/drm/radeon/radeon_legacy_encoders.c | 1 +
.../gpu/drm/radeon/radeon_legacy_encoders.h | 34 +++++++++++++++++++
3 files changed, 36 insertions(+), 3 deletions(-)
create mode 100644 drivers/gpu/drm/radeon/radeon_legacy_encoders.h
diff --git a/drivers/gpu/drm/radeon/radeon_encoders.c b/drivers/gpu/drm/radeon/radeon_encoders.c
index ced022fae19d7..b60a373d3ead3 100644
--- a/drivers/gpu/drm/radeon/radeon_encoders.c
+++ b/drivers/gpu/drm/radeon/radeon_encoders.c
@@ -31,11 +31,9 @@
#include <drm/radeon_drm.h>
#include "radeon.h"
+#include "radeon_legacy_encoders.h"
#include "atom.h"
-extern void
-radeon_legacy_backlight_init(struct radeon_encoder *radeon_encoder,
- struct drm_connector *drm_connector);
extern void
radeon_atom_backlight_init(struct radeon_encoder *radeon_encoder,
struct drm_connector *drm_connector);
diff --git a/drivers/gpu/drm/radeon/radeon_legacy_encoders.c b/drivers/gpu/drm/radeon/radeon_legacy_encoders.c
index 44d060f75318e..e64fd0ce67070 100644
--- a/drivers/gpu/drm/radeon/radeon_legacy_encoders.c
+++ b/drivers/gpu/drm/radeon/radeon_legacy_encoders.c
@@ -35,6 +35,7 @@
#include "radeon.h"
#include "radeon_asic.h"
+#include "radeon_legacy_encoders.h"
#include "atom.h"
#ifdef CONFIG_PMAC_BACKLIGHT
#include <asm/backlight.h>
diff --git a/drivers/gpu/drm/radeon/radeon_legacy_encoders.h b/drivers/gpu/drm/radeon/radeon_legacy_encoders.h
new file mode 100644
index 0000000000000..a80b387559d4d
--- /dev/null
+++ b/drivers/gpu/drm/radeon/radeon_legacy_encoders.h
@@ -0,0 +1,34 @@
+/* radeon_legacy_encoders.h -- Private header for radeon driver -*- linux-c -*-
+ *
+ * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 2000 VA Linux Systems, Inc., Fremont, California.
+ * All rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+#ifndef __RADEON_LEGACY_ENCODERS_H__
+#define __RADEON_LEGACY_ENCODERS_H__
+
+void radeon_legacy_backlight_init(struct radeon_encoder *radeon_encoder,
+ struct drm_connector *drm_connector);
+
+#endif /* __RADEON_LEGACY_ENCODERS_H__ */
--
2.25.1
^ permalink raw reply related [flat|nested] 27+ messages in thread
* Re: [PATCH 06/43] drm/radeon/radeon_legacy_encoders: Move 'radeon_add_legacy_encoder' prototype to shared header
2020-11-16 17:29 ` [PATCH 06/43] drm/radeon/radeon_legacy_encoders: Move 'radeon_add_legacy_encoder' prototype to shared header Lee Jones
@ 2020-11-16 19:37 ` Alex Deucher
0 siblings, 0 replies; 27+ messages in thread
From: Alex Deucher @ 2020-11-16 19:37 UTC (permalink / raw)
To: Lee Jones
Cc: David Airlie, LKML, amd-gfx list, Christian König,
moderated list:DMA BUFFER SHARING FRAMEWORK,
Maling list - DRI developers, Alex Deucher, linux-media
On Mon, Nov 16, 2020 at 12:30 PM Lee Jones <lee.jones@linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
> drivers/gpu/drm/radeon/radeon_legacy_encoders.c:1745:1: warning: no previous prototype for ‘radeon_add_legacy_encoder’ [-Wmissing-prototypes]
> 1745 | radeon_add_legacy_encoder(struct drm_device *dev, uint32_t encoder_enum, uint32_t supported_device)
> | ^~~~~~~~~~~~~~~~~~~~~~~~~
>
> 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: Sumit Semwal <sumit.semwal@linaro.org>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Cc: linux-media@vger.kernel.org
> Cc: linaro-mm-sig@lists.linaro.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Applied. Thanks!
Alex
> ---
> drivers/gpu/drm/radeon/radeon_encoders.c | 4 +--
> .../gpu/drm/radeon/radeon_legacy_encoders.c | 1 +
> .../gpu/drm/radeon/radeon_legacy_encoders.h | 34 +++++++++++++++++++
> 3 files changed, 36 insertions(+), 3 deletions(-)
> create mode 100644 drivers/gpu/drm/radeon/radeon_legacy_encoders.h
>
> diff --git a/drivers/gpu/drm/radeon/radeon_encoders.c b/drivers/gpu/drm/radeon/radeon_encoders.c
> index ced022fae19d7..b60a373d3ead3 100644
> --- a/drivers/gpu/drm/radeon/radeon_encoders.c
> +++ b/drivers/gpu/drm/radeon/radeon_encoders.c
> @@ -31,11 +31,9 @@
> #include <drm/radeon_drm.h>
>
> #include "radeon.h"
> +#include "radeon_legacy_encoders.h"
> #include "atom.h"
>
> -extern void
> -radeon_legacy_backlight_init(struct radeon_encoder *radeon_encoder,
> - struct drm_connector *drm_connector);
> extern void
> radeon_atom_backlight_init(struct radeon_encoder *radeon_encoder,
> struct drm_connector *drm_connector);
> diff --git a/drivers/gpu/drm/radeon/radeon_legacy_encoders.c b/drivers/gpu/drm/radeon/radeon_legacy_encoders.c
> index 44d060f75318e..e64fd0ce67070 100644
> --- a/drivers/gpu/drm/radeon/radeon_legacy_encoders.c
> +++ b/drivers/gpu/drm/radeon/radeon_legacy_encoders.c
> @@ -35,6 +35,7 @@
>
> #include "radeon.h"
> #include "radeon_asic.h"
> +#include "radeon_legacy_encoders.h"
> #include "atom.h"
> #ifdef CONFIG_PMAC_BACKLIGHT
> #include <asm/backlight.h>
> diff --git a/drivers/gpu/drm/radeon/radeon_legacy_encoders.h b/drivers/gpu/drm/radeon/radeon_legacy_encoders.h
> new file mode 100644
> index 0000000000000..a80b387559d4d
> --- /dev/null
> +++ b/drivers/gpu/drm/radeon/radeon_legacy_encoders.h
> @@ -0,0 +1,34 @@
> +/* radeon_legacy_encoders.h -- Private header for radeon driver -*- linux-c -*-
> + *
> + * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
> + * Copyright 2000 VA Linux Systems, Inc., Fremont, California.
> + * All rights reserved.
> + *
> + * Permission is hereby granted, free of charge, to any person obtaining a
> + * copy of this software and associated documentation files (the "Software"),
> + * to deal in the Software without restriction, including without limitation
> + * the rights to use, copy, modify, merge, publish, distribute, sublicense,
> + * and/or sell copies of the Software, and to permit persons to whom the
> + * Software is furnished to do so, subject to the following conditions:
> + *
> + * The above copyright notice and this permission notice (including the next
> + * paragraph) shall be included in all copies or substantial portions of the
> + * Software.
> + *
> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
> + * PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
> + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
> + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
> + * DEALINGS IN THE SOFTWARE.
> + *
> + */
> +
> +#ifndef __RADEON_LEGACY_ENCODERS_H__
> +#define __RADEON_LEGACY_ENCODERS_H__
> +
> +void radeon_legacy_backlight_init(struct radeon_encoder *radeon_encoder,
> + struct drm_connector *drm_connector);
> +
> +#endif /* __RADEON_LEGACY_ENCODERS_H__ */
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 27+ messages in thread
* [PATCH 07/43] drm/radeon/radeon_legacy_encoders: Move 'radeon_add_legacy_encoder's prototype to shared location
2020-11-16 17:29 [RESEND 00/43] Rid W=1 warnings from GPU Lee Jones
` (5 preceding siblings ...)
2020-11-16 17:29 ` [PATCH 06/43] drm/radeon/radeon_legacy_encoders: Move 'radeon_add_legacy_encoder' prototype to shared header Lee Jones
@ 2020-11-16 17:29 ` Lee Jones
2020-11-16 19:37 ` Alex Deucher
2020-11-16 17:29 ` [PATCH 08/43] drm/radeon/radeon_irq_kms: Demote non-conformant kernel-doc fix another Lee Jones
` (4 subsequent siblings)
11 siblings, 1 reply; 27+ messages in thread
From: Lee Jones @ 2020-11-16 17:29 UTC (permalink / raw)
To: lee.jones
Cc: linux-kernel, Alex Deucher, Christian König, David Airlie,
Daniel Vetter, Sumit Semwal, amd-gfx, dri-devel, linux-media,
linaro-mm-sig
Fixes the following W=1 kernel build warning(s):
drivers/gpu/drm/radeon/radeon_legacy_encoders.c:1746:1: warning: no previous prototype for ‘radeon_add_legacy_encoder’ [-Wmissing-prototypes]
1746 | radeon_add_legacy_encoder(struct drm_device *dev, uint32_t encoder_enum, uint32_t supported_device)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
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: Sumit Semwal <sumit.semwal@linaro.org>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Cc: linux-media@vger.kernel.org
Cc: linaro-mm-sig@lists.linaro.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
drivers/gpu/drm/radeon/radeon_atombios.c | 6 +-----
drivers/gpu/drm/radeon/radeon_combios.c | 6 +-----
drivers/gpu/drm/radeon/radeon_legacy_encoders.h | 2 ++
3 files changed, 4 insertions(+), 10 deletions(-)
diff --git a/drivers/gpu/drm/radeon/radeon_atombios.c b/drivers/gpu/drm/radeon/radeon_atombios.c
index 71bf2ed172697..cc80651b25773 100644
--- a/drivers/gpu/drm/radeon/radeon_atombios.c
+++ b/drivers/gpu/drm/radeon/radeon_atombios.c
@@ -35,16 +35,12 @@
#include "atom-bits.h"
#include "radeon_asic.h"
#include "radeon_atombios.h"
+#include "radeon_legacy_encoders.h"
extern void
radeon_add_atom_encoder(struct drm_device *dev, uint32_t encoder_enum,
uint32_t supported_device, u16 caps);
-/* from radeon_legacy_encoder.c */
-extern void
-radeon_add_legacy_encoder(struct drm_device *dev, uint32_t encoder_enum,
- uint32_t supported_device);
-
union atom_supported_devices {
struct _ATOM_SUPPORTED_DEVICES_INFO info;
struct _ATOM_SUPPORTED_DEVICES_INFO_2 info_2;
diff --git a/drivers/gpu/drm/radeon/radeon_combios.c b/drivers/gpu/drm/radeon/radeon_combios.c
index d3c04df7e75d7..ff2135059c071 100644
--- a/drivers/gpu/drm/radeon/radeon_combios.c
+++ b/drivers/gpu/drm/radeon/radeon_combios.c
@@ -31,6 +31,7 @@
#include <drm/radeon_drm.h>
#include "radeon.h"
+#include "radeon_legacy_encoders.h"
#include "atom.h"
#ifdef CONFIG_PPC_PMAC
@@ -40,11 +41,6 @@
#include <asm/prom.h>
#endif /* CONFIG_PPC_PMAC */
-/* from radeon_legacy_encoder.c */
-extern void
-radeon_add_legacy_encoder(struct drm_device *dev, uint32_t encoder_enum,
- uint32_t supported_device);
-
/* old legacy ATI BIOS routines */
/* COMBIOS table offsets */
diff --git a/drivers/gpu/drm/radeon/radeon_legacy_encoders.h b/drivers/gpu/drm/radeon/radeon_legacy_encoders.h
index a80b387559d4d..f4c7432267e67 100644
--- a/drivers/gpu/drm/radeon/radeon_legacy_encoders.h
+++ b/drivers/gpu/drm/radeon/radeon_legacy_encoders.h
@@ -30,5 +30,7 @@
void radeon_legacy_backlight_init(struct radeon_encoder *radeon_encoder,
struct drm_connector *drm_connector);
+void radeon_add_legacy_encoder(struct drm_device *dev, uint32_t encoder_enum,
+ uint32_t supported_device);
#endif /* __RADEON_LEGACY_ENCODERS_H__ */
--
2.25.1
^ permalink raw reply related [flat|nested] 27+ messages in thread
* Re: [PATCH 07/43] drm/radeon/radeon_legacy_encoders: Move 'radeon_add_legacy_encoder's prototype to shared location
2020-11-16 17:29 ` [PATCH 07/43] drm/radeon/radeon_legacy_encoders: Move 'radeon_add_legacy_encoder's prototype to shared location Lee Jones
@ 2020-11-16 19:37 ` Alex Deucher
0 siblings, 0 replies; 27+ messages in thread
From: Alex Deucher @ 2020-11-16 19:37 UTC (permalink / raw)
To: Lee Jones
Cc: David Airlie, LKML, amd-gfx list, Christian König,
moderated list:DMA BUFFER SHARING FRAMEWORK,
Maling list - DRI developers, Alex Deucher, linux-media
On Mon, Nov 16, 2020 at 12:30 PM Lee Jones <lee.jones@linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
> drivers/gpu/drm/radeon/radeon_legacy_encoders.c:1746:1: warning: no previous prototype for ‘radeon_add_legacy_encoder’ [-Wmissing-prototypes]
> 1746 | radeon_add_legacy_encoder(struct drm_device *dev, uint32_t encoder_enum, uint32_t supported_device)
> | ^~~~~~~~~~~~~~~~~~~~~~~~~
>
> 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: Sumit Semwal <sumit.semwal@linaro.org>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Cc: linux-media@vger.kernel.org
> Cc: linaro-mm-sig@lists.linaro.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Applied. Thanks!
Alex
> ---
> drivers/gpu/drm/radeon/radeon_atombios.c | 6 +-----
> drivers/gpu/drm/radeon/radeon_combios.c | 6 +-----
> drivers/gpu/drm/radeon/radeon_legacy_encoders.h | 2 ++
> 3 files changed, 4 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_atombios.c b/drivers/gpu/drm/radeon/radeon_atombios.c
> index 71bf2ed172697..cc80651b25773 100644
> --- a/drivers/gpu/drm/radeon/radeon_atombios.c
> +++ b/drivers/gpu/drm/radeon/radeon_atombios.c
> @@ -35,16 +35,12 @@
> #include "atom-bits.h"
> #include "radeon_asic.h"
> #include "radeon_atombios.h"
> +#include "radeon_legacy_encoders.h"
>
> extern void
> radeon_add_atom_encoder(struct drm_device *dev, uint32_t encoder_enum,
> uint32_t supported_device, u16 caps);
>
> -/* from radeon_legacy_encoder.c */
> -extern void
> -radeon_add_legacy_encoder(struct drm_device *dev, uint32_t encoder_enum,
> - uint32_t supported_device);
> -
> union atom_supported_devices {
> struct _ATOM_SUPPORTED_DEVICES_INFO info;
> struct _ATOM_SUPPORTED_DEVICES_INFO_2 info_2;
> diff --git a/drivers/gpu/drm/radeon/radeon_combios.c b/drivers/gpu/drm/radeon/radeon_combios.c
> index d3c04df7e75d7..ff2135059c071 100644
> --- a/drivers/gpu/drm/radeon/radeon_combios.c
> +++ b/drivers/gpu/drm/radeon/radeon_combios.c
> @@ -31,6 +31,7 @@
> #include <drm/radeon_drm.h>
>
> #include "radeon.h"
> +#include "radeon_legacy_encoders.h"
> #include "atom.h"
>
> #ifdef CONFIG_PPC_PMAC
> @@ -40,11 +41,6 @@
> #include <asm/prom.h>
> #endif /* CONFIG_PPC_PMAC */
>
> -/* from radeon_legacy_encoder.c */
> -extern void
> -radeon_add_legacy_encoder(struct drm_device *dev, uint32_t encoder_enum,
> - uint32_t supported_device);
> -
> /* old legacy ATI BIOS routines */
>
> /* COMBIOS table offsets */
> diff --git a/drivers/gpu/drm/radeon/radeon_legacy_encoders.h b/drivers/gpu/drm/radeon/radeon_legacy_encoders.h
> index a80b387559d4d..f4c7432267e67 100644
> --- a/drivers/gpu/drm/radeon/radeon_legacy_encoders.h
> +++ b/drivers/gpu/drm/radeon/radeon_legacy_encoders.h
> @@ -30,5 +30,7 @@
>
> void radeon_legacy_backlight_init(struct radeon_encoder *radeon_encoder,
> struct drm_connector *drm_connector);
> +void radeon_add_legacy_encoder(struct drm_device *dev, uint32_t encoder_enum,
> + uint32_t supported_device);
>
> #endif /* __RADEON_LEGACY_ENCODERS_H__ */
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 27+ messages in thread
* [PATCH 08/43] drm/radeon/radeon_irq_kms: Demote non-conformant kernel-doc fix another
2020-11-16 17:29 [RESEND 00/43] Rid W=1 warnings from GPU Lee Jones
` (6 preceding siblings ...)
2020-11-16 17:29 ` [PATCH 07/43] drm/radeon/radeon_legacy_encoders: Move 'radeon_add_legacy_encoder's prototype to shared location Lee Jones
@ 2020-11-16 17:29 ` Lee Jones
2020-11-16 19:38 ` Alex Deucher
2020-11-16 17:29 ` [PATCH 09/43] drm/radeon/rv770: Move 'rv770_set_clk_bypass_mode' prototype to shared location Lee Jones
` (3 subsequent siblings)
11 siblings, 1 reply; 27+ messages in thread
From: Lee Jones @ 2020-11-16 17:29 UTC (permalink / raw)
To: lee.jones
Cc: linux-kernel, Alex Deucher, Christian König, David Airlie,
Daniel Vetter, amd-gfx, dri-devel
Fixes the following W=1 kernel build warning(s):
drivers/gpu/drm/radeon/radeon_irq_kms.c:56: warning: Function parameter or member 'irq' not described in 'radeon_driver_irq_handler_kms'
drivers/gpu/drm/radeon/radeon_irq_kms.c:56: warning: Function parameter or member 'arg' not described in 'radeon_driver_irq_handler_kms'
drivers/gpu/drm/radeon/radeon_irq_kms.c:571: warning: Function parameter or member 'n' not described in 'radeon_irq_kms_set_irq_n_enabled'
drivers/gpu/drm/radeon/radeon_irq_kms.c:571: warning: Excess function parameter 'num' description in 'radeon_irq_kms_set_irq_n_enabled'
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: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
drivers/gpu/drm/radeon/radeon_irq_kms.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/radeon/radeon_irq_kms.c b/drivers/gpu/drm/radeon/radeon_irq_kms.c
index b86bc88ad4308..a242b6053d47e 100644
--- a/drivers/gpu/drm/radeon/radeon_irq_kms.c
+++ b/drivers/gpu/drm/radeon/radeon_irq_kms.c
@@ -43,11 +43,9 @@
#define RADEON_WAIT_IDLE_TIMEOUT 200
-/**
+/*
* radeon_driver_irq_handler_kms - irq handler for KMS
*
- * @int irq, void *arg: args
- *
* This is the irq handler for the radeon KMS driver (all asics).
* radeon_irq_process is a macro that points to the per-asic
* irq handler callback.
@@ -549,14 +547,14 @@ void radeon_irq_kms_disable_hpd(struct radeon_device *rdev, unsigned hpd_mask)
}
/**
- * radeon_irq_kms_update_int_n - helper for updating interrupt enable registers
+ * radeon_irq_kms_set_irq_n_enabled - helper for updating interrupt enable registers
*
* @rdev: radeon device pointer
* @reg: the register to write to enable/disable interrupts
* @mask: the mask that enables the interrupts
* @enable: whether to enable or disable the interrupt register
* @name: the name of the interrupt register to print to the kernel log
- * @num: the number of the interrupt register to print to the kernel log
+ * @n: the number of the interrupt register to print to the kernel log
*
* Helper for updating the enable state of interrupt registers. Checks whether
* or not the interrupt matches the enable state we want. If it doesn't, then
--
2.25.1
^ permalink raw reply related [flat|nested] 27+ messages in thread
* Re: [PATCH 08/43] drm/radeon/radeon_irq_kms: Demote non-conformant kernel-doc fix another
2020-11-16 17:29 ` [PATCH 08/43] drm/radeon/radeon_irq_kms: Demote non-conformant kernel-doc fix another Lee Jones
@ 2020-11-16 19:38 ` Alex Deucher
0 siblings, 0 replies; 27+ messages in thread
From: Alex Deucher @ 2020-11-16 19:38 UTC (permalink / raw)
To: Lee Jones
Cc: David Airlie, LKML, amd-gfx list, Maling list - DRI developers,
Alex Deucher, Christian König
On Mon, Nov 16, 2020 at 12:30 PM Lee Jones <lee.jones@linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
> drivers/gpu/drm/radeon/radeon_irq_kms.c:56: warning: Function parameter or member 'irq' not described in 'radeon_driver_irq_handler_kms'
> drivers/gpu/drm/radeon/radeon_irq_kms.c:56: warning: Function parameter or member 'arg' not described in 'radeon_driver_irq_handler_kms'
> drivers/gpu/drm/radeon/radeon_irq_kms.c:571: warning: Function parameter or member 'n' not described in 'radeon_irq_kms_set_irq_n_enabled'
> drivers/gpu/drm/radeon/radeon_irq_kms.c:571: warning: Excess function parameter 'num' description in 'radeon_irq_kms_set_irq_n_enabled'
>
> 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: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Applied. Thanks!
Alex
> ---
> drivers/gpu/drm/radeon/radeon_irq_kms.c | 8 +++-----
> 1 file changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_irq_kms.c b/drivers/gpu/drm/radeon/radeon_irq_kms.c
> index b86bc88ad4308..a242b6053d47e 100644
> --- a/drivers/gpu/drm/radeon/radeon_irq_kms.c
> +++ b/drivers/gpu/drm/radeon/radeon_irq_kms.c
> @@ -43,11 +43,9 @@
>
> #define RADEON_WAIT_IDLE_TIMEOUT 200
>
> -/**
> +/*
> * radeon_driver_irq_handler_kms - irq handler for KMS
> *
> - * @int irq, void *arg: args
> - *
> * This is the irq handler for the radeon KMS driver (all asics).
> * radeon_irq_process is a macro that points to the per-asic
> * irq handler callback.
> @@ -549,14 +547,14 @@ void radeon_irq_kms_disable_hpd(struct radeon_device *rdev, unsigned hpd_mask)
> }
>
> /**
> - * radeon_irq_kms_update_int_n - helper for updating interrupt enable registers
> + * radeon_irq_kms_set_irq_n_enabled - helper for updating interrupt enable registers
> *
> * @rdev: radeon device pointer
> * @reg: the register to write to enable/disable interrupts
> * @mask: the mask that enables the interrupts
> * @enable: whether to enable or disable the interrupt register
> * @name: the name of the interrupt register to print to the kernel log
> - * @num: the number of the interrupt register to print to the kernel log
> + * @n: the number of the interrupt register to print to the kernel log
> *
> * Helper for updating the enable state of interrupt registers. Checks whether
> * or not the interrupt matches the enable state we want. If it doesn't, then
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 27+ messages in thread
* [PATCH 09/43] drm/radeon/rv770: Move 'rv770_set_clk_bypass_mode' prototype to shared location
2020-11-16 17:29 [RESEND 00/43] Rid W=1 warnings from GPU Lee Jones
` (7 preceding siblings ...)
2020-11-16 17:29 ` [PATCH 08/43] drm/radeon/radeon_irq_kms: Demote non-conformant kernel-doc fix another Lee Jones
@ 2020-11-16 17:29 ` Lee Jones
2020-11-16 19:42 ` Alex Deucher
2020-11-16 17:29 ` [PATCH 10/43] drm/radeon/radeon_pm: Move 'radeon_pm_acpi_event_handler' prototype into shared header Lee Jones
` (2 subsequent siblings)
11 siblings, 1 reply; 27+ messages in thread
From: Lee Jones @ 2020-11-16 17:29 UTC (permalink / raw)
To: lee.jones
Cc: linux-kernel, Alex Deucher, Christian König, David Airlie,
Daniel Vetter, amd-gfx, dri-devel
Fixes the following W=1 kernel build warning(s):
drivers/gpu/drm/radeon/rv770.c:1138:6: warning: no previous prototype for ‘rv770_set_clk_bypass_mode’ [-Wmissing-prototypes]
1138 | void rv770_set_clk_bypass_mode(struct radeon_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: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
drivers/gpu/drm/radeon/evergreen.c | 2 +-
drivers/gpu/drm/radeon/r600.c | 2 +-
drivers/gpu/drm/radeon/rv770.c | 1 +
drivers/gpu/drm/radeon/rv770.h | 35 ++++++++++++++++++++++++++++++
4 files changed, 38 insertions(+), 2 deletions(-)
create mode 100644 drivers/gpu/drm/radeon/rv770.h
diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c
index 1f2acca437abd..9a1e240b07234 100644
--- a/drivers/gpu/drm/radeon/evergreen.c
+++ b/drivers/gpu/drm/radeon/evergreen.c
@@ -31,6 +31,7 @@
#include "atom.h"
#include "avivod.h"
+#include "rv770.h"
#include "evergreen_blit_shaders.h"
#include "evergreen_reg.h"
#include "evergreend.h"
@@ -223,7 +224,6 @@ extern u32 si_get_csb_size(struct radeon_device *rdev);
extern void si_get_csb_buffer(struct radeon_device *rdev, volatile u32 *buffer);
extern u32 cik_get_csb_size(struct radeon_device *rdev);
extern void cik_get_csb_buffer(struct radeon_device *rdev, volatile u32 *buffer);
-extern void rv770_set_clk_bypass_mode(struct radeon_device *rdev);
static const u32 evergreen_golden_registers[] =
{
diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c
index 12a918335ac7b..f09b6dc5cbeb3 100644
--- a/drivers/gpu/drm/radeon/r600.c
+++ b/drivers/gpu/drm/radeon/r600.c
@@ -40,6 +40,7 @@
#include "atom.h"
#include "avivod.h"
#include "r600d.h"
+#include "rv770.h"
#include "radeon.h"
#include "radeon_asic.h"
#include "radeon_audio.h"
@@ -112,7 +113,6 @@ void r600_fini(struct radeon_device *rdev);
void r600_irq_disable(struct radeon_device *rdev);
static void r600_pcie_gen2_enable(struct radeon_device *rdev);
extern int evergreen_rlc_resume(struct radeon_device *rdev);
-extern void rv770_set_clk_bypass_mode(struct radeon_device *rdev);
/*
* Indirect registers accessor
diff --git a/drivers/gpu/drm/radeon/rv770.c b/drivers/gpu/drm/radeon/rv770.c
index 21f653ae1e1bb..88e29ebaad467 100644
--- a/drivers/gpu/drm/radeon/rv770.c
+++ b/drivers/gpu/drm/radeon/rv770.c
@@ -39,6 +39,7 @@
#include "radeon_asic.h"
#include "radeon_audio.h"
#include "rv770d.h"
+#include "rv770.h"
#define R700_PFP_UCODE_SIZE 848
#define R700_PM4_UCODE_SIZE 1360
diff --git a/drivers/gpu/drm/radeon/rv770.h b/drivers/gpu/drm/radeon/rv770.h
new file mode 100644
index 0000000000000..a3f2bb44979fe
--- /dev/null
+++ b/drivers/gpu/drm/radeon/rv770.h
@@ -0,0 +1,35 @@
+/* radeon_rv770.h -- Private header for radeon driver -*- linux-c -*-
+ *
+ * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 2000 VA Linux Systems, Inc., Fremont, California.
+ * All rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+#ifndef __RADEON_RV770_H__
+#define __RADEON_RV770_H__
+
+struct radeon_device;
+
+void rv770_set_clk_bypass_mode(struct radeon_device *rdev);
+
+#endif /* __RADEON_RV770_H__ */
--
2.25.1
^ permalink raw reply related [flat|nested] 27+ messages in thread
* Re: [PATCH 09/43] drm/radeon/rv770: Move 'rv770_set_clk_bypass_mode' prototype to shared location
2020-11-16 17:29 ` [PATCH 09/43] drm/radeon/rv770: Move 'rv770_set_clk_bypass_mode' prototype to shared location Lee Jones
@ 2020-11-16 19:42 ` Alex Deucher
0 siblings, 0 replies; 27+ messages in thread
From: Alex Deucher @ 2020-11-16 19:42 UTC (permalink / raw)
To: Lee Jones
Cc: David Airlie, LKML, amd-gfx list, Maling list - DRI developers,
Alex Deucher, Christian König
On Mon, Nov 16, 2020 at 12:30 PM Lee Jones <lee.jones@linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
> drivers/gpu/drm/radeon/rv770.c:1138:6: warning: no previous prototype for ‘rv770_set_clk_bypass_mode’ [-Wmissing-prototypes]
> 1138 | void rv770_set_clk_bypass_mode(struct radeon_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: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Applied with minor changes.
Thanks!
Alex
> ---
> drivers/gpu/drm/radeon/evergreen.c | 2 +-
> drivers/gpu/drm/radeon/r600.c | 2 +-
> drivers/gpu/drm/radeon/rv770.c | 1 +
> drivers/gpu/drm/radeon/rv770.h | 35 ++++++++++++++++++++++++++++++
> 4 files changed, 38 insertions(+), 2 deletions(-)
> create mode 100644 drivers/gpu/drm/radeon/rv770.h
>
> diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c
> index 1f2acca437abd..9a1e240b07234 100644
> --- a/drivers/gpu/drm/radeon/evergreen.c
> +++ b/drivers/gpu/drm/radeon/evergreen.c
> @@ -31,6 +31,7 @@
>
> #include "atom.h"
> #include "avivod.h"
> +#include "rv770.h"
> #include "evergreen_blit_shaders.h"
> #include "evergreen_reg.h"
> #include "evergreend.h"
> @@ -223,7 +224,6 @@ extern u32 si_get_csb_size(struct radeon_device *rdev);
> extern void si_get_csb_buffer(struct radeon_device *rdev, volatile u32 *buffer);
> extern u32 cik_get_csb_size(struct radeon_device *rdev);
> extern void cik_get_csb_buffer(struct radeon_device *rdev, volatile u32 *buffer);
> -extern void rv770_set_clk_bypass_mode(struct radeon_device *rdev);
>
> static const u32 evergreen_golden_registers[] =
> {
> diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c
> index 12a918335ac7b..f09b6dc5cbeb3 100644
> --- a/drivers/gpu/drm/radeon/r600.c
> +++ b/drivers/gpu/drm/radeon/r600.c
> @@ -40,6 +40,7 @@
> #include "atom.h"
> #include "avivod.h"
> #include "r600d.h"
> +#include "rv770.h"
> #include "radeon.h"
> #include "radeon_asic.h"
> #include "radeon_audio.h"
> @@ -112,7 +113,6 @@ void r600_fini(struct radeon_device *rdev);
> void r600_irq_disable(struct radeon_device *rdev);
> static void r600_pcie_gen2_enable(struct radeon_device *rdev);
> extern int evergreen_rlc_resume(struct radeon_device *rdev);
> -extern void rv770_set_clk_bypass_mode(struct radeon_device *rdev);
>
> /*
> * Indirect registers accessor
> diff --git a/drivers/gpu/drm/radeon/rv770.c b/drivers/gpu/drm/radeon/rv770.c
> index 21f653ae1e1bb..88e29ebaad467 100644
> --- a/drivers/gpu/drm/radeon/rv770.c
> +++ b/drivers/gpu/drm/radeon/rv770.c
> @@ -39,6 +39,7 @@
> #include "radeon_asic.h"
> #include "radeon_audio.h"
> #include "rv770d.h"
> +#include "rv770.h"
>
> #define R700_PFP_UCODE_SIZE 848
> #define R700_PM4_UCODE_SIZE 1360
> diff --git a/drivers/gpu/drm/radeon/rv770.h b/drivers/gpu/drm/radeon/rv770.h
> new file mode 100644
> index 0000000000000..a3f2bb44979fe
> --- /dev/null
> +++ b/drivers/gpu/drm/radeon/rv770.h
> @@ -0,0 +1,35 @@
> +/* radeon_rv770.h -- Private header for radeon driver -*- linux-c -*-
> + *
> + * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
> + * Copyright 2000 VA Linux Systems, Inc., Fremont, California.
> + * All rights reserved.
> + *
> + * Permission is hereby granted, free of charge, to any person obtaining a
> + * copy of this software and associated documentation files (the "Software"),
> + * to deal in the Software without restriction, including without limitation
> + * the rights to use, copy, modify, merge, publish, distribute, sublicense,
> + * and/or sell copies of the Software, and to permit persons to whom the
> + * Software is furnished to do so, subject to the following conditions:
> + *
> + * The above copyright notice and this permission notice (including the next
> + * paragraph) shall be included in all copies or substantial portions of the
> + * Software.
> + *
> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
> + * PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
> + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
> + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
> + * DEALINGS IN THE SOFTWARE.
> + *
> + */
> +
> +#ifndef __RADEON_RV770_H__
> +#define __RADEON_RV770_H__
> +
> +struct radeon_device;
> +
> +void rv770_set_clk_bypass_mode(struct radeon_device *rdev);
> +
> +#endif /* __RADEON_RV770_H__ */
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 27+ messages in thread
* [PATCH 10/43] drm/radeon/radeon_pm: Move 'radeon_pm_acpi_event_handler' prototype into shared header
2020-11-16 17:29 [RESEND 00/43] Rid W=1 warnings from GPU Lee Jones
` (8 preceding siblings ...)
2020-11-16 17:29 ` [PATCH 09/43] drm/radeon/rv770: Move 'rv770_set_clk_bypass_mode' prototype to shared location Lee Jones
@ 2020-11-16 17:29 ` Lee Jones
2020-11-16 19:44 ` Alex Deucher
2020-11-16 17:29 ` [PATCH 11/43] drm/radeon/radeon_audio: Move 'dce3_2_*' prototypes to shared location Lee Jones
2020-11-16 17:29 ` [PATCH 12/43] drm/radeon/evergreen: Move 'evergreen_*' and 'sumo_*' prototypes out " Lee Jones
11 siblings, 1 reply; 27+ messages in thread
From: Lee Jones @ 2020-11-16 17:29 UTC (permalink / raw)
To: lee.jones
Cc: linux-kernel, Alex Deucher, Christian König, David Airlie,
Daniel Vetter, Sumit Semwal, amd-gfx, dri-devel, linux-media,
linaro-mm-sig
Fixes the following W=1 kernel build warning(s):
drivers/gpu/drm/radeon/radeon_pm.c:74:6: warning: no previous prototype for ‘radeon_pm_acpi_event_handler’ [-Wmissing-prototypes]
74 | void radeon_pm_acpi_event_handler(struct radeon_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: Sumit Semwal <sumit.semwal@linaro.org>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Cc: linux-media@vger.kernel.org
Cc: linaro-mm-sig@lists.linaro.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
drivers/gpu/drm/radeon/radeon_acpi.c | 3 +--
drivers/gpu/drm/radeon/radeon_pm.c | 1 +
drivers/gpu/drm/radeon/radeon_pm.h | 33 ++++++++++++++++++++++++++++
3 files changed, 35 insertions(+), 2 deletions(-)
create mode 100644 drivers/gpu/drm/radeon/radeon_pm.h
diff --git a/drivers/gpu/drm/radeon/radeon_acpi.c b/drivers/gpu/drm/radeon/radeon_acpi.c
index 6cf1645e7a1a8..1baef7b493def 100644
--- a/drivers/gpu/drm/radeon/radeon_acpi.c
+++ b/drivers/gpu/drm/radeon/radeon_acpi.c
@@ -36,6 +36,7 @@
#include "atom.h"
#include "radeon.h"
#include "radeon_acpi.h"
+#include "radeon_pm.h"
#if defined(CONFIG_VGA_SWITCHEROO)
bool radeon_atpx_dgpu_req_power_for_displays(void);
@@ -45,8 +46,6 @@ static inline bool radeon_atpx_dgpu_req_power_for_displays(void) { return false;
#define ACPI_AC_CLASS "ac_adapter"
-extern void radeon_pm_acpi_event_handler(struct radeon_device *rdev);
-
struct atif_verify_interface {
u16 size; /* structure size in bytes (includes size field) */
u16 version; /* version */
diff --git a/drivers/gpu/drm/radeon/radeon_pm.c b/drivers/gpu/drm/radeon/radeon_pm.c
index 65d172b13e065..1995dad59dd09 100644
--- a/drivers/gpu/drm/radeon/radeon_pm.c
+++ b/drivers/gpu/drm/radeon/radeon_pm.c
@@ -33,6 +33,7 @@
#include "avivod.h"
#include "r600_dpm.h"
#include "radeon.h"
+#include "radeon_pm.h"
#define RADEON_IDLE_LOOP_MS 100
#define RADEON_RECLOCK_DELAY_MS 200
diff --git a/drivers/gpu/drm/radeon/radeon_pm.h b/drivers/gpu/drm/radeon/radeon_pm.h
new file mode 100644
index 0000000000000..5ef147785e815
--- /dev/null
+++ b/drivers/gpu/drm/radeon/radeon_pm.h
@@ -0,0 +1,33 @@
+/* radeon_pm.h -- Private header for radeon driver -*- linux-c -*-
+ *
+ * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 2000 VA Linux Systems, Inc., Fremont, California.
+ * All rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+#ifndef __RADEON_PM_H__
+#define __RADEON_PM_H__
+
+void radeon_pm_acpi_event_handler(struct radeon_device *rdev);
+
+#endif /* __RADEON_PM_H__ */
--
2.25.1
^ permalink raw reply related [flat|nested] 27+ messages in thread
* Re: [PATCH 10/43] drm/radeon/radeon_pm: Move 'radeon_pm_acpi_event_handler' prototype into shared header
2020-11-16 17:29 ` [PATCH 10/43] drm/radeon/radeon_pm: Move 'radeon_pm_acpi_event_handler' prototype into shared header Lee Jones
@ 2020-11-16 19:44 ` Alex Deucher
0 siblings, 0 replies; 27+ messages in thread
From: Alex Deucher @ 2020-11-16 19:44 UTC (permalink / raw)
To: Lee Jones
Cc: David Airlie, LKML, amd-gfx list, Christian König,
moderated list:DMA BUFFER SHARING FRAMEWORK,
Maling list - DRI developers, Alex Deucher, linux-media
On Mon, Nov 16, 2020 at 12:30 PM Lee Jones <lee.jones@linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
> drivers/gpu/drm/radeon/radeon_pm.c:74:6: warning: no previous prototype for ‘radeon_pm_acpi_event_handler’ [-Wmissing-prototypes]
> 74 | void radeon_pm_acpi_event_handler(struct radeon_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: Sumit Semwal <sumit.semwal@linaro.org>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Cc: linux-media@vger.kernel.org
> Cc: linaro-mm-sig@lists.linaro.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Applied with minor changes. Thanks!
Alex
> ---
> drivers/gpu/drm/radeon/radeon_acpi.c | 3 +--
> drivers/gpu/drm/radeon/radeon_pm.c | 1 +
> drivers/gpu/drm/radeon/radeon_pm.h | 33 ++++++++++++++++++++++++++++
> 3 files changed, 35 insertions(+), 2 deletions(-)
> create mode 100644 drivers/gpu/drm/radeon/radeon_pm.h
>
> diff --git a/drivers/gpu/drm/radeon/radeon_acpi.c b/drivers/gpu/drm/radeon/radeon_acpi.c
> index 6cf1645e7a1a8..1baef7b493def 100644
> --- a/drivers/gpu/drm/radeon/radeon_acpi.c
> +++ b/drivers/gpu/drm/radeon/radeon_acpi.c
> @@ -36,6 +36,7 @@
> #include "atom.h"
> #include "radeon.h"
> #include "radeon_acpi.h"
> +#include "radeon_pm.h"
>
> #if defined(CONFIG_VGA_SWITCHEROO)
> bool radeon_atpx_dgpu_req_power_for_displays(void);
> @@ -45,8 +46,6 @@ static inline bool radeon_atpx_dgpu_req_power_for_displays(void) { return false;
>
> #define ACPI_AC_CLASS "ac_adapter"
>
> -extern void radeon_pm_acpi_event_handler(struct radeon_device *rdev);
> -
> struct atif_verify_interface {
> u16 size; /* structure size in bytes (includes size field) */
> u16 version; /* version */
> diff --git a/drivers/gpu/drm/radeon/radeon_pm.c b/drivers/gpu/drm/radeon/radeon_pm.c
> index 65d172b13e065..1995dad59dd09 100644
> --- a/drivers/gpu/drm/radeon/radeon_pm.c
> +++ b/drivers/gpu/drm/radeon/radeon_pm.c
> @@ -33,6 +33,7 @@
> #include "avivod.h"
> #include "r600_dpm.h"
> #include "radeon.h"
> +#include "radeon_pm.h"
>
> #define RADEON_IDLE_LOOP_MS 100
> #define RADEON_RECLOCK_DELAY_MS 200
> diff --git a/drivers/gpu/drm/radeon/radeon_pm.h b/drivers/gpu/drm/radeon/radeon_pm.h
> new file mode 100644
> index 0000000000000..5ef147785e815
> --- /dev/null
> +++ b/drivers/gpu/drm/radeon/radeon_pm.h
> @@ -0,0 +1,33 @@
> +/* radeon_pm.h -- Private header for radeon driver -*- linux-c -*-
> + *
> + * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
> + * Copyright 2000 VA Linux Systems, Inc., Fremont, California.
> + * All rights reserved.
> + *
> + * Permission is hereby granted, free of charge, to any person obtaining a
> + * copy of this software and associated documentation files (the "Software"),
> + * to deal in the Software without restriction, including without limitation
> + * the rights to use, copy, modify, merge, publish, distribute, sublicense,
> + * and/or sell copies of the Software, and to permit persons to whom the
> + * Software is furnished to do so, subject to the following conditions:
> + *
> + * The above copyright notice and this permission notice (including the next
> + * paragraph) shall be included in all copies or substantial portions of the
> + * Software.
> + *
> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
> + * PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
> + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
> + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
> + * DEALINGS IN THE SOFTWARE.
> + *
> + */
> +
> +#ifndef __RADEON_PM_H__
> +#define __RADEON_PM_H__
> +
> +void radeon_pm_acpi_event_handler(struct radeon_device *rdev);
> +
> +#endif /* __RADEON_PM_H__ */
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 27+ messages in thread
* [PATCH 11/43] drm/radeon/radeon_audio: Move 'dce3_2_*' prototypes to shared location
2020-11-16 17:29 [RESEND 00/43] Rid W=1 warnings from GPU Lee Jones
` (9 preceding siblings ...)
2020-11-16 17:29 ` [PATCH 10/43] drm/radeon/radeon_pm: Move 'radeon_pm_acpi_event_handler' prototype into shared header Lee Jones
@ 2020-11-16 17:29 ` Lee Jones
2020-11-16 19:45 ` Alex Deucher
2020-11-16 17:29 ` [PATCH 12/43] drm/radeon/evergreen: Move 'evergreen_*' and 'sumo_*' prototypes out " Lee Jones
11 siblings, 1 reply; 27+ messages in thread
From: Lee Jones @ 2020-11-16 17:29 UTC (permalink / raw)
To: lee.jones
Cc: linux-kernel, Alex Deucher, Christian König, David Airlie,
Daniel Vetter, Slava Grigorev, amd-gfx, dri-devel
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>
---
drivers/gpu/drm/radeon/radeon_audio.c | 12 ------------
drivers/gpu/drm/radeon/radeon_audio.h | 12 ++++++++++++
2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/drivers/gpu/drm/radeon/radeon_audio.c b/drivers/gpu/drm/radeon/radeon_audio.c
index 8c63ccb8b6235..f6c783e19c988 100644
--- a/drivers/gpu/drm/radeon/radeon_audio.c
+++ b/drivers/gpu/drm/radeon/radeon_audio.c
@@ -38,16 +38,10 @@ void dce6_audio_enable(struct radeon_device *rdev, struct r600_audio_pin *pin,
u32 dce6_endpoint_rreg(struct radeon_device *rdev, u32 offset, u32 reg);
void dce6_endpoint_wreg(struct radeon_device *rdev,
u32 offset, u32 reg, u32 v);
-void dce3_2_afmt_write_sad_regs(struct drm_encoder *encoder,
- struct cea_sad *sads, int sad_count);
void evergreen_hdmi_write_sad_regs(struct drm_encoder *encoder,
struct cea_sad *sads, int sad_count);
void dce6_afmt_write_sad_regs(struct drm_encoder *encoder,
struct cea_sad *sads, int sad_count);
-void dce3_2_afmt_hdmi_write_speaker_allocation(struct drm_encoder *encoder,
- u8 *sadb, int sad_count);
-void dce3_2_afmt_dp_write_speaker_allocation(struct drm_encoder *encoder,
- u8 *sadb, int sad_count);
void dce4_afmt_hdmi_write_speaker_allocation(struct drm_encoder *encoder,
u8 *sadb, int sad_count);
void dce4_afmt_dp_write_speaker_allocation(struct drm_encoder *encoder,
@@ -65,8 +59,6 @@ struct r600_audio_pin* dce6_audio_get_pin(struct radeon_device *rdev);
void dce6_afmt_select_pin(struct drm_encoder *encoder);
void r600_hdmi_audio_set_dto(struct radeon_device *rdev,
struct radeon_crtc *crtc, unsigned int clock);
-void dce3_2_audio_set_dto(struct radeon_device *rdev,
- struct radeon_crtc *crtc, unsigned int clock);
void dce4_hdmi_audio_set_dto(struct radeon_device *rdev,
struct radeon_crtc *crtc, unsigned int clock);
void dce4_dp_audio_set_dto(struct radeon_device *rdev,
@@ -81,8 +73,6 @@ void evergreen_set_avi_packet(struct radeon_device *rdev, u32 offset,
unsigned char *buffer, size_t size);
void r600_hdmi_update_acr(struct drm_encoder *encoder, long offset,
const struct radeon_hdmi_acr *acr);
-void dce3_2_hdmi_update_acr(struct drm_encoder *encoder, long offset,
- const struct radeon_hdmi_acr *acr);
void evergreen_hdmi_update_acr(struct drm_encoder *encoder, long offset,
const struct radeon_hdmi_acr *acr);
void r600_set_vbi_packet(struct drm_encoder *encoder, u32 offset);
@@ -90,10 +80,8 @@ void dce4_set_vbi_packet(struct drm_encoder *encoder, u32 offset);
void dce4_hdmi_set_color_depth(struct drm_encoder *encoder,
u32 offset, int bpc);
void r600_set_audio_packet(struct drm_encoder *encoder, u32 offset);
-void dce3_2_set_audio_packet(struct drm_encoder *encoder, u32 offset);
void dce4_set_audio_packet(struct drm_encoder *encoder, u32 offset);
void r600_set_mute(struct drm_encoder *encoder, u32 offset, bool mute);
-void dce3_2_set_mute(struct drm_encoder *encoder, u32 offset, bool mute);
void dce4_set_mute(struct drm_encoder *encoder, u32 offset, bool mute);
static void radeon_audio_hdmi_mode_set(struct drm_encoder *encoder,
struct drm_display_mode *mode);
diff --git a/drivers/gpu/drm/radeon/radeon_audio.h b/drivers/gpu/drm/radeon/radeon_audio.h
index 5c70cceaa4a6c..05e67867469b0 100644
--- a/drivers/gpu/drm/radeon/radeon_audio.h
+++ b/drivers/gpu/drm/radeon/radeon_audio.h
@@ -81,4 +81,16 @@ void radeon_audio_mode_set(struct drm_encoder *encoder,
void radeon_audio_dpms(struct drm_encoder *encoder, int mode);
unsigned int radeon_audio_decode_dfs_div(unsigned int div);
+void dce3_2_afmt_write_sad_regs(struct drm_encoder *encoder,
+ struct cea_sad *sads, int sad_count);
+void dce3_2_afmt_hdmi_write_speaker_allocation(struct drm_encoder *encoder,
+ u8 *sadb, int sad_count);
+void dce3_2_afmt_dp_write_speaker_allocation(struct drm_encoder *encoder,
+ u8 *sadb, int sad_count);
+void dce3_2_audio_set_dto(struct radeon_device *rdev,
+ struct radeon_crtc *crtc, unsigned int clock);
+void dce3_2_hdmi_update_acr(struct drm_encoder *encoder, long offset,
+ const struct radeon_hdmi_acr *acr);
+void dce3_2_set_audio_packet(struct drm_encoder *encoder, u32 offset);
+void dce3_2_set_mute(struct drm_encoder *encoder, u32 offset, bool mute);
#endif
--
2.25.1
^ permalink raw reply related [flat|nested] 27+ messages in thread
* Re: [PATCH 11/43] drm/radeon/radeon_audio: Move 'dce3_2_*' prototypes to shared location
2020-11-16 17:29 ` [PATCH 11/43] drm/radeon/radeon_audio: Move 'dce3_2_*' prototypes to shared location Lee Jones
@ 2020-11-16 19:45 ` Alex Deucher
0 siblings, 0 replies; 27+ messages in thread
From: Alex Deucher @ 2020-11-16 19:45 UTC (permalink / raw)
To: Lee Jones
Cc: David Airlie, Slava Grigorev, amd-gfx list, LKML,
Maling list - DRI developers, Alex Deucher, Christian König
On Mon, Nov 16, 2020 at 12:30 PM Lee Jones <lee.jones@linaro.org> wrote:
>
> 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>
Applied. Thanks!
Alex
> ---
> drivers/gpu/drm/radeon/radeon_audio.c | 12 ------------
> drivers/gpu/drm/radeon/radeon_audio.h | 12 ++++++++++++
> 2 files changed, 12 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_audio.c b/drivers/gpu/drm/radeon/radeon_audio.c
> index 8c63ccb8b6235..f6c783e19c988 100644
> --- a/drivers/gpu/drm/radeon/radeon_audio.c
> +++ b/drivers/gpu/drm/radeon/radeon_audio.c
> @@ -38,16 +38,10 @@ void dce6_audio_enable(struct radeon_device *rdev, struct r600_audio_pin *pin,
> u32 dce6_endpoint_rreg(struct radeon_device *rdev, u32 offset, u32 reg);
> void dce6_endpoint_wreg(struct radeon_device *rdev,
> u32 offset, u32 reg, u32 v);
> -void dce3_2_afmt_write_sad_regs(struct drm_encoder *encoder,
> - struct cea_sad *sads, int sad_count);
> void evergreen_hdmi_write_sad_regs(struct drm_encoder *encoder,
> struct cea_sad *sads, int sad_count);
> void dce6_afmt_write_sad_regs(struct drm_encoder *encoder,
> struct cea_sad *sads, int sad_count);
> -void dce3_2_afmt_hdmi_write_speaker_allocation(struct drm_encoder *encoder,
> - u8 *sadb, int sad_count);
> -void dce3_2_afmt_dp_write_speaker_allocation(struct drm_encoder *encoder,
> - u8 *sadb, int sad_count);
> void dce4_afmt_hdmi_write_speaker_allocation(struct drm_encoder *encoder,
> u8 *sadb, int sad_count);
> void dce4_afmt_dp_write_speaker_allocation(struct drm_encoder *encoder,
> @@ -65,8 +59,6 @@ struct r600_audio_pin* dce6_audio_get_pin(struct radeon_device *rdev);
> void dce6_afmt_select_pin(struct drm_encoder *encoder);
> void r600_hdmi_audio_set_dto(struct radeon_device *rdev,
> struct radeon_crtc *crtc, unsigned int clock);
> -void dce3_2_audio_set_dto(struct radeon_device *rdev,
> - struct radeon_crtc *crtc, unsigned int clock);
> void dce4_hdmi_audio_set_dto(struct radeon_device *rdev,
> struct radeon_crtc *crtc, unsigned int clock);
> void dce4_dp_audio_set_dto(struct radeon_device *rdev,
> @@ -81,8 +73,6 @@ void evergreen_set_avi_packet(struct radeon_device *rdev, u32 offset,
> unsigned char *buffer, size_t size);
> void r600_hdmi_update_acr(struct drm_encoder *encoder, long offset,
> const struct radeon_hdmi_acr *acr);
> -void dce3_2_hdmi_update_acr(struct drm_encoder *encoder, long offset,
> - const struct radeon_hdmi_acr *acr);
> void evergreen_hdmi_update_acr(struct drm_encoder *encoder, long offset,
> const struct radeon_hdmi_acr *acr);
> void r600_set_vbi_packet(struct drm_encoder *encoder, u32 offset);
> @@ -90,10 +80,8 @@ void dce4_set_vbi_packet(struct drm_encoder *encoder, u32 offset);
> void dce4_hdmi_set_color_depth(struct drm_encoder *encoder,
> u32 offset, int bpc);
> void r600_set_audio_packet(struct drm_encoder *encoder, u32 offset);
> -void dce3_2_set_audio_packet(struct drm_encoder *encoder, u32 offset);
> void dce4_set_audio_packet(struct drm_encoder *encoder, u32 offset);
> void r600_set_mute(struct drm_encoder *encoder, u32 offset, bool mute);
> -void dce3_2_set_mute(struct drm_encoder *encoder, u32 offset, bool mute);
> void dce4_set_mute(struct drm_encoder *encoder, u32 offset, bool mute);
> static void radeon_audio_hdmi_mode_set(struct drm_encoder *encoder,
> struct drm_display_mode *mode);
> diff --git a/drivers/gpu/drm/radeon/radeon_audio.h b/drivers/gpu/drm/radeon/radeon_audio.h
> index 5c70cceaa4a6c..05e67867469b0 100644
> --- a/drivers/gpu/drm/radeon/radeon_audio.h
> +++ b/drivers/gpu/drm/radeon/radeon_audio.h
> @@ -81,4 +81,16 @@ void radeon_audio_mode_set(struct drm_encoder *encoder,
> void radeon_audio_dpms(struct drm_encoder *encoder, int mode);
> unsigned int radeon_audio_decode_dfs_div(unsigned int div);
>
> +void dce3_2_afmt_write_sad_regs(struct drm_encoder *encoder,
> + struct cea_sad *sads, int sad_count);
> +void dce3_2_afmt_hdmi_write_speaker_allocation(struct drm_encoder *encoder,
> + u8 *sadb, int sad_count);
> +void dce3_2_afmt_dp_write_speaker_allocation(struct drm_encoder *encoder,
> + u8 *sadb, int sad_count);
> +void dce3_2_audio_set_dto(struct radeon_device *rdev,
> + struct radeon_crtc *crtc, unsigned int clock);
> +void dce3_2_hdmi_update_acr(struct drm_encoder *encoder, long offset,
> + const struct radeon_hdmi_acr *acr);
> +void dce3_2_set_audio_packet(struct drm_encoder *encoder, u32 offset);
> +void dce3_2_set_mute(struct drm_encoder *encoder, u32 offset, bool mute);
> #endif
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 27+ messages in thread
* [PATCH 12/43] drm/radeon/evergreen: Move 'evergreen_*' and 'sumo_*' prototypes out to shared location
2020-11-16 17:29 [RESEND 00/43] Rid W=1 warnings from GPU Lee Jones
` (10 preceding siblings ...)
2020-11-16 17:29 ` [PATCH 11/43] drm/radeon/radeon_audio: Move 'dce3_2_*' prototypes to shared location Lee Jones
@ 2020-11-16 17:29 ` Lee Jones
2020-11-16 19:47 ` Alex Deucher
11 siblings, 1 reply; 27+ messages in thread
From: Lee Jones @ 2020-11-16 17:29 UTC (permalink / raw)
To: lee.jones
Cc: linux-kernel, Alex Deucher, Christian König, David Airlie,
Daniel Vetter, amd-gfx, dri-devel
Fixes the following W=1 kernel build warning(s):
drivers/gpu/drm/radeon/evergreen.c:1281:6: warning: no previous prototype for ‘evergreen_fix_pci_max_read_req_size’ [-Wmissing-prototypes]
1281 | void evergreen_fix_pci_max_read_req_size(struct radeon_device *rdev)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/radeon/evergreen.c:2664:6: warning: no previous prototype for ‘evergreen_mc_stop’ [-Wmissing-prototypes]
2664 | void evergreen_mc_stop(struct radeon_device *rdev, struct evergreen_mc_save *save)
| ^~~~~~~~~~~~~~~~~
drivers/gpu/drm/radeon/evergreen.c:2762:6: warning: no previous prototype for ‘evergreen_mc_resume’ [-Wmissing-prototypes]
2762 | void evergreen_mc_resume(struct radeon_device *rdev, struct evergreen_mc_save *save)
| ^~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/radeon/evergreen.c:2850:6: warning: no previous prototype for ‘evergreen_mc_program’ [-Wmissing-prototypes]
2850 | void evergreen_mc_program(struct radeon_device *rdev)
| ^~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/radeon/evergreen.c:3710:5: warning: no previous prototype for ‘evergreen_mc_init’ [-Wmissing-prototypes]
3710 | int evergreen_mc_init(struct radeon_device *rdev)
| ^~~~~~~~~~~~~~~~~
drivers/gpu/drm/radeon/evergreen.c:3769:6: warning: no previous prototype for ‘evergreen_print_gpu_status_regs’ [-Wmissing-prototypes]
3769 | void evergreen_print_gpu_status_regs(struct radeon_device *rdev)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/radeon/evergreen.c:3797:6: warning: no previous prototype for ‘evergreen_is_display_hung’ [-Wmissing-prototypes]
3797 | bool evergreen_is_display_hung(struct radeon_device *rdev)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/radeon/evergreen.c:4009:6: warning: no previous prototype for ‘evergreen_gpu_pci_config_reset’ [-Wmissing-prototypes]
4009 | void evergreen_gpu_pci_config_reset(struct radeon_device *rdev)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/radeon/evergreen.c:4110:6: warning: no previous prototype for ‘sumo_rlc_fini’ [-Wmissing-prototypes]
4110 | void sumo_rlc_fini(struct radeon_device *rdev)
| ^~~~~~~~~~~~~
drivers/gpu/drm/radeon/evergreen.c:4153:5: warning: no previous prototype for ‘sumo_rlc_init’ [-Wmissing-prototypes]
4153 | int sumo_rlc_init(struct radeon_device *rdev)
| ^~~~~~~~~~~~~
drivers/gpu/drm/radeon/evergreen.c:4381:5: warning: no previous prototype for ‘evergreen_rlc_resume’ [-Wmissing-prototypes]
4381 | int evergreen_rlc_resume(struct radeon_device *rdev)
| ^~~~~~~~~~~~~
drivers/gpu/drm/radeon/evergreen.c:4670:6: warning: no previous prototype for ‘evergreen_irq_suspend’ [-Wmissing-prototypes]
4670 | void evergreen_irq_suspend(struct radeon_device *rdev)
| ^~~~~~~~~~~~~~~~~~~~~
NB: Lots more of these - snipped for brevity
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: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
drivers/gpu/drm/radeon/cik.c | 6 +---
drivers/gpu/drm/radeon/evergreen.c | 1 +
drivers/gpu/drm/radeon/evergreen.h | 51 ++++++++++++++++++++++++++++++
drivers/gpu/drm/radeon/ni.c | 16 +---------
drivers/gpu/drm/radeon/si.c | 7 +---
5 files changed, 55 insertions(+), 26 deletions(-)
create mode 100644 drivers/gpu/drm/radeon/evergreen.h
diff --git a/drivers/gpu/drm/radeon/cik.c b/drivers/gpu/drm/radeon/cik.c
index abf370e16bd9f..315c4f3df3656 100644
--- a/drivers/gpu/drm/radeon/cik.c
+++ b/drivers/gpu/drm/radeon/cik.c
@@ -30,6 +30,7 @@
#include <drm/drm_vblank.h>
#include "atom.h"
+#include "evergreen.h"
#include "cik_blit_shaders.h"
#include "cikd.h"
#include "clearstate_ci.h"
@@ -126,11 +127,6 @@ MODULE_FIRMWARE("radeon/mullins_sdma.bin");
extern int r600_ih_ring_alloc(struct radeon_device *rdev);
extern void r600_ih_ring_fini(struct radeon_device *rdev);
-extern void evergreen_mc_stop(struct radeon_device *rdev, struct evergreen_mc_save *save);
-extern void evergreen_mc_resume(struct radeon_device *rdev, struct evergreen_mc_save *save);
-extern bool evergreen_is_display_hung(struct radeon_device *rdev);
-extern void sumo_rlc_fini(struct radeon_device *rdev);
-extern int sumo_rlc_init(struct radeon_device *rdev);
extern void si_vram_gtt_location(struct radeon_device *rdev, struct radeon_mc *mc);
extern void si_rlc_reset(struct radeon_device *rdev);
extern void si_init_uvd_internal_cg(struct radeon_device *rdev);
diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c
index 9a1e240b07234..f860f5ef2df88 100644
--- a/drivers/gpu/drm/radeon/evergreen.c
+++ b/drivers/gpu/drm/radeon/evergreen.c
@@ -32,6 +32,7 @@
#include "atom.h"
#include "avivod.h"
#include "rv770.h"
+#include "evergreen.h"
#include "evergreen_blit_shaders.h"
#include "evergreen_reg.h"
#include "evergreend.h"
diff --git a/drivers/gpu/drm/radeon/evergreen.h b/drivers/gpu/drm/radeon/evergreen.h
new file mode 100644
index 0000000000000..30c9ca99ced90
--- /dev/null
+++ b/drivers/gpu/drm/radeon/evergreen.h
@@ -0,0 +1,51 @@
+/* radeon_evergreen.h -- Private header for radeon driver -*- linux-c -*-
+ *
+ * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 2000 VA Linux Systems, Inc., Fremont, California.
+ * All rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+#ifndef __RADEON_EVERGREEN_H__
+#define __RADEON_EVERGREEN_H__
+
+struct evergreen_mc_save;
+struct radeon_device;
+
+bool evergreen_is_display_hung(struct radeon_device *rdev);
+void evergreen_print_gpu_status_regs(struct radeon_device *rdev);
+void evergreen_mc_stop(struct radeon_device *rdev, struct evergreen_mc_save *save);
+void evergreen_mc_resume(struct radeon_device *rdev, struct evergreen_mc_save *save);
+int evergreen_mc_wait_for_idle(struct radeon_device *rdev);
+void evergreen_mc_program(struct radeon_device *rdev);
+void evergreen_irq_suspend(struct radeon_device *rdev);
+int evergreen_mc_init(struct radeon_device *rdev);
+void evergreen_fix_pci_max_read_req_size(struct radeon_device *rdev);
+void evergreen_pcie_gen2_enable(struct radeon_device *rdev);
+void evergreen_program_aspm(struct radeon_device *rdev);
+void sumo_rlc_fini(struct radeon_device *rdev);
+int sumo_rlc_init(struct radeon_device *rdev);
+void evergreen_gpu_pci_config_reset(struct radeon_device *rdev);
+u32 evergreen_get_number_of_dram_channels(struct radeon_device *rdev);
+void evergreen_print_gpu_status_regs(struct radeon_device *rdev);
+
+#endif /* __RADEON_EVERGREEN_H__ */
diff --git a/drivers/gpu/drm/radeon/ni.c b/drivers/gpu/drm/radeon/ni.c
index 564a775b4b90c..1c9030a4631b8 100644
--- a/drivers/gpu/drm/radeon/ni.c
+++ b/drivers/gpu/drm/radeon/ni.c
@@ -32,6 +32,7 @@
#include "atom.h"
#include "cayman_blit_shaders.h"
#include "clearstate_cayman.h"
+#include "evergreen.h"
#include "ni_reg.h"
#include "nid.h"
#include "radeon.h"
@@ -190,21 +191,6 @@ static const u32 tn_rlc_save_restore_register_list[] =
0x802c,
};
-extern bool evergreen_is_display_hung(struct radeon_device *rdev);
-extern void evergreen_print_gpu_status_regs(struct radeon_device *rdev);
-extern void evergreen_mc_stop(struct radeon_device *rdev, struct evergreen_mc_save *save);
-extern void evergreen_mc_resume(struct radeon_device *rdev, struct evergreen_mc_save *save);
-extern int evergreen_mc_wait_for_idle(struct radeon_device *rdev);
-extern void evergreen_mc_program(struct radeon_device *rdev);
-extern void evergreen_irq_suspend(struct radeon_device *rdev);
-extern int evergreen_mc_init(struct radeon_device *rdev);
-extern void evergreen_fix_pci_max_read_req_size(struct radeon_device *rdev);
-extern void evergreen_pcie_gen2_enable(struct radeon_device *rdev);
-extern void evergreen_program_aspm(struct radeon_device *rdev);
-extern void sumo_rlc_fini(struct radeon_device *rdev);
-extern int sumo_rlc_init(struct radeon_device *rdev);
-extern void evergreen_gpu_pci_config_reset(struct radeon_device *rdev);
-
/* Firmware Names */
MODULE_FIRMWARE("radeon/BARTS_pfp.bin");
MODULE_FIRMWARE("radeon/BARTS_me.bin");
diff --git a/drivers/gpu/drm/radeon/si.c b/drivers/gpu/drm/radeon/si.c
index de0792842af89..45076c27d7ded 100644
--- a/drivers/gpu/drm/radeon/si.c
+++ b/drivers/gpu/drm/radeon/si.c
@@ -32,6 +32,7 @@
#include "atom.h"
#include "clearstate_si.h"
+#include "evergreen.h"
#include "radeon.h"
#include "radeon_asic.h"
#include "radeon_audio.h"
@@ -129,12 +130,6 @@ extern void sumo_rlc_fini(struct radeon_device *rdev);
extern int sumo_rlc_init(struct radeon_device *rdev);
extern int r600_ih_ring_alloc(struct radeon_device *rdev);
extern void r600_ih_ring_fini(struct radeon_device *rdev);
-extern void evergreen_fix_pci_max_read_req_size(struct radeon_device *rdev);
-extern void evergreen_mc_stop(struct radeon_device *rdev, struct evergreen_mc_save *save);
-extern void evergreen_mc_resume(struct radeon_device *rdev, struct evergreen_mc_save *save);
-extern u32 evergreen_get_number_of_dram_channels(struct radeon_device *rdev);
-extern void evergreen_print_gpu_status_regs(struct radeon_device *rdev);
-extern bool evergreen_is_display_hung(struct radeon_device *rdev);
static void si_enable_gui_idle_interrupt(struct radeon_device *rdev,
bool enable);
static void si_init_pg(struct radeon_device *rdev);
--
2.25.1
^ permalink raw reply related [flat|nested] 27+ messages in thread
* Re: [PATCH 12/43] drm/radeon/evergreen: Move 'evergreen_*' and 'sumo_*' prototypes out to shared location
2020-11-16 17:29 ` [PATCH 12/43] drm/radeon/evergreen: Move 'evergreen_*' and 'sumo_*' prototypes out " Lee Jones
@ 2020-11-16 19:47 ` Alex Deucher
0 siblings, 0 replies; 27+ messages in thread
From: Alex Deucher @ 2020-11-16 19:47 UTC (permalink / raw)
To: Lee Jones
Cc: David Airlie, LKML, amd-gfx list, Maling list - DRI developers,
Alex Deucher, Christian König
On Mon, Nov 16, 2020 at 12:30 PM Lee Jones <lee.jones@linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
> drivers/gpu/drm/radeon/evergreen.c:1281:6: warning: no previous prototype for ‘evergreen_fix_pci_max_read_req_size’ [-Wmissing-prototypes]
> 1281 | void evergreen_fix_pci_max_read_req_size(struct radeon_device *rdev)
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/gpu/drm/radeon/evergreen.c:2664:6: warning: no previous prototype for ‘evergreen_mc_stop’ [-Wmissing-prototypes]
> 2664 | void evergreen_mc_stop(struct radeon_device *rdev, struct evergreen_mc_save *save)
> | ^~~~~~~~~~~~~~~~~
> drivers/gpu/drm/radeon/evergreen.c:2762:6: warning: no previous prototype for ‘evergreen_mc_resume’ [-Wmissing-prototypes]
> 2762 | void evergreen_mc_resume(struct radeon_device *rdev, struct evergreen_mc_save *save)
> | ^~~~~~~~~~~~~~~~~~~
> drivers/gpu/drm/radeon/evergreen.c:2850:6: warning: no previous prototype for ‘evergreen_mc_program’ [-Wmissing-prototypes]
> 2850 | void evergreen_mc_program(struct radeon_device *rdev)
> | ^~~~~~~~~~~~~~~~~~~~
> drivers/gpu/drm/radeon/evergreen.c:3710:5: warning: no previous prototype for ‘evergreen_mc_init’ [-Wmissing-prototypes]
> 3710 | int evergreen_mc_init(struct radeon_device *rdev)
> | ^~~~~~~~~~~~~~~~~
> drivers/gpu/drm/radeon/evergreen.c:3769:6: warning: no previous prototype for ‘evergreen_print_gpu_status_regs’ [-Wmissing-prototypes]
> 3769 | void evergreen_print_gpu_status_regs(struct radeon_device *rdev)
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/gpu/drm/radeon/evergreen.c:3797:6: warning: no previous prototype for ‘evergreen_is_display_hung’ [-Wmissing-prototypes]
> 3797 | bool evergreen_is_display_hung(struct radeon_device *rdev)
> | ^~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/gpu/drm/radeon/evergreen.c:4009:6: warning: no previous prototype for ‘evergreen_gpu_pci_config_reset’ [-Wmissing-prototypes]
> 4009 | void evergreen_gpu_pci_config_reset(struct radeon_device *rdev)
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/gpu/drm/radeon/evergreen.c:4110:6: warning: no previous prototype for ‘sumo_rlc_fini’ [-Wmissing-prototypes]
> 4110 | void sumo_rlc_fini(struct radeon_device *rdev)
> | ^~~~~~~~~~~~~
> drivers/gpu/drm/radeon/evergreen.c:4153:5: warning: no previous prototype for ‘sumo_rlc_init’ [-Wmissing-prototypes]
> 4153 | int sumo_rlc_init(struct radeon_device *rdev)
> | ^~~~~~~~~~~~~
> drivers/gpu/drm/radeon/evergreen.c:4381:5: warning: no previous prototype for ‘evergreen_rlc_resume’ [-Wmissing-prototypes]
> 4381 | int evergreen_rlc_resume(struct radeon_device *rdev)
> | ^~~~~~~~~~~~~
> drivers/gpu/drm/radeon/evergreen.c:4670:6: warning: no previous prototype for ‘evergreen_irq_suspend’ [-Wmissing-prototypes]
> 4670 | void evergreen_irq_suspend(struct radeon_device *rdev)
> | ^~~~~~~~~~~~~~~~~~~~~
>
> NB: Lots more of these - snipped for brevity
>
> 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: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Applied with minor changes. Thanks!
Alex
> ---
> drivers/gpu/drm/radeon/cik.c | 6 +---
> drivers/gpu/drm/radeon/evergreen.c | 1 +
> drivers/gpu/drm/radeon/evergreen.h | 51 ++++++++++++++++++++++++++++++
> drivers/gpu/drm/radeon/ni.c | 16 +---------
> drivers/gpu/drm/radeon/si.c | 7 +---
> 5 files changed, 55 insertions(+), 26 deletions(-)
> create mode 100644 drivers/gpu/drm/radeon/evergreen.h
>
> diff --git a/drivers/gpu/drm/radeon/cik.c b/drivers/gpu/drm/radeon/cik.c
> index abf370e16bd9f..315c4f3df3656 100644
> --- a/drivers/gpu/drm/radeon/cik.c
> +++ b/drivers/gpu/drm/radeon/cik.c
> @@ -30,6 +30,7 @@
> #include <drm/drm_vblank.h>
>
> #include "atom.h"
> +#include "evergreen.h"
> #include "cik_blit_shaders.h"
> #include "cikd.h"
> #include "clearstate_ci.h"
> @@ -126,11 +127,6 @@ MODULE_FIRMWARE("radeon/mullins_sdma.bin");
>
> extern int r600_ih_ring_alloc(struct radeon_device *rdev);
> extern void r600_ih_ring_fini(struct radeon_device *rdev);
> -extern void evergreen_mc_stop(struct radeon_device *rdev, struct evergreen_mc_save *save);
> -extern void evergreen_mc_resume(struct radeon_device *rdev, struct evergreen_mc_save *save);
> -extern bool evergreen_is_display_hung(struct radeon_device *rdev);
> -extern void sumo_rlc_fini(struct radeon_device *rdev);
> -extern int sumo_rlc_init(struct radeon_device *rdev);
> extern void si_vram_gtt_location(struct radeon_device *rdev, struct radeon_mc *mc);
> extern void si_rlc_reset(struct radeon_device *rdev);
> extern void si_init_uvd_internal_cg(struct radeon_device *rdev);
> diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c
> index 9a1e240b07234..f860f5ef2df88 100644
> --- a/drivers/gpu/drm/radeon/evergreen.c
> +++ b/drivers/gpu/drm/radeon/evergreen.c
> @@ -32,6 +32,7 @@
> #include "atom.h"
> #include "avivod.h"
> #include "rv770.h"
> +#include "evergreen.h"
> #include "evergreen_blit_shaders.h"
> #include "evergreen_reg.h"
> #include "evergreend.h"
> diff --git a/drivers/gpu/drm/radeon/evergreen.h b/drivers/gpu/drm/radeon/evergreen.h
> new file mode 100644
> index 0000000000000..30c9ca99ced90
> --- /dev/null
> +++ b/drivers/gpu/drm/radeon/evergreen.h
> @@ -0,0 +1,51 @@
> +/* radeon_evergreen.h -- Private header for radeon driver -*- linux-c -*-
> + *
> + * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
> + * Copyright 2000 VA Linux Systems, Inc., Fremont, California.
> + * All rights reserved.
> + *
> + * Permission is hereby granted, free of charge, to any person obtaining a
> + * copy of this software and associated documentation files (the "Software"),
> + * to deal in the Software without restriction, including without limitation
> + * the rights to use, copy, modify, merge, publish, distribute, sublicense,
> + * and/or sell copies of the Software, and to permit persons to whom the
> + * Software is furnished to do so, subject to the following conditions:
> + *
> + * The above copyright notice and this permission notice (including the next
> + * paragraph) shall be included in all copies or substantial portions of the
> + * Software.
> + *
> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
> + * PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
> + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
> + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
> + * DEALINGS IN THE SOFTWARE.
> + *
> + */
> +
> +#ifndef __RADEON_EVERGREEN_H__
> +#define __RADEON_EVERGREEN_H__
> +
> +struct evergreen_mc_save;
> +struct radeon_device;
> +
> +bool evergreen_is_display_hung(struct radeon_device *rdev);
> +void evergreen_print_gpu_status_regs(struct radeon_device *rdev);
> +void evergreen_mc_stop(struct radeon_device *rdev, struct evergreen_mc_save *save);
> +void evergreen_mc_resume(struct radeon_device *rdev, struct evergreen_mc_save *save);
> +int evergreen_mc_wait_for_idle(struct radeon_device *rdev);
> +void evergreen_mc_program(struct radeon_device *rdev);
> +void evergreen_irq_suspend(struct radeon_device *rdev);
> +int evergreen_mc_init(struct radeon_device *rdev);
> +void evergreen_fix_pci_max_read_req_size(struct radeon_device *rdev);
> +void evergreen_pcie_gen2_enable(struct radeon_device *rdev);
> +void evergreen_program_aspm(struct radeon_device *rdev);
> +void sumo_rlc_fini(struct radeon_device *rdev);
> +int sumo_rlc_init(struct radeon_device *rdev);
> +void evergreen_gpu_pci_config_reset(struct radeon_device *rdev);
> +u32 evergreen_get_number_of_dram_channels(struct radeon_device *rdev);
> +void evergreen_print_gpu_status_regs(struct radeon_device *rdev);
> +
> +#endif /* __RADEON_EVERGREEN_H__ */
> diff --git a/drivers/gpu/drm/radeon/ni.c b/drivers/gpu/drm/radeon/ni.c
> index 564a775b4b90c..1c9030a4631b8 100644
> --- a/drivers/gpu/drm/radeon/ni.c
> +++ b/drivers/gpu/drm/radeon/ni.c
> @@ -32,6 +32,7 @@
> #include "atom.h"
> #include "cayman_blit_shaders.h"
> #include "clearstate_cayman.h"
> +#include "evergreen.h"
> #include "ni_reg.h"
> #include "nid.h"
> #include "radeon.h"
> @@ -190,21 +191,6 @@ static const u32 tn_rlc_save_restore_register_list[] =
> 0x802c,
> };
>
> -extern bool evergreen_is_display_hung(struct radeon_device *rdev);
> -extern void evergreen_print_gpu_status_regs(struct radeon_device *rdev);
> -extern void evergreen_mc_stop(struct radeon_device *rdev, struct evergreen_mc_save *save);
> -extern void evergreen_mc_resume(struct radeon_device *rdev, struct evergreen_mc_save *save);
> -extern int evergreen_mc_wait_for_idle(struct radeon_device *rdev);
> -extern void evergreen_mc_program(struct radeon_device *rdev);
> -extern void evergreen_irq_suspend(struct radeon_device *rdev);
> -extern int evergreen_mc_init(struct radeon_device *rdev);
> -extern void evergreen_fix_pci_max_read_req_size(struct radeon_device *rdev);
> -extern void evergreen_pcie_gen2_enable(struct radeon_device *rdev);
> -extern void evergreen_program_aspm(struct radeon_device *rdev);
> -extern void sumo_rlc_fini(struct radeon_device *rdev);
> -extern int sumo_rlc_init(struct radeon_device *rdev);
> -extern void evergreen_gpu_pci_config_reset(struct radeon_device *rdev);
> -
> /* Firmware Names */
> MODULE_FIRMWARE("radeon/BARTS_pfp.bin");
> MODULE_FIRMWARE("radeon/BARTS_me.bin");
> diff --git a/drivers/gpu/drm/radeon/si.c b/drivers/gpu/drm/radeon/si.c
> index de0792842af89..45076c27d7ded 100644
> --- a/drivers/gpu/drm/radeon/si.c
> +++ b/drivers/gpu/drm/radeon/si.c
> @@ -32,6 +32,7 @@
>
> #include "atom.h"
> #include "clearstate_si.h"
> +#include "evergreen.h"
> #include "radeon.h"
> #include "radeon_asic.h"
> #include "radeon_audio.h"
> @@ -129,12 +130,6 @@ extern void sumo_rlc_fini(struct radeon_device *rdev);
> extern int sumo_rlc_init(struct radeon_device *rdev);
> extern int r600_ih_ring_alloc(struct radeon_device *rdev);
> extern void r600_ih_ring_fini(struct radeon_device *rdev);
> -extern void evergreen_fix_pci_max_read_req_size(struct radeon_device *rdev);
> -extern void evergreen_mc_stop(struct radeon_device *rdev, struct evergreen_mc_save *save);
> -extern void evergreen_mc_resume(struct radeon_device *rdev, struct evergreen_mc_save *save);
> -extern u32 evergreen_get_number_of_dram_channels(struct radeon_device *rdev);
> -extern void evergreen_print_gpu_status_regs(struct radeon_device *rdev);
> -extern bool evergreen_is_display_hung(struct radeon_device *rdev);
> static void si_enable_gui_idle_interrupt(struct radeon_device *rdev,
> bool enable);
> static void si_init_pg(struct radeon_device *rdev);
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 27+ messages in thread