[PATCH 3/3] drm/virtio: use the fence for every plane update
kernel test robot
lkp at intel.com
Wed May 11 07:10:46 UTC 2022
Hi Dongwon,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on drm/drm-next]
[also build test WARNING on drm-exynos/exynos-drm-next drm-intel/for-linux-next drm-tip/drm-tip tegra-drm/drm/tegra/for-next v5.18-rc6 next-20220510]
[cannot apply to airlied/drm-next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/intel-lab-lkp/linux/commits/Dongwon-Kim/drm-virtio-release-ops-for-virtgpu-fence-release/20220511-081226
base: git://anongit.freedesktop.org/drm/drm drm-next
config: arm-randconfig-r015-20220509 (https://download.01.org/0day-ci/archive/20220511/202205111533.LaZm5cYP-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 18dd123c56754edf62c7042dcf23185c3727610f)
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
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# https://github.com/intel-lab-lkp/linux/commit/5c7787de5069b504754aea17bf8137faae26fe66
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Dongwon-Kim/drm-virtio-release-ops-for-virtgpu-fence-release/20220511-081226
git checkout 5c7787de5069b504754aea17bf8137faae26fe66
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash drivers/gpu/drm/virtio/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp at intel.com>
All warnings (new ones prefixed by >>):
>> drivers/gpu/drm/virtio/virtgpu_plane.c:147:6: warning: variable 'objs' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
if (fence) {
^~~~~
drivers/gpu/drm/virtio/virtgpu_plane.c:158:26: note: uninitialized use occurs here
width, height, objs, fence);
^~~~
drivers/gpu/drm/virtio/virtgpu_plane.c:147:2: note: remove the 'if' if its condition is always true
if (fence) {
^~~~~~~~~~~
drivers/gpu/drm/virtio/virtgpu_plane.c:140:38: note: initialize the variable 'objs' to silence this warning
struct virtio_gpu_object_array *objs;
^
= NULL
1 warning generated.
vim +147 drivers/gpu/drm/virtio/virtgpu_plane.c
544c521d4ab8f2a Gerd Hoffmann 2019-10-23 131
5c68ab9276aae47 Vivek Kasireddy 2021-06-10 132 static void virtio_gpu_resource_flush(struct drm_plane *plane,
5c68ab9276aae47 Vivek Kasireddy 2021-06-10 133 uint32_t x, uint32_t y,
5c68ab9276aae47 Vivek Kasireddy 2021-06-10 134 uint32_t width, uint32_t height)
5c68ab9276aae47 Vivek Kasireddy 2021-06-10 135 {
5c68ab9276aae47 Vivek Kasireddy 2021-06-10 136 struct drm_device *dev = plane->dev;
5c68ab9276aae47 Vivek Kasireddy 2021-06-10 137 struct virtio_gpu_device *vgdev = dev->dev_private;
5c68ab9276aae47 Vivek Kasireddy 2021-06-10 138 struct virtio_gpu_framebuffer *vgfb;
5c68ab9276aae47 Vivek Kasireddy 2021-06-10 139 struct virtio_gpu_object *bo;
47558b189c1d340 Dongwon Kim 2022-05-10 140 struct virtio_gpu_object_array *objs;
47558b189c1d340 Dongwon Kim 2022-05-10 141 struct virtio_gpu_fence *fence;
5c68ab9276aae47 Vivek Kasireddy 2021-06-10 142
5c68ab9276aae47 Vivek Kasireddy 2021-06-10 143 vgfb = to_virtio_gpu_framebuffer(plane->state->fb);
5c68ab9276aae47 Vivek Kasireddy 2021-06-10 144 bo = gem_to_virtio_gpu_obj(vgfb->base.obj[0]);
5c7787de5069b50 Dongwon Kim 2022-05-10 145 fence = virtio_gpu_fence_alloc(vgdev, vgdev->fence_drv.context, 0);
47558b189c1d340 Dongwon Kim 2022-05-10 146
47558b189c1d340 Dongwon Kim 2022-05-10 @147 if (fence) {
5c68ab9276aae47 Vivek Kasireddy 2021-06-10 148 objs = virtio_gpu_array_alloc(1);
47558b189c1d340 Dongwon Kim 2022-05-10 149 if (!objs) {
47558b189c1d340 Dongwon Kim 2022-05-10 150 kfree(fence);
5c68ab9276aae47 Vivek Kasireddy 2021-06-10 151 return;
47558b189c1d340 Dongwon Kim 2022-05-10 152 }
5c68ab9276aae47 Vivek Kasireddy 2021-06-10 153 virtio_gpu_array_add_obj(objs, vgfb->base.obj[0]);
5c68ab9276aae47 Vivek Kasireddy 2021-06-10 154 virtio_gpu_array_lock_resv(objs);
47558b189c1d340 Dongwon Kim 2022-05-10 155 }
47558b189c1d340 Dongwon Kim 2022-05-10 156
5c68ab9276aae47 Vivek Kasireddy 2021-06-10 157 virtio_gpu_cmd_resource_flush(vgdev, bo->hw_res_handle, x, y,
47558b189c1d340 Dongwon Kim 2022-05-10 158 width, height, objs, fence);
5c68ab9276aae47 Vivek Kasireddy 2021-06-10 159 virtio_gpu_notify(vgdev);
5c68ab9276aae47 Vivek Kasireddy 2021-06-10 160
47558b189c1d340 Dongwon Kim 2022-05-10 161 if (fence) {
47558b189c1d340 Dongwon Kim 2022-05-10 162 dma_fence_wait_timeout(&fence->f, true,
5c68ab9276aae47 Vivek Kasireddy 2021-06-10 163 msecs_to_jiffies(50));
47558b189c1d340 Dongwon Kim 2022-05-10 164 dma_fence_put(&fence->f);
5c68ab9276aae47 Vivek Kasireddy 2021-06-10 165 }
5c68ab9276aae47 Vivek Kasireddy 2021-06-10 166 }
5c68ab9276aae47 Vivek Kasireddy 2021-06-10 167
--
0-DAY CI Kernel Test Service
https://01.org/lkp
More information about the dri-devel
mailing list