[PATCH v1 1/2] drm/virtio: Attach and set suggested_x/y properties for the connector

Gerd Hoffmann kraxel at redhat.com
Tue Jan 10 09:33:14 UTC 2023


  Hi,

> +static void virtio_gpu_update_output_position(struct virtio_gpu_output *output)
> +{
> +	struct drm_connector *connector = &output->conn;
> +	struct drm_device *dev = connector->dev;
> +
> +	drm_object_property_set_value(&connector->base,
> +		dev->mode_config.suggested_x_property, output->info.r.x);
> +	drm_object_property_set_value(&connector->base,
> +		dev->mode_config.suggested_y_property, output->info.r.y);
> +}

This fails sparse checking

sparse warnings: (new ones prefixed by >>)
>> drivers/gpu/drm/virtio/virtgpu_vq.c:654:70: sparse: sparse: incorrect type in argument 3 (different base types) @@     expected unsigned long long [usertype] val @@     got restricted __le32 [usertype] x @@
   drivers/gpu/drm/virtio/virtgpu_vq.c:654:70: sparse:     expected unsigned long long [usertype] val
   drivers/gpu/drm/virtio/virtgpu_vq.c:654:70: sparse:     got restricted __le32 [usertype] x
>> drivers/gpu/drm/virtio/virtgpu_vq.c:656:70: sparse: sparse: incorrect type in argument 3 (different base types) @@     expected unsigned long long [usertype] val @@     got restricted __le32 [usertype] y @@
   drivers/gpu/drm/virtio/virtgpu_vq.c:656:70: sparse:     expected unsigned long long [usertype] val
   drivers/gpu/drm/virtio/virtgpu_vq.c:656:70: sparse:     got restricted __le32 [usertype] y

take care,
  Gerd



More information about the dri-devel mailing list