From patchwork Thu Dec 19 00:57:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gurchetan Singh X-Patchwork-Id: 11302521 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CF6C614F6 for ; Thu, 19 Dec 2019 00:57:47 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id ADA1C222C2 for ; Thu, 19 Dec 2019 00:57:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="GrmauL5T" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org ADA1C222C2 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C15EF6EAAC; Thu, 19 Dec 2019 00:57:43 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pf1-x429.google.com (mail-pf1-x429.google.com [IPv6:2607:f8b0:4864:20::429]) by gabe.freedesktop.org (Postfix) with ESMTPS id DD9036EAAC for ; Thu, 19 Dec 2019 00:57:41 +0000 (UTC) Received: by mail-pf1-x429.google.com with SMTP id p14so2183754pfn.4 for ; Wed, 18 Dec 2019 16:57:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=d/0Dzr7PF0Px4YDySXnEaL6pzzJBHGGWbHw/Hy/gm5g=; b=GrmauL5TW0SHH02xERA94xKLmxVOKSMPCkdS3p2vjwbbHxKumGjANYT0xdpBy5WKNS 9S40lWuNKhDtUqBMgAzhHXMWH+0/vbLD9FmRMpVsCLVMINI3u4kd+RIvf7vED/nQJNzt D10HW1OJ0gPltwJ0VXjC48f7iW2zuzprer4hM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=d/0Dzr7PF0Px4YDySXnEaL6pzzJBHGGWbHw/Hy/gm5g=; b=BbTC3bqrjxPdWax2uOjKqS4FbqDHIkUBLttpH8GYYAWEjK6z8di8WAerBf+SOLxqFz aUNXXM+SYRJ0REk3HsFWJNOf+oZca7BiV9cUxXM/uhpENcgS50ji9FF9exvhFFIEBO3s xN7jK02MxMZ/EAGurFEy/GHSRABPCEaivD7xe5JsI/uM2YgvH/lulqeA4NvlzpxGVksD xY/9jB8NRwjIRN496J0KSlHs6ttgI4YMl++bcvnnnzPMMjVWKN74XVebt8BznYsJs8MG Sk5qOlsT2K3fVeU3fjxYMYGtQf094J2EKpZeJYnda4MOMRiGefX9tViYrDXtBIkYKPxb fIRQ== X-Gm-Message-State: APjAAAVQQ9+6NL9MSwajtq9aCWdq6e4WRdNckPWRGx/BGQrdJhTREEHc 9XXVQVQEfhRMBnXdguA+AMalKYlaPys= X-Google-Smtp-Source: APXvYqxJO0zmUFI5UcCcQ4ZnhxPv7WFmQkLqu5lNBrNT5cYAFgDk78I0fKxRED1UeXtlfTfoKZNqVg== X-Received: by 2002:a63:950c:: with SMTP id p12mr6233792pgd.85.1576717061084; Wed, 18 Dec 2019 16:57:41 -0800 (PST) Received: from gurchetansingh0.mtv.corp.google.com ([2620:15c:202:201:bc97:5740:52a7:6875]) by smtp.gmail.com with ESMTPSA id f23sm4651553pgj.76.2019.12.18.16.57.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 18 Dec 2019 16:57:40 -0800 (PST) From: Gurchetan Singh To: dri-devel@lists.freedesktop.org Subject: [PATCH 1/6] drm/virtio: static-ify virtio_fence_signaled Date: Wed, 18 Dec 2019 16:57:28 -0800 Message-Id: <20191219005733.18960-1-gurchetansingh@chromium.org> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kraxel@redhat.com, Gurchetan Singh Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Not used anywhere else. Signed-off-by: Gurchetan Singh --- drivers/gpu/drm/virtio/virtgpu_drv.h | 1 - drivers/gpu/drm/virtio/virtgpu_fence.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.h b/drivers/gpu/drm/virtio/virtgpu_drv.h index 29cf005ed6b9..349c1dea61c7 100644 --- a/drivers/gpu/drm/virtio/virtgpu_drv.h +++ b/drivers/gpu/drm/virtio/virtgpu_drv.h @@ -356,7 +356,6 @@ struct drm_plane *virtio_gpu_plane_init(struct virtio_gpu_device *vgdev, int index); /* virtio_gpu_fence.c */ -bool virtio_fence_signaled(struct dma_fence *f); struct virtio_gpu_fence *virtio_gpu_fence_alloc( struct virtio_gpu_device *vgdev); void virtio_gpu_fence_emit(struct virtio_gpu_device *vgdev, diff --git a/drivers/gpu/drm/virtio/virtgpu_fence.c b/drivers/gpu/drm/virtio/virtgpu_fence.c index a4b9881ca1d3..5466aab7d39a 100644 --- a/drivers/gpu/drm/virtio/virtgpu_fence.c +++ b/drivers/gpu/drm/virtio/virtgpu_fence.c @@ -37,7 +37,7 @@ static const char *virtio_get_timeline_name(struct dma_fence *f) return "controlq"; } -bool virtio_fence_signaled(struct dma_fence *f) +static bool virtio_fence_signaled(struct dma_fence *f) { struct virtio_gpu_fence *fence = to_virtio_fence(f); From patchwork Thu Dec 19 00:57:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gurchetan Singh X-Patchwork-Id: 11302523 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3D4581921 for ; Thu, 19 Dec 2019 00:57:51 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1B2FC218AC for ; Thu, 19 Dec 2019 00:57:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="EBehqQL+" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1B2FC218AC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EFDA86EAAE; Thu, 19 Dec 2019 00:57:45 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pg1-x542.google.com (mail-pg1-x542.google.com [IPv6:2607:f8b0:4864:20::542]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0AAB06EAAE for ; Thu, 19 Dec 2019 00:57:44 +0000 (UTC) Received: by mail-pg1-x542.google.com with SMTP id a33so2190776pgm.5 for ; Wed, 18 Dec 2019 16:57:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ei8xOVvBixG0rPjLYnrpJihmHBppCFxJAv0s6xjhaRg=; b=EBehqQL+rLLkKNPYqnqyrY4qenst51roeMN2RTR5+PlrAYknlZ6nAZk1yvScbuH/lO xNuiA2qrKWDGPOGCDTWKmw/4CWpLuLKdL2BHP535SuI/lSSF8O7lZNrIkvKFx+b3VQMA GY6mm6BujXR+UoT0hwmJ+ehTTRmXvlKbQ10mE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ei8xOVvBixG0rPjLYnrpJihmHBppCFxJAv0s6xjhaRg=; b=oWKVvLj6DDvSQl4wf3sHRgEVdtu2r2Ixf9Dg3gvt1lkURVjtVhGUxVfFVD8MafOHQT IZ+MoYwkfx1wOUDYW1/6AilDeI6VODCOcvJYr6E+9XZpGJvDA/ngkHRu+cvFphZo+31i DIqUuaKjSc923Pb5o7uX/M6OyLv+8MuSSeSc3FJodxbaAZMEzxgrOd74mE7+3xF8xDAv qqZdD5lnm/8ErU4Eqv2ChWd38BdatE+LxPflofPWBttd+sUQzM6YmW6PRne3v8QIzFFa O7bTqBe5l0eG8iDJ3Z/m3lAYHoKTEF7uiSekSgQ6ty0Prutn2kBJ2/tzagkBBmG6pMS3 S43g== X-Gm-Message-State: APjAAAV9YJFj6XjNiR+0izKXc9IYwt0/m+KmMcjEyEBLgf7V5yCtWftV 52wOGD18eecWSVwWZwCiX+envWHZgxc= X-Google-Smtp-Source: APXvYqwJyDaSZfKe8efKEcJFgv5a2S+wds06O1Cl5IOu2sPUJCiPnwO8zvX+wVGTy8iavKJaAzrPkw== X-Received: by 2002:aa7:90c4:: with SMTP id k4mr6472491pfk.216.1576717064422; Wed, 18 Dec 2019 16:57:44 -0800 (PST) Received: from gurchetansingh0.mtv.corp.google.com ([2620:15c:202:201:bc97:5740:52a7:6875]) by smtp.gmail.com with ESMTPSA id f23sm4651553pgj.76.2019.12.18.16.57.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 18 Dec 2019 16:57:43 -0800 (PST) From: Gurchetan Singh To: dri-devel@lists.freedesktop.org Subject: [PATCH 2/6] drm/virtio: static-ify virtio_gpu_framebuffer_init Date: Wed, 18 Dec 2019 16:57:29 -0800 Message-Id: <20191219005733.18960-2-gurchetansingh@chromium.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191219005733.18960-1-gurchetansingh@chromium.org> References: <20191219005733.18960-1-gurchetansingh@chromium.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kraxel@redhat.com, Gurchetan Singh Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Not used anywhere else. Signed-off-by: Gurchetan Singh --- drivers/gpu/drm/virtio/virtgpu_display.c | 2 +- drivers/gpu/drm/virtio/virtgpu_drv.h | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_display.c b/drivers/gpu/drm/virtio/virtgpu_display.c index e622485ae826..c76d69fecfeb 100644 --- a/drivers/gpu/drm/virtio/virtgpu_display.c +++ b/drivers/gpu/drm/virtio/virtgpu_display.c @@ -59,7 +59,7 @@ static const struct drm_framebuffer_funcs virtio_gpu_fb_funcs = { .dirty = drm_atomic_helper_dirtyfb, }; -int +static int virtio_gpu_framebuffer_init(struct drm_device *dev, struct virtio_gpu_framebuffer *vgfb, const struct drm_mode_fb_cmd2 *mode_cmd, diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.h b/drivers/gpu/drm/virtio/virtgpu_drv.h index 349c1dea61c7..cf09e4af2fc5 100644 --- a/drivers/gpu/drm/virtio/virtgpu_drv.h +++ b/drivers/gpu/drm/virtio/virtgpu_drv.h @@ -342,10 +342,6 @@ void virtio_gpu_disable_notify(struct virtio_gpu_device *vgdev); void virtio_gpu_enable_notify(struct virtio_gpu_device *vgdev); /* virtio_gpu_display.c */ -int virtio_gpu_framebuffer_init(struct drm_device *dev, - struct virtio_gpu_framebuffer *vgfb, - const struct drm_mode_fb_cmd2 *mode_cmd, - struct drm_gem_object *obj); void virtio_gpu_modeset_init(struct virtio_gpu_device *vgdev); void virtio_gpu_modeset_fini(struct virtio_gpu_device *vgdev); From patchwork Thu Dec 19 00:57:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gurchetan Singh X-Patchwork-Id: 11302525 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9EB5214E3 for ; Thu, 19 Dec 2019 00:57:53 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7D0DC218AC for ; Thu, 19 Dec 2019 00:57:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="NbekFNd6" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7D0DC218AC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 302566EAAF; Thu, 19 Dec 2019 00:57:50 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pj1-x1032.google.com (mail-pj1-x1032.google.com [IPv6:2607:f8b0:4864:20::1032]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5713B6EAAF for ; Thu, 19 Dec 2019 00:57:47 +0000 (UTC) Received: by mail-pj1-x1032.google.com with SMTP id d5so1669176pjz.5 for ; Wed, 18 Dec 2019 16:57:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=TUO/gJqCQHDyHEB6RMGjWAS1WsBR8FjyTpPhLy3SnwY=; b=NbekFNd6poLw8cYghDsHiEm+yGyi2V1hanTFOFGg8rbtnMeUBI4u/B1yfGttMrAJOR cSrFpkmJ6iTtm2cCwHwCGmfnOJuHoQo6n7sYqyD48z17/nKXsNsFUnZoesJ1XaBDObTr W6j2ZFv4hR4UZjKcwo0Ughds0sM5OaJFLyhcE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=TUO/gJqCQHDyHEB6RMGjWAS1WsBR8FjyTpPhLy3SnwY=; b=RXp2pwfQix80TZ35ta5IuhTx0KK/gI7TRNcXGX6hi/l5INTjqAmvby0jBmJ9ejPEXx HV7HC0M1hrALrHblUKBBGq3Xm3JKZhsuz0d1IMMOEzwfyRV3iWX/bVBWYt3nL4miHmcX w2Si7kXEIbijo90Uzw1ih1RCEylzB+zmzT0N94nmy3fGywohKoxKCRx23idJ+2Yr9Dlv 4uVIjhbhqqTaN9ANcCokQ1WO9DBs2l1WUnMbWBGwVzXpK/VyKddZ8lIbGz2Ql2dTPVIP ASqw8fRlX92Pb7CH8yzT/7UnvAMOkG3VJ8aM+vF187Ntk1X+OxKGyzyQlRmuR/e5kYWh ywEw== X-Gm-Message-State: APjAAAU6XwdCiLgbPYUOFhE8NwKiotTB/lLaZ64Hk8KY4+5eIfmPknIH JM+hJWhZdku1/moBkzfpFAJL2/CF2ok= X-Google-Smtp-Source: APXvYqwG91xGRjRLuXVutndLLOD2krWxzoaJJ/3f2wLDUZR1m/GWyONI1fmYRrTxTZ+iE+Re7wt4zw== X-Received: by 2002:a17:902:8d95:: with SMTP id v21mr6075378plo.61.1576717066522; Wed, 18 Dec 2019 16:57:46 -0800 (PST) Received: from gurchetansingh0.mtv.corp.google.com ([2620:15c:202:201:bc97:5740:52a7:6875]) by smtp.gmail.com with ESMTPSA id f23sm4651553pgj.76.2019.12.18.16.57.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 18 Dec 2019 16:57:46 -0800 (PST) From: Gurchetan Singh To: dri-devel@lists.freedesktop.org Subject: [PATCH 3/6] drm/virtio: get rid of drm_encoder_to_virtio_gpu_output Date: Wed, 18 Dec 2019 16:57:30 -0800 Message-Id: <20191219005733.18960-3-gurchetansingh@chromium.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191219005733.18960-1-gurchetansingh@chromium.org> References: <20191219005733.18960-1-gurchetansingh@chromium.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kraxel@redhat.com, Gurchetan Singh Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Not used anywhere. Signed-off-by: Gurchetan Singh --- drivers/gpu/drm/virtio/virtgpu_drv.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.h b/drivers/gpu/drm/virtio/virtgpu_drv.h index cf09e4af2fc5..3e0580a8d818 100644 --- a/drivers/gpu/drm/virtio/virtgpu_drv.h +++ b/drivers/gpu/drm/virtio/virtgpu_drv.h @@ -137,8 +137,6 @@ struct virtio_gpu_output { container_of(x, struct virtio_gpu_output, crtc) #define drm_connector_to_virtio_gpu_output(x) \ container_of(x, struct virtio_gpu_output, conn) -#define drm_encoder_to_virtio_gpu_output(x) \ - container_of(x, struct virtio_gpu_output, enc) struct virtio_gpu_framebuffer { struct drm_framebuffer base; From patchwork Thu Dec 19 00:57:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gurchetan Singh X-Patchwork-Id: 11302531 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7A66A14F6 for ; Thu, 19 Dec 2019 00:57:59 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 58E09227BF for ; Thu, 19 Dec 2019 00:57:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="F9cxqFtX" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 58E09227BF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6EEB46EAB3; Thu, 19 Dec 2019 00:57:54 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pg1-x541.google.com (mail-pg1-x541.google.com [IPv6:2607:f8b0:4864:20::541]) by gabe.freedesktop.org (Postfix) with ESMTPS id 277CF6EAAF for ; Thu, 19 Dec 2019 00:57:49 +0000 (UTC) Received: by mail-pg1-x541.google.com with SMTP id b9so2165298pgk.12 for ; Wed, 18 Dec 2019 16:57:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=B9jgYLaqrCq+kBnNkr8oYzBokJCX5jApnrzqCh4GHEs=; b=F9cxqFtXMZqMz4KGVPA0tJCTR/S83mp375m5hAlP1VxuWZyQUS8DtDwA4voEAsgTid KR7Qk8Rax3NuBIosIwnT9caXCtzggSIvufk9Fc5yDkJeAAxx1Dt8DOBV7vuUOE7nzTub a64TkSRhbeGV9MEni1I40YOkkNwDyI7ch8brk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=B9jgYLaqrCq+kBnNkr8oYzBokJCX5jApnrzqCh4GHEs=; b=Cfl03HnGXzo7IJxEyDmB5Kh5jgWHl3Ayd1uCgCbIJ8e5x8VJe7p2ZlczVOvW8WAMwd CguaJR1fx6vS6z6DqxNojrNMr5M2WswcZ7mJzp4R+vAd/zVKQtvXgVher1pF2HMDbipM giQQppZe/U2iykRAZmaMwdu9er4a0sa6G3L5ts+ao3eynNEH5/+uWpbJHyXQuvjZxxGt /h1qGMNXoHcSIZafAVplfb8BAUb24E3VDqC9nC3ufkuaZlDu/qQPFL2ghHbFtAs9WJpt rJKlDMr1Ht9FszzVozt7g+uX5PoDyzT5E6p3aJI2xjKA6t9qWDd1Gm1rPcvwkdQqLmn2 2dBg== X-Gm-Message-State: APjAAAWAqpEzlgQPVqSSS191/OTYNNAmhIqAklCRRpl8aOo62NaJhYUH Vfu2p6KWBH9wsAlA8zRjgK45wBUc2fM= X-Google-Smtp-Source: APXvYqwTdhicDu4Y0S4ejVbnHr5uuDh/QOX9tqTOs2s+XlKoetSJMNHYOzdFp/95DmacRZEvCBmv2Q== X-Received: by 2002:a63:cf41:: with SMTP id b1mr6104020pgj.53.1576717068503; Wed, 18 Dec 2019 16:57:48 -0800 (PST) Received: from gurchetansingh0.mtv.corp.google.com ([2620:15c:202:201:bc97:5740:52a7:6875]) by smtp.gmail.com with ESMTPSA id f23sm4651553pgj.76.2019.12.18.16.57.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 18 Dec 2019 16:57:47 -0800 (PST) From: Gurchetan Singh To: dri-devel@lists.freedesktop.org Subject: [PATCH 4/6] drm/virtio: simplify getting fake offset Date: Wed, 18 Dec 2019 16:57:31 -0800 Message-Id: <20191219005733.18960-4-gurchetansingh@chromium.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191219005733.18960-1-gurchetansingh@chromium.org> References: <20191219005733.18960-1-gurchetansingh@chromium.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kraxel@redhat.com, Gurchetan Singh Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" This is a little simpler. Signed-off-by: Gurchetan Singh --- drivers/gpu/drm/virtio/virtgpu_drv.h | 8 +------- drivers/gpu/drm/virtio/virtgpu_gem.c | 4 +--- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.h b/drivers/gpu/drm/virtio/virtgpu_drv.h index 3e0580a8d818..578d5e42946e 100644 --- a/drivers/gpu/drm/virtio/virtgpu_drv.h +++ b/drivers/gpu/drm/virtio/virtgpu_drv.h @@ -365,18 +365,12 @@ int virtio_gpu_object_create(struct virtio_gpu_device *vgdev, struct virtio_gpu_object_params *params, struct virtio_gpu_object **bo_ptr, struct virtio_gpu_fence *fence); - /* virtgpu_prime.c */ struct drm_gem_object *virtgpu_gem_prime_import_sg_table( struct drm_device *dev, struct dma_buf_attachment *attach, struct sg_table *sgt); -static inline u64 virtio_gpu_object_mmap_offset(struct virtio_gpu_object *bo) -{ - return drm_vma_node_offset_addr(&bo->base.base.vma_node); -} - -/* virgl debufs */ +/* virgl debugfs */ int virtio_gpu_debugfs_init(struct drm_minor *minor); #endif diff --git a/drivers/gpu/drm/virtio/virtgpu_gem.c b/drivers/gpu/drm/virtio/virtgpu_gem.c index 4c1f579edfb3..0a2b62279647 100644 --- a/drivers/gpu/drm/virtio/virtgpu_gem.c +++ b/drivers/gpu/drm/virtio/virtgpu_gem.c @@ -96,14 +96,12 @@ int virtio_gpu_mode_dumb_mmap(struct drm_file *file_priv, uint32_t handle, uint64_t *offset_p) { struct drm_gem_object *gobj; - struct virtio_gpu_object *obj; BUG_ON(!offset_p); gobj = drm_gem_object_lookup(file_priv, handle); if (gobj == NULL) return -ENOENT; - obj = gem_to_virtio_gpu_obj(gobj); - *offset_p = virtio_gpu_object_mmap_offset(obj); + *offset_p = drm_vma_node_offset_addr(&gobj->vma_node); drm_gem_object_put_unlocked(gobj); return 0; } From patchwork Thu Dec 19 00:57:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gurchetan Singh X-Patchwork-Id: 11302527 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DCF4D14E3 for ; Thu, 19 Dec 2019 00:57:55 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BB47A218AC for ; Thu, 19 Dec 2019 00:57:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="AT5qvl3C" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BB47A218AC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C84A36EAB2; Thu, 19 Dec 2019 00:57:53 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pg1-x544.google.com (mail-pg1-x544.google.com [IPv6:2607:f8b0:4864:20::544]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0D28B6EAAF for ; Thu, 19 Dec 2019 00:57:50 +0000 (UTC) Received: by mail-pg1-x544.google.com with SMTP id 6so2201823pgk.0 for ; Wed, 18 Dec 2019 16:57:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=GDWXZ2NbKqOL7mI4fNKRdpKEi06uiRE7+rS6LYZI8DA=; b=AT5qvl3Cd+V7CBFhw4dKcYkMp7u1uE3xy2cS57BoeBZz2+CiC/9VyxCH6U2rT7rSHR 9+4Lq8KpZtqr+739WXBhJCKaVBj1Ze9p53qEYU7+xos8nGdSAMQBFzW8jKEZdjnyo8H+ E6RbE9xeLI3u1La8A3muTqHO+lCxZ0b4SPzNE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=GDWXZ2NbKqOL7mI4fNKRdpKEi06uiRE7+rS6LYZI8DA=; b=E6JTmlCQVSm6XqQxv2iunOGHaHoT3I5XXh7QytNGdA+49D558XZibJb2kVxriNMjYT zbF48Ey5oO4eUTx3qxSdKzAfa50txYnLTCqdUBtTbC6rg1Vrd7AtyZHRJFEaebUPcuXl JTKfiOqKRxegia3chi5C7W8Sc1gXGLA2l3V44/s39W9JjgVbRztpquwZT/quPIK7Fop1 hV5wf3zNYEnBjY8ne0fHTdh7kIXf2uq0WOs1Y0q/Db5mkRQ5jxwpjLiCaXf61EJ6K0Kn 992RnjhrU9x9krWhtCVBuGFDTxvUd2nyXBV8okIfm+I6bjrZjO7jBXSZDwcJnGVzARkM Pb6g== X-Gm-Message-State: APjAAAUFnY3X2riIm3DyKi8YTm+3fI6efdSKg7WF4MW2tYyj6Q4XW4IY ww02ZTbrUU8RQ9LM/Mr+ca0osh+ynG0= X-Google-Smtp-Source: APXvYqzwyy5Ip0rYyr1IMz4ZOjdzvylr+Ul+GxlXZRMQXTc/83pVNSmWN8yFLER/v45R80GFI8O2+g== X-Received: by 2002:a63:1f16:: with SMTP id f22mr5938356pgf.2.1576717069384; Wed, 18 Dec 2019 16:57:49 -0800 (PST) Received: from gurchetansingh0.mtv.corp.google.com ([2620:15c:202:201:bc97:5740:52a7:6875]) by smtp.gmail.com with ESMTPSA id f23sm4651553pgj.76.2019.12.18.16.57.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 18 Dec 2019 16:57:48 -0800 (PST) From: Gurchetan Singh To: dri-devel@lists.freedesktop.org Subject: [PATCH 5/6] drm/virtio: move to_virtio_fence inside virtgpu_fence Date: Wed, 18 Dec 2019 16:57:32 -0800 Message-Id: <20191219005733.18960-5-gurchetansingh@chromium.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191219005733.18960-1-gurchetansingh@chromium.org> References: <20191219005733.18960-1-gurchetansingh@chromium.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kraxel@redhat.com, Gurchetan Singh Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" That's the only file that uses it. Signed-off-by: Gurchetan Singh --- drivers/gpu/drm/virtio/virtgpu_drv.h | 2 -- drivers/gpu/drm/virtio/virtgpu_fence.c | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.h b/drivers/gpu/drm/virtio/virtgpu_drv.h index 578d5e42946e..b16e04bd67b7 100644 --- a/drivers/gpu/drm/virtio/virtgpu_drv.h +++ b/drivers/gpu/drm/virtio/virtgpu_drv.h @@ -103,8 +103,6 @@ struct virtio_gpu_fence { struct virtio_gpu_fence_driver *drv; struct list_head node; }; -#define to_virtio_fence(x) \ - container_of(x, struct virtio_gpu_fence, f) struct virtio_gpu_vbuffer { char *buf; diff --git a/drivers/gpu/drm/virtio/virtgpu_fence.c b/drivers/gpu/drm/virtio/virtgpu_fence.c index 5466aab7d39a..5b2a4146c5bd 100644 --- a/drivers/gpu/drm/virtio/virtgpu_fence.c +++ b/drivers/gpu/drm/virtio/virtgpu_fence.c @@ -27,6 +27,9 @@ #include "virtgpu_drv.h" +#define to_virtio_fence(x) \ + container_of(x, struct virtio_gpu_fence, f) + static const char *virtio_get_driver_name(struct dma_fence *f) { return "virtio_gpu"; From patchwork Thu Dec 19 00:57:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gurchetan Singh X-Patchwork-Id: 11302529 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DC90614F6 for ; Thu, 19 Dec 2019 00:57:57 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B82BB218AC for ; Thu, 19 Dec 2019 00:57:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="SywG7pyO" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B82BB218AC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6571B6EAB1; Thu, 19 Dec 2019 00:57:54 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pg1-x544.google.com (mail-pg1-x544.google.com [IPv6:2607:f8b0:4864:20::544]) by gabe.freedesktop.org (Postfix) with ESMTPS id E28326EAB2 for ; Thu, 19 Dec 2019 00:57:50 +0000 (UTC) Received: by mail-pg1-x544.google.com with SMTP id x8so2181415pgk.8 for ; Wed, 18 Dec 2019 16:57:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=txgoTj/hvhqafyOwdlyw8+Qqb1qSPjhEmKhqkZOZsYA=; b=SywG7pyOvilRSvv71U0sHaE25nXMZtFqvkh+waAkOkIqgFZ1SsGOaJxGYjKfJJIj0Z PC2CCaj7XTjgMZO0KRym6S6ZDIXjobeA5OWLzzN8n+CYPF97i1lpdW4E2r8JVjA0ev94 SlBjAJ6fDL4oZNBjdJC5UXN3OpVLiQTeoFRbs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=txgoTj/hvhqafyOwdlyw8+Qqb1qSPjhEmKhqkZOZsYA=; b=X+GPNXzm0g4PA3WbX2lfgjp2GzFU5a0RH8EkZuNKbtn4OlWz5xpz2RqrC3Cpysk4fw PrrE5vKYi5wu1wYkbsENLZOqQHUHR+pDNtRnnAUN34j2KACCzhJvkWgyk3579vakfFP7 SdC0f9MQzE4VLMyMuk8RQ2fF//vdZvQHXYfhwDoxUjWTtV6BzCiO2+VH0CKSOhdo+q/Y FRF2TM3IaSg2uSRz/bA4xfg2/SHyVV3pVvB0e85jWufa3GZqxcUDBQS9/5P/nqKIf2qA sz+HwKLgF12yQV5gCwClnTHLDbiOgWT+aLr0d54jxPSzw3/GpXJfz5uczWxCFVfkCa/X VY3w== X-Gm-Message-State: APjAAAWMrT14CAR+gbpmi6hFa2qB+4X8k4OsRPXLqV5/W59B7dISOQ/S dMicRTn65av+asE0Ndku66vRjfnmpCg= X-Google-Smtp-Source: APXvYqxBxxOBUaC4QlURSKuNfs7JWsqHQOZ5PYGrJR0AX/rhHV/2MuhCDP9qhtsJypM0xm2HZ5ni6g== X-Received: by 2002:a63:4d5e:: with SMTP id n30mr6163069pgl.275.1576717070277; Wed, 18 Dec 2019 16:57:50 -0800 (PST) Received: from gurchetansingh0.mtv.corp.google.com ([2620:15c:202:201:bc97:5740:52a7:6875]) by smtp.gmail.com with ESMTPSA id f23sm4651553pgj.76.2019.12.18.16.57.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 18 Dec 2019 16:57:49 -0800 (PST) From: Gurchetan Singh To: dri-devel@lists.freedesktop.org Subject: [PATCH 6/6] drm/virtio: move drm_connector_to_virtio_gpu_output to virtgpu_display Date: Wed, 18 Dec 2019 16:57:33 -0800 Message-Id: <20191219005733.18960-6-gurchetansingh@chromium.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191219005733.18960-1-gurchetansingh@chromium.org> References: <20191219005733.18960-1-gurchetansingh@chromium.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kraxel@redhat.com, Gurchetan Singh Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" That's the only file that uses it. Signed-off-by: Gurchetan Singh --- drivers/gpu/drm/virtio/virtgpu_display.c | 3 +++ drivers/gpu/drm/virtio/virtgpu_drv.h | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_display.c b/drivers/gpu/drm/virtio/virtgpu_display.c index c76d69fecfeb..0966208ec30d 100644 --- a/drivers/gpu/drm/virtio/virtgpu_display.c +++ b/drivers/gpu/drm/virtio/virtgpu_display.c @@ -43,6 +43,9 @@ #define XRES_MAX 8192 #define YRES_MAX 8192 +#define drm_connector_to_virtio_gpu_output(x) \ + container_of(x, struct virtio_gpu_output, conn) + static const struct drm_crtc_funcs virtio_gpu_crtc_funcs = { .set_config = drm_atomic_helper_set_config, .destroy = drm_crtc_cleanup, diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.h b/drivers/gpu/drm/virtio/virtgpu_drv.h index b16e04bd67b7..7e69c06e168e 100644 --- a/drivers/gpu/drm/virtio/virtgpu_drv.h +++ b/drivers/gpu/drm/virtio/virtgpu_drv.h @@ -133,8 +133,6 @@ struct virtio_gpu_output { }; #define drm_crtc_to_virtio_gpu_output(x) \ container_of(x, struct virtio_gpu_output, crtc) -#define drm_connector_to_virtio_gpu_output(x) \ - container_of(x, struct virtio_gpu_output, conn) struct virtio_gpu_framebuffer { struct drm_framebuffer base;