tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 483fed3b5dc8ce3644c83d24240cf5756fb0993e commit: a11092cd032615f72470cd2ec1a4542e0ed72b14 [6516/8813] gpu: host1x: Select context device based on attached IOMMU config: arm-randconfig-r011-20220922 (https://download.01.org/0day-ci/archive/20220923/202209230512.dSBGYXPr-lkp@xxxxxxxxx/config) compiler: arm-linux-gnueabi-gcc (GCC) 12.1.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=a11092cd032615f72470cd2ec1a4542e0ed72b14 git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git git fetch --no-tags linux-next master git checkout a11092cd032615f72470cd2ec1a4542e0ed72b14 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash drivers/gpu/drm/tegra/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot <lkp@xxxxxxxxx> All errors (new ones prefixed by >>): drivers/gpu/drm/tegra/uapi.c: In function 'tegra_drm_ioctl_channel_open': >> drivers/gpu/drm/tegra/uapi.c:119:51: error: passing argument 2 of 'host1x_memory_context_alloc' from incompatible pointer type [-Werror=incompatible-pointer-types] 119 | host, client->base.dev, get_task_pid(current, PIDTYPE_TGID)); | ~~~~~~~~~~~~^~~~ | | | struct device * In file included from drivers/gpu/drm/tegra/uapi.c:4: include/linux/host1x.h:478:85: note: expected 'struct pid *' but argument is of type 'struct device *' 478 | struct pid *pid) | ~~~~~~~~~~~~^~~ >> drivers/gpu/drm/tegra/uapi.c:118:51: error: too many arguments to function 'host1x_memory_context_alloc' 118 | context->memory_context = host1x_memory_context_alloc( | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/host1x.h:477:45: note: declared here 477 | static inline struct host1x_memory_context *host1x_memory_context_alloc(struct host1x *host1x, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: some warnings being treated as errors vim +/host1x_memory_context_alloc +119 drivers/gpu/drm/tegra/uapi.c 75 76 int tegra_drm_ioctl_channel_open(struct drm_device *drm, void *data, struct drm_file *file) 77 { 78 struct host1x *host = tegra_drm_to_host1x(drm->dev_private); 79 struct tegra_drm_file *fpriv = file->driver_priv; 80 struct tegra_drm *tegra = drm->dev_private; 81 struct drm_tegra_channel_open *args = data; 82 struct tegra_drm_client *client = NULL; 83 struct tegra_drm_context *context; 84 int err; 85 86 if (args->flags) 87 return -EINVAL; 88 89 context = kzalloc(sizeof(*context), GFP_KERNEL); 90 if (!context) 91 return -ENOMEM; 92 93 client = tegra_drm_find_client(tegra, args->host1x_class); 94 if (!client) { 95 err = -ENODEV; 96 goto free; 97 } 98 99 if (client->shared_channel) { 100 context->channel = host1x_channel_get(client->shared_channel); 101 } else { 102 context->channel = host1x_channel_request(&client->base); 103 if (!context->channel) { 104 err = -EBUSY; 105 goto free; 106 } 107 } 108 109 /* Only allocate context if the engine supports context isolation. */ 110 if (device_iommu_mapped(client->base.dev) && client->ops->can_use_memory_ctx) { 111 bool supported; 112 113 err = client->ops->can_use_memory_ctx(client, &supported); 114 if (err) 115 goto put_channel; 116 117 if (supported) > 118 context->memory_context = host1x_memory_context_alloc( > 119 host, client->base.dev, get_task_pid(current, PIDTYPE_TGID)); 120 121 if (IS_ERR(context->memory_context)) { 122 if (PTR_ERR(context->memory_context) != -EOPNOTSUPP) { 123 err = PTR_ERR(context->memory_context); 124 goto put_channel; 125 } else { 126 /* 127 * OK, HW does not support contexts or contexts 128 * are disabled. 129 */ 130 context->memory_context = NULL; 131 } 132 } 133 } 134 135 err = xa_alloc(&fpriv->contexts, &args->context, context, XA_LIMIT(1, U32_MAX), 136 GFP_KERNEL); 137 if (err < 0) 138 goto put_memctx; 139 140 context->client = client; 141 xa_init_flags(&context->mappings, XA_FLAGS_ALLOC1); 142 143 args->version = client->version; 144 args->capabilities = 0; 145 146 if (device_get_dma_attr(client->base.dev) == DEV_DMA_COHERENT) 147 args->capabilities |= DRM_TEGRA_CHANNEL_CAP_CACHE_COHERENT; 148 149 return 0; 150 151 put_memctx: 152 if (context->memory_context) 153 host1x_memory_context_put(context->memory_context); 154 put_channel: 155 host1x_channel_put(context->channel); 156 free: 157 kfree(context); 158 159 return err; 160 } 161 -- 0-DAY CI Kernel Test Service https://01.org/lkp