Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp1735525ybg; Sat, 19 Oct 2019 01:22:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqwVf9P2Pc+WbtYmQYbtU2gPtHHJS6iQpu9a31wMbMgvlCbJrrfxATyWpsl9j/Hj5lxgjnLE X-Received: by 2002:a50:f384:: with SMTP id g4mr13791463edm.282.1571473333521; Sat, 19 Oct 2019 01:22:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571473333; cv=none; d=google.com; s=arc-20160816; b=hAB7vIk4IcmHmLcDZrlykQNxYt5tdUQoV6ezbiX9YNdPEKSzZPtwM0eSn4FK47qNKk DWHsECrL3kOj31PUiqFJwuc5S3JbuiGYxCVU5ZPesOn8x0JChkFD020cpT7EhUq6LUd5 gQ8ENL3XvU8rhYJSotTjCYHIzhHG3RgVSHYjLj4X4+8ixvBS9UzdYPw3ALEFNu/pM/fR lMGs23nNyeNUaefujjFu0IoA4f0Z5XPMWCBSZlRk/AH07jAsh+mAOAiAJBJKTO9fhg/T 53zS5J5eQkv8PErP1Qw9+ngDrRznkq2+HIPiORJL/7ohrVSHGGLBouNqIACiYznzZbBq sFsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=gMFAdz6mM86XMqij/Zhg8c8xikiZ29js1Vb81Oub0W8=; b=cjNK/10aX/hGJV6+Eb+oQ1FjZ2qK0XRUAyRL6eSgIfN7yBXy+T3Q9XQIhceQ8nK+UB 1o0G6AYiAglYewRvc79IKaOJUMykG5ogsAzVmpTjRnvUITug1fEneIPd7uE0NFrS6g2/ LEgOPCb9Q13sHpOb7JtcPyVPBDVun6XtvB1KXkoSU4KBadI3YYGj26YxHyk/25MZwCWj ZBPTV3BPR1r3gU5bnNbsmCxsPYBStRIL6dB+M+MzyzIsPnlS148NOzLM65iAUTA7uhiA 9JSFdak34H0tyobLLJsBsChmbpzNRoGqK5qG+M46yTdRqAYtedeZj+XrNRsGLaC+FCph 2z7A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id oq24si4893091ejb.202.2019.10.19.01.21.50; Sat, 19 Oct 2019 01:22:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2442769AbfJRMX5 (ORCPT + 99 others); Fri, 18 Oct 2019 08:23:57 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40208 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2408123AbfJRMX4 (ORCPT ); Fri, 18 Oct 2019 08:23:56 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 47EAA307C656; Fri, 18 Oct 2019 12:23:56 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-43.ams2.redhat.com [10.36.116.43]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6200060BF1; Fri, 18 Oct 2019 12:23:53 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 5739616E08; Fri, 18 Oct 2019 14:23:52 +0200 (CEST) From: Gerd Hoffmann To: dri-devel@lists.freedesktop.org Cc: Gerd Hoffmann , David Airlie , Daniel Vetter , virtualization@lists.linux-foundation.org (open list:VIRTIO GPU DRIVER), linux-kernel@vger.kernel.org (open list) Subject: [PATCH] drm/virtio: move byteorder handling into virtio_gpu_cmd_transfer_to_host_2d function Date: Fri, 18 Oct 2019 14:23:52 +0200 Message-Id: <20191018122352.17019-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Fri, 18 Oct 2019 12:23:56 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Be consistent with the rest of the code base. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/virtio/virtgpu_drv.h | 4 ++-- drivers/gpu/drm/virtio/virtgpu_plane.c | 12 ++++++------ drivers/gpu/drm/virtio/virtgpu_vq.c | 12 ++++++------ 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.h b/drivers/gpu/drm/virtio/virtgpu_drv.h index 314e02f94d9c..0b56ba005e25 100644 --- a/drivers/gpu/drm/virtio/virtgpu_drv.h +++ b/drivers/gpu/drm/virtio/virtgpu_drv.h @@ -267,8 +267,8 @@ void virtio_gpu_cmd_unref_resource(struct virtio_gpu_device *vgdev, uint32_t resource_id); void virtio_gpu_cmd_transfer_to_host_2d(struct virtio_gpu_device *vgdev, uint64_t offset, - __le32 width, __le32 height, - __le32 x, __le32 y, + uint32_t width, uint32_t height, + uint32_t x, uint32_t y, struct virtio_gpu_object_array *objs, struct virtio_gpu_fence *fence); void virtio_gpu_cmd_resource_flush(struct virtio_gpu_device *vgdev, diff --git a/drivers/gpu/drm/virtio/virtgpu_plane.c b/drivers/gpu/drm/virtio/virtgpu_plane.c index f4b7360282ce..390524143139 100644 --- a/drivers/gpu/drm/virtio/virtgpu_plane.c +++ b/drivers/gpu/drm/virtio/virtgpu_plane.c @@ -132,10 +132,10 @@ static void virtio_gpu_primary_plane_update(struct drm_plane *plane, virtio_gpu_array_add_obj(objs, vgfb->base.obj[0]); virtio_gpu_cmd_transfer_to_host_2d (vgdev, 0, - cpu_to_le32(plane->state->src_w >> 16), - cpu_to_le32(plane->state->src_h >> 16), - cpu_to_le32(plane->state->src_x >> 16), - cpu_to_le32(plane->state->src_y >> 16), + plane->state->src_w >> 16, + plane->state->src_h >> 16, + plane->state->src_x >> 16, + plane->state->src_y >> 16, objs, NULL); } } else { @@ -234,8 +234,8 @@ static void virtio_gpu_cursor_plane_update(struct drm_plane *plane, virtio_gpu_array_add_obj(objs, vgfb->base.obj[0]); virtio_gpu_cmd_transfer_to_host_2d (vgdev, 0, - cpu_to_le32(plane->state->crtc_w), - cpu_to_le32(plane->state->crtc_h), + plane->state->crtc_w, + plane->state->crtc_h, 0, 0, objs, vgfb->fence); dma_fence_wait(&vgfb->fence->f, true); dma_fence_put(&vgfb->fence->f); diff --git a/drivers/gpu/drm/virtio/virtgpu_vq.c b/drivers/gpu/drm/virtio/virtgpu_vq.c index 80176f379ad5..74ad3bc3ebe8 100644 --- a/drivers/gpu/drm/virtio/virtgpu_vq.c +++ b/drivers/gpu/drm/virtio/virtgpu_vq.c @@ -549,8 +549,8 @@ void virtio_gpu_cmd_resource_flush(struct virtio_gpu_device *vgdev, void virtio_gpu_cmd_transfer_to_host_2d(struct virtio_gpu_device *vgdev, uint64_t offset, - __le32 width, __le32 height, - __le32 x, __le32 y, + uint32_t width, uint32_t height, + uint32_t x, uint32_t y, struct virtio_gpu_object_array *objs, struct virtio_gpu_fence *fence) { @@ -571,10 +571,10 @@ void virtio_gpu_cmd_transfer_to_host_2d(struct virtio_gpu_device *vgdev, cmd_p->hdr.type = cpu_to_le32(VIRTIO_GPU_CMD_TRANSFER_TO_HOST_2D); cmd_p->resource_id = cpu_to_le32(bo->hw_res_handle); cmd_p->offset = cpu_to_le64(offset); - cmd_p->r.width = width; - cmd_p->r.height = height; - cmd_p->r.x = x; - cmd_p->r.y = y; + cmd_p->r.width = cpu_to_le32(width); + cmd_p->r.height = cpu_to_le32(height); + cmd_p->r.x = cpu_to_le32(x); + cmd_p->r.y = cpu_to_le32(y); virtio_gpu_queue_fenced_ctrl_buffer(vgdev, vbuf, &cmd_p->hdr, fence); } -- 2.18.1