Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1614946

Re: [PATCH 2/2] drm: virtio: fix virtio_gpu_mode_dumb_create

From Dave Airlie <airlied@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH 2/2] drm: virtio: fix virtio_gpu_mode_dumb_create
Date 2017-04-03 09:50 +0200
Message-ID <ts4Up-3Uo-15@gated-at.bofh.it> (permalink)
References <ts4hH-3FM-5@gated-at.bofh.it> <ts4hH-3FM-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 3 April 2017 at 17:08, Gerd Hoffmann <kraxel@redhat.com> wrote:
> Lookup format using virtio_gpu_translate_format()
> instead of hardcoding it.  Fixes xorg display on
> bigendian guests (i.e. ppc64).
>
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>

For the series,

Reviewed-by: Dave Airlie <airlied@redhat.com>

> ---
>  drivers/gpu/drm/virtio/virtgpu_gem.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/virtio/virtgpu_gem.c b/drivers/gpu/drm/virtio/virtgpu_gem.c
> index 336a57f..cc025d8 100644
> --- a/drivers/gpu/drm/virtio/virtgpu_gem.c
> +++ b/drivers/gpu/drm/virtio/virtgpu_gem.c
> @@ -88,6 +88,7 @@ int virtio_gpu_mode_dumb_create(struct drm_file *file_priv,
>         int ret;
>         uint32_t pitch;
>         uint32_t resid;
> +       uint32_t format;
>
>         pitch = args->width * ((args->bpp + 1) / 8);
>         args->size = pitch * args->height;
> @@ -98,9 +99,10 @@ int virtio_gpu_mode_dumb_create(struct drm_file *file_priv,
>         if (ret)
>                 goto fail;
>
> +       format = virtio_gpu_translate_format(DRM_FORMAT_XRGB8888);
>         virtio_gpu_resource_id_get(vgdev, &resid);
> -       virtio_gpu_cmd_create_resource(vgdev, resid,
> -                                      2, args->width, args->height);
> +       virtio_gpu_cmd_create_resource(vgdev, resid, format,
> +                                      args->width, args->height);
>
>         /* attach the object to the resource */
>         obj = gem_to_virtio_gpu_obj(gobj);
> --
> 2.9.3
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 2/2] drm: virtio: fix virtio_gpu_mode_dumb_create Gerd Hoffmann <kraxel@redhat.com> - 2017-04-03 09:10 +0200
  Re: [PATCH 2/2] drm: virtio: fix virtio_gpu_mode_dumb_create Dave Airlie <airlied@gmail.com> - 2017-04-03 09:50 +0200
  Re: [PATCH 2/2] drm: virtio: fix virtio_gpu_mode_dumb_create Daniel Vetter <daniel@ffwll.ch> - 2017-04-03 10:00 +0200
    Re: [PATCH 2/2] drm: virtio: fix virtio_gpu_mode_dumb_create Gerd Hoffmann <kraxel@redhat.com> - 2017-04-03 11:10 +0200

csiph-web