[PATCH 1/2] drm/virtgpu: plumb fix for virtgpu_drm.h / virtio_gpu.h discrepancy

Gerd Hoffmann kraxel at redhat.com
Wed Oct 2 08:37:13 UTC 2019


On Tue, Oct 01, 2019 at 06:49:34PM -0700, Gurchetan Singh wrote:
> virglrenderer has logic to validate both stride and layer_stride,
> but both are always zero. The fallback for that case is:
> 
> stride = width * bytes_per_pixel
> layer_stride = stride * num_layers
> 
> However, this assumption causes trouble in the following cases:
> 
> 1) When allocating host-compatible buffers for the planned wayland integration.

--verbose please.

I know wayland rounds up to a multiple of 64.  But that isn't a problem
today.  You can have virtio-gpu objects with width = 832 and define a
drm_framebuffer using that with width=800 and stride set accordingly.

cheers,
  Gerd



More information about the dri-devel mailing list