[PATCH v2 16/37] drm/nouveau/nvif: remove nvxx_object()

Danilo Krummrich dakr at redhat.com
Tue Jul 9 16:14:44 UTC 2024


On Fri, Jul 05, 2024 at 04:37:00AM +1000, Ben Skeggs wrote:
> This hasn't been used in a while.
> 
> Moves some io accessors to another include at the same time to

Please don't just say something was moves somewhere, say where it was moved to.

> fix a compile issue that resulted from <nvkm/core/object.h> no
> longer being included.

Saying "resulted" instead of "results" here sounds a bit like a previous commit
introduced the issue, but it's actually this one. Please use present tense.

> 
> Signed-off-by: Ben Skeggs <bskeggs at nvidia.com>
> ---
>  drivers/gpu/drm/nouveau/include/nvif/object.h |  7 -------
>  drivers/gpu/drm/nouveau/include/nvif/os.h     | 19 +++++++++++++++++++
>  .../gpu/drm/nouveau/include/nvkm/core/os.h    | 19 -------------------
>  3 files changed, 19 insertions(+), 26 deletions(-)
> 
> diff --git a/drivers/gpu/drm/nouveau/include/nvif/object.h b/drivers/gpu/drm/nouveau/include/nvif/object.h
> index f52399caee82..478cbb8f2dfe 100644
> --- a/drivers/gpu/drm/nouveau/include/nvif/object.h
> +++ b/drivers/gpu/drm/nouveau/include/nvif/object.h
> @@ -134,11 +134,4 @@ struct nvif_mclass {
>  #define NVIF_MR32(p,A...) DRF_MR(NVIF_RD32_, NVIF_WR32_, u32, (p), 0, ##A)
>  #define NVIF_MV32(p,A...) DRF_MV(NVIF_RD32_, NVIF_WR32_, u32, (p), 0, ##A)
>  #define NVIF_MD32(p,A...) DRF_MD(NVIF_RD32_, NVIF_WR32_, u32, (p), 0, ##A)
> -
> -/*XXX*/
> -#include <core/object.h>
> -#define nvxx_object(a) ({                                                      \
> -	struct nvif_object *_object = (a);                                     \
> -	(struct nvkm_object *)_object->priv;                                   \
> -})
>  #endif
> diff --git a/drivers/gpu/drm/nouveau/include/nvif/os.h b/drivers/gpu/drm/nouveau/include/nvif/os.h
> index 429d0106c123..a2eaf3929ac3 100644
> --- a/drivers/gpu/drm/nouveau/include/nvif/os.h
> +++ b/drivers/gpu/drm/nouveau/include/nvif/os.h
> @@ -34,4 +34,23 @@
>  
>  #include <soc/tegra/fuse.h>
>  #include <soc/tegra/pmc.h>
> +
> +#ifdef __BIG_ENDIAN
> +#define ioread16_native ioread16be
> +#define iowrite16_native iowrite16be
> +#define ioread32_native  ioread32be
> +#define iowrite32_native iowrite32be
> +#else
> +#define ioread16_native ioread16
> +#define iowrite16_native iowrite16
> +#define ioread32_native  ioread32
> +#define iowrite32_native iowrite32
> +#endif
> +
> +#define iowrite64_native(v,p) do {                                             \
> +	u32 __iomem *_p = (u32 __iomem *)(p);                                  \
> +	u64 _v = (v);                                                          \
> +	iowrite32_native(lower_32_bits(_v), &_p[0]);                           \
> +	iowrite32_native(upper_32_bits(_v), &_p[1]);                           \
> +} while(0)
>  #endif
> diff --git a/drivers/gpu/drm/nouveau/include/nvkm/core/os.h b/drivers/gpu/drm/nouveau/include/nvkm/core/os.h
> index 3fd5c007a663..9b05612e6490 100644
> --- a/drivers/gpu/drm/nouveau/include/nvkm/core/os.h
> +++ b/drivers/gpu/drm/nouveau/include/nvkm/core/os.h
> @@ -3,25 +3,6 @@
>  #define __NVKM_OS_H__
>  #include <nvif/os.h>
>  
> -#ifdef __BIG_ENDIAN
> -#define ioread16_native ioread16be
> -#define iowrite16_native iowrite16be
> -#define ioread32_native  ioread32be
> -#define iowrite32_native iowrite32be
> -#else
> -#define ioread16_native ioread16
> -#define iowrite16_native iowrite16
> -#define ioread32_native  ioread32
> -#define iowrite32_native iowrite32
> -#endif
> -
> -#define iowrite64_native(v,p) do {                                             \
> -	u32 __iomem *_p = (u32 __iomem *)(p);				       \
> -	u64 _v = (v);							       \
> -	iowrite32_native(lower_32_bits(_v), &_p[0]);			       \
> -	iowrite32_native(upper_32_bits(_v), &_p[1]);			       \
> -} while(0)
> -
>  struct nvkm_blob {
>  	void *data;
>  	u32 size;
> -- 
> 2.45.1
> 



More information about the Nouveau mailing list