Message ID | 20230310125943.912514-1-javierm@redhat.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp861385wrd; Fri, 10 Mar 2023 05:09:32 -0800 (PST) X-Google-Smtp-Source: AK7set+NgFz9G935QdaAH8hSOwUtdEEGZ6s9usZ6fcdPIswT1zgqtWlCYCo7LN+18h2S4gEzcv5y X-Received: by 2002:a17:90b:17cd:b0:23a:8d7d:cb06 with SMTP id me13-20020a17090b17cd00b0023a8d7dcb06mr23724678pjb.23.1678453772413; Fri, 10 Mar 2023 05:09:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678453772; cv=none; d=google.com; s=arc-20160816; b=pk4KFDXH0I3NCIsbycsYiY1NfanN/IHCzlNqNMivj7MTp77fquBm4npNc0j0hYETUM +oaVIyDYCtKgWUyP7ETYqzxiZseB44aIJLjP0n7bMyb0vSJUcgAh1YGp9WNEQAEyfuXr p/KQOfwJwJXCKZH8BFNfvBdcW2SvnTRPiWXdvOkpHWw0C+DLDfr7JlbIHdRyzk3IXThO uU9No4EO9W0mp2RHzvS3faKdOdt+basBGBixDKCKhMSuuLDZlDlPIfyGy+fBeuGtQxau 8QqaXYDgWImZiQnSCxIWTk9kJr70tBYYNKjCtCLrjH609uR+qxK6GL2gJza7fbDvasrb YviA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=2dYSWwUySYcCPwCj0zZ4jmWfYgjqhwsnkIueYQNMFPE=; b=YiSPQB0JC3llnPGxEKiJmilmRh5rXLeaMue51Un3otlm0oDmkUpZInp0jruDQ33bj5 TErSEm6mhgEa2YDuDtUbdAIwMCC8z+oEgXFb1DZgvaAn29tnzIeJCZfdDkaYg6796TAR zCt6cut6mgslQ8g3sqUZBSLK1/GMeCF751N1khDQyoixL2P/d/d+1H/1y7xLS5dNLbbJ eZh6+BWtxRLIsYu5kkMq3RYRtafWOpiZzdJSnhmOE8P5JPe95xa2WQWHi5wv9vOKN0wR naerQkyW5VThZVrDiL5PJAOFUbuOG1fj2s93z9YStIRc5Sjp7l9JcuDLe1cHf0XnjPOl OMXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Xe9pbwsF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k14-20020a17090a39ce00b00233e8913e6bsi2336948pjf.173.2023.03.10.05.09.17; Fri, 10 Mar 2023 05:09:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Xe9pbwsF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229945AbjCJNAm (ORCPT <rfc822;carlos.wei.hk@gmail.com> + 99 others); Fri, 10 Mar 2023 08:00:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229654AbjCJNAk (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 10 Mar 2023 08:00:40 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CA3049748E for <linux-kernel@vger.kernel.org>; Fri, 10 Mar 2023 04:59:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678453190; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=2dYSWwUySYcCPwCj0zZ4jmWfYgjqhwsnkIueYQNMFPE=; b=Xe9pbwsFxtl+U/epN9SjKcQ45Kb67fsjFs2dYtb2MQCtTpFlEcXBdWVH0MbisxrXl/NR2w nIMVLbKh5zb/oGgL2t7QsoxNzmVwIL7+4HmnhC5uDZkYRJaLSEllBlgVz4/7GU6Xa8w0Ce RIvJP4gdjpF+AYYAkrRbLngFxjxFORI= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-57-RTXHGq7uOMmwtC2MvYW6qQ-1; Fri, 10 Mar 2023 07:59:49 -0500 X-MC-Unique: RTXHGq7uOMmwtC2MvYW6qQ-1 Received: by mail-wm1-f72.google.com with SMTP id l31-20020a05600c1d1f00b003e8626cdd42so1786554wms.3 for <linux-kernel@vger.kernel.org>; Fri, 10 Mar 2023 04:59:49 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678453188; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=2dYSWwUySYcCPwCj0zZ4jmWfYgjqhwsnkIueYQNMFPE=; b=tzmHIzrFR79uan7NRIe10DhmTrFzvcb0lQKyPMfce2Sv4iQ0wGrsok5o3+lmyTHo2V b0IvQb+K8WmTnWRzjvWCnOaMKFIgrErKu9wXeaHCmHM/dMKN2Ali8qD7lhly88W8/5Sg VsCBRmF//8sYyEI5qpCYPhsjPiihEEbD2yRrrTjDr2jPWMp6el1R2nHKAnASH1muTN6g YnwwJS2+6+21XUhs3qXFkLzyJ3a0BBPcBcywzPRxcRv7Av8HlaOC4JI/6Y0WMs2Ty6VT 6OBVyDjv926YwEsFOKgGE9P4yKhFC5df7/UkEbbzgCp/0UG0Rjefr/EcZcCltL1OWeBb PfGw== X-Gm-Message-State: AO0yUKWsINmxmi12irEdMoSOn04sZhdEWHsA620Va2bBigpNu9vs1yVP tcmrQFUNRzD1EU8U0EiSDMn+itVoEBUYzoSlyzozjPnXWkww9cNPR6z4YCw0e9FGCktzPhFPlSL HtaLyADtQO/RWHjSgwuvsVpKwNeanrmvfVsKzASZBW/6aqe2WLnawmX0GzL+nC+yQhLsl08H1CI bhcNslLVw= X-Received: by 2002:adf:f78e:0:b0:2c8:bf89:39be with SMTP id q14-20020adff78e000000b002c8bf8939bemr19183570wrp.7.1678453188216; Fri, 10 Mar 2023 04:59:48 -0800 (PST) X-Received: by 2002:adf:f78e:0:b0:2c8:bf89:39be with SMTP id q14-20020adff78e000000b002c8bf8939bemr19183540wrp.7.1678453187892; Fri, 10 Mar 2023 04:59:47 -0800 (PST) Received: from minerva.home (205.pool92-176-231.dynamic.orange.es. [92.176.231.205]) by smtp.gmail.com with ESMTPSA id z26-20020a05600c221a00b003e6efc0f91csm2072799wml.42.2023.03.10.04.59.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Mar 2023 04:59:47 -0800 (PST) From: Javier Martinez Canillas <javierm@redhat.com> To: linux-kernel@vger.kernel.org Cc: Thomas Zimmermann <tzimmermann@suse.de>, Bilal Elmoussaoui <belmouss@redhat.com>, Jocelyn Falempe <jfalempe@redhat.com>, Enric Balletbo i Serra <eballetb@redhat.com>, Christian Hergert <chergert@redhat.com>, Albert Esteve <aesteve@redhat.com>, Javier Martinez Canillas <javierm@redhat.com>, Chia-I Wu <olvaffe@gmail.com>, Daniel Vetter <daniel@ffwll.ch>, David Airlie <airlied@redhat.com>, Gerd Hoffmann <kraxel@redhat.com>, Gurchetan Singh <gurchetansingh@chromium.org>, dri-devel@lists.freedesktop.org, virtualization@lists.linux-foundation.org Subject: [PATCH] drm/virtio: Enable fb damage clips property for the primary plane Date: Fri, 10 Mar 2023 13:59:42 +0100 Message-Id: <20230310125943.912514-1-javierm@redhat.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759986343039722931?= X-GMAIL-MSGID: =?utf-8?q?1759986343039722931?= |
Series |
drm/virtio: Enable fb damage clips property for the primary plane
|
|
Commit Message
Javier Martinez Canillas
March 10, 2023, 12:59 p.m. UTC
Christian Hergert reports that the driver doesn't enable the property and
that leads to always doing a full plane update, even when the driver does
support damage clipping for the primary plane.
Don't enable it for the cursor plane, because its .atomic_update callback
doesn't handle damage clips.
Reported-by: Christian Hergert <chergert@redhat.com>
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
---
drivers/gpu/drm/virtio/virtgpu_plane.c | 4 ++++
1 file changed, 4 insertions(+)
base-commit: 3e853b9f89e4bcc8aa342fa350d83ff0df67d7e9
Comments
Hi Javier Am 10.03.23 um 13:59 schrieb Javier Martinez Canillas: > Christian Hergert reports that the driver doesn't enable the property and > that leads to always doing a full plane update, even when the driver does > support damage clipping for the primary plane. > > Don't enable it for the cursor plane, because its .atomic_update callback > doesn't handle damage clips. > > Reported-by: Christian Hergert <chergert@redhat.com> > Signed-off-by: Javier Martinez Canillas <javierm@redhat.com> > --- > > drivers/gpu/drm/virtio/virtgpu_plane.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/drivers/gpu/drm/virtio/virtgpu_plane.c b/drivers/gpu/drm/virtio/virtgpu_plane.c > index 4c09e313bebc..a2e045f3a000 100644 > --- a/drivers/gpu/drm/virtio/virtgpu_plane.c > +++ b/drivers/gpu/drm/virtio/virtgpu_plane.c > @@ -390,5 +390,9 @@ struct drm_plane *virtio_gpu_plane_init(struct virtio_gpu_device *vgdev, virtio_gpu_plane_init() should really be two separate functions. But withing the constrains of the current code Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> Best regards Thomas > return plane; > > drm_plane_helper_add(plane, funcs); > + > + if (type == DRM_PLANE_TYPE_PRIMARY) > + drm_plane_enable_fb_damage_clips(plane); > + > return plane; > } > > base-commit: 3e853b9f89e4bcc8aa342fa350d83ff0df67d7e9 -- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Ivo Totev
Thomas Zimmermann <tzimmermann@suse.de> writes: Hello Thomas, > Hi Javier > > Am 10.03.23 um 13:59 schrieb Javier Martinez Canillas: >> Christian Hergert reports that the driver doesn't enable the property and >> that leads to always doing a full plane update, even when the driver does >> support damage clipping for the primary plane. >> >> Don't enable it for the cursor plane, because its .atomic_update callback >> doesn't handle damage clips. >> >> Reported-by: Christian Hergert <chergert@redhat.com> >> Signed-off-by: Javier Martinez Canillas <javierm@redhat.com> >> --- >> >> drivers/gpu/drm/virtio/virtgpu_plane.c | 4 ++++ >> 1 file changed, 4 insertions(+) >> >> diff --git a/drivers/gpu/drm/virtio/virtgpu_plane.c b/drivers/gpu/drm/virtio/virtgpu_plane.c >> index 4c09e313bebc..a2e045f3a000 100644 >> --- a/drivers/gpu/drm/virtio/virtgpu_plane.c >> +++ b/drivers/gpu/drm/virtio/virtgpu_plane.c >> @@ -390,5 +390,9 @@ struct drm_plane *virtio_gpu_plane_init(struct virtio_gpu_device *vgdev, > > virtio_gpu_plane_init() should really be two separate functions. But > withing the constrains of the current code > Agreed, I thought the same. I may post a follow-up patch once this lands. > Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> > Thanks!
On Fri, Mar 10, 2023 at 01:59:42PM +0100, Javier Martinez Canillas wrote: > Christian Hergert reports that the driver doesn't enable the property and > that leads to always doing a full plane update, even when the driver does > support damage clipping for the primary plane. > > Don't enable it for the cursor plane, because its .atomic_update callback > doesn't handle damage clips. > > Reported-by: Christian Hergert <chergert@redhat.com> > Signed-off-by: Javier Martinez Canillas <javierm@redhat.com> Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Javier Martinez Canillas <javierm@redhat.com> writes: > Christian Hergert reports that the driver doesn't enable the property and > that leads to always doing a full plane update, even when the driver does > support damage clipping for the primary plane. > > Don't enable it for the cursor plane, because its .atomic_update callback > doesn't handle damage clips. > > Reported-by: Christian Hergert <chergert@redhat.com> > Signed-off-by: Javier Martinez Canillas <javierm@redhat.com> > --- Pushed to drm-misc (drm-misc-next). Thanks!
diff --git a/drivers/gpu/drm/virtio/virtgpu_plane.c b/drivers/gpu/drm/virtio/virtgpu_plane.c index 4c09e313bebc..a2e045f3a000 100644 --- a/drivers/gpu/drm/virtio/virtgpu_plane.c +++ b/drivers/gpu/drm/virtio/virtgpu_plane.c @@ -390,5 +390,9 @@ struct drm_plane *virtio_gpu_plane_init(struct virtio_gpu_device *vgdev, return plane; drm_plane_helper_add(plane, funcs); + + if (type == DRM_PLANE_TYPE_PRIMARY) + drm_plane_enable_fb_damage_clips(plane); + return plane; }