Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp642075rdh; Thu, 23 Nov 2023 14:13:45 -0800 (PST) X-Google-Smtp-Source: AGHT+IHC1njuWRn40kXi/Lh92OdFfDI/DKtK8QRg+YLTQ9slDBQYlkNqupmSNMSYUXrwaeJnWhUl X-Received: by 2002:a17:90b:1c09:b0:27d:b488:92ee with SMTP id oc9-20020a17090b1c0900b0027db48892eemr692385pjb.2.1700777625568; Thu, 23 Nov 2023 14:13:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700777625; cv=none; d=google.com; s=arc-20160816; b=lzljsnbcvjCxhOHR8izgOvnbCjO92l9X+BWdc0j82dk0K+AufrJNv8JkRYCr9DdDf7 fy0jRrEemuiGwQC9iS10sYwJPJmPm5NDq+EMsx01DjrXzzPNAkMgemEbDCgZOlcMbrCC aJrqX4UPf2dUX6wmCovzD77Wzf6hk6STeTeuWiazxdpvh4YqfLBzj2MxBT2YyP0/ciKn CmJyICmP8cR1cZOjRGII1x2FRF1hwuI6xm/JyBhV/vTS+8vuZ039NiuvGS9GAuAPxWnU 0GBWTYNhXmlI1RH0qaN8pzcZNRyvVPuJ47NBzLmL3XEODf2SDxmLAuCX0+ADR33jkJKs Dt/A== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=eevPmuhRFAgVhLHOGTOOcRfbcoEzUftUVXb0Oh9ok7w=; fh=tKLbmwsQDf+YQBHWZ+TOQFAPUoT4/hmNKRZYn3ZF6mw=; b=lAebusCCc4dLaQZ34El1YP0hWtUvPqqA1L8urfV1sLteaEr8onmVdwtGZh0LIuSBXK wMFsCm4mVrqCtWxkcEDfKtCegXZGy1ZRF+LQpW0+xYUHdcSwqDZR3nZ13Lh0f6wUse0J edQ136ybtjxBGsDXMdPuvVV87HH1JhxpJcXdTVb58n06KgVsprcSbn0W21Otqt5/SxwN 3kxrqMnjVZRM2QP46g9IJE3fiFWzTH9OG7/tQqI+5tJ5PZOU+KIhA2jbPoqUTcZfbTaH K6L28Zaw9QyhgcdMX7dA4mtm2VS6/gmY+8a2hkcFrs7HxRaSgrXQu0y4flw41bXaI4uC xfwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=XrVBv3Aq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id lp8-20020a17090b4a8800b00280468bfb94si2719199pjb.185.2023.11.23.14.13.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 14:13:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=XrVBv3Aq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 9BD8F81D0C7F; Thu, 23 Nov 2023 14:13:44 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230241AbjKWWN2 (ORCPT + 99 others); Thu, 23 Nov 2023 17:13:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42196 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230013AbjKWWNW (ORCPT ); Thu, 23 Nov 2023 17:13:22 -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 918E210D1 for ; Thu, 23 Nov 2023 14:13:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1700777607; 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: in-reply-to:in-reply-to:references:references; bh=eevPmuhRFAgVhLHOGTOOcRfbcoEzUftUVXb0Oh9ok7w=; b=XrVBv3AqLvNGaf15QiXuDYaXp7+w1htPBpJNE/Zn7qs64OqTUrq7xCWMA9vXBmDyDl3UUP Ht01vtT9QgSWrrMjfIf0ofkJfikM9ue7RjAl22N08yu194HX+ioPSxpWlYW+UguS6VFngm J9P/c9h+DnfC52SFTiFAoduOo4Xg+ok= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-509-vjnvqvc3OO6esU69qhtU4A-1; Thu, 23 Nov 2023 17:13:26 -0500 X-MC-Unique: vjnvqvc3OO6esU69qhtU4A-1 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-40b349b990fso6276235e9.3 for ; Thu, 23 Nov 2023 14:13:26 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700777604; x=1701382404; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=eevPmuhRFAgVhLHOGTOOcRfbcoEzUftUVXb0Oh9ok7w=; b=mRQGqiPnghjHo7RgaCdGpdj+k5XTMsRNEoUya59XXLU2U99FHBxnoULLIl4wiSousX ddpCp4/+ODaDI71m1O4jSUnqYKMcqdEfM5Ic+xkMFykvmRfQOAc4rRl4YxThTCLqksvV G1XGpRKL2aIsoEWtuQUjhOje3fPNYDh3HFjXrAKGOVP8EKdttxkmgg0yxVqGDIsTrcug T1vGW0TKyZmCzfQzjaxP/FIJg9yO6x+GVHJoUDzbCyEv+xDq9ewb35lo/edLPrbBpJbZ 5qpQ1DrZlKDsZyoSNU2nU36d06ulOLOxfRd/QuPRpxc2a9db9B6athxA2owSOXcpvwoZ FVPA== X-Gm-Message-State: AOJu0YxUiw2sxgmWKKrC0JckpghrJP3OTpsxmymG0ci7I30SkqSlONsJ TM73WiHLOCWpwwsWog9pYv0F1H3p/7A4UhrEgz4iR6WTXQDwSAqeqtzaf3mrHFfUEnsGwQ6ZBCc IQlcRkDiAzcvB+3C1udqWLu9YI79rYEfsw/ks9ksVi0gzJa2EtoBF61iQ3WWpcGjf75wNM80y3y nmP3lCEV4= X-Received: by 2002:a05:600c:138e:b0:40b:3605:acda with SMTP id u14-20020a05600c138e00b0040b3605acdamr646923wmf.25.1700777604124; Thu, 23 Nov 2023 14:13:24 -0800 (PST) X-Received: by 2002:a05:600c:138e:b0:40b:3605:acda with SMTP id u14-20020a05600c138e00b0040b3605acdamr646901wmf.25.1700777603855; Thu, 23 Nov 2023 14:13:23 -0800 (PST) Received: from localhost (205.pool92-176-231.dynamic.orange.es. [92.176.231.205]) by smtp.gmail.com with ESMTPSA id z11-20020a05600c0a0b00b00405c7591b09sm3180629wmp.35.2023.11.23.14.13.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 14:13:22 -0800 (PST) From: Javier Martinez Canillas To: linux-kernel@vger.kernel.org Cc: Maxime Ripard , Zack Rusin , Thomas Zimmermann , Pekka Paalanen , Bilal Elmoussaoui , Simon Ser , Erico Nunes , Sima Vetter , Javier Martinez Canillas , Daniel Vetter , David Airlie , Maarten Lankhorst , VMware Graphics Reviewers , dri-devel@lists.freedesktop.org Subject: [PATCH v4 3/5] drm/vmwgfx: Disable damage clipping if FB changed since last page-flip Date: Thu, 23 Nov 2023 23:13:02 +0100 Message-ID: <20231123221315.3579454-4-javierm@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231123221315.3579454-1-javierm@redhat.com> References: <20231123221315.3579454-1-javierm@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE 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: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 23 Nov 2023 14:13:44 -0800 (PST) The driver does per-buffer uploads and needs to force a full plane update if the plane's attached framebuffer has change since the last page-flip. Suggested-by: Sima Vetter Signed-off-by: Javier Martinez Canillas Reviewed-by: Thomas Zimmermann Reviewed-by: Zack Rusin Acked-by: Sima Vetter --- (no changes since v2) Changes in v2: - Set struct drm_plane_state .ignore_damage_clips in vmwgfx plane's .atomic_check instead of using a different helpers (Thomas Zimmermann). drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c index 818b7f109f53..f9364bf222e3 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c @@ -837,10 +837,21 @@ int vmw_du_primary_plane_atomic_check(struct drm_plane *plane, { struct drm_plane_state *new_state = drm_atomic_get_new_plane_state(state, plane); + struct drm_plane_state *old_state = drm_atomic_get_old_plane_state(state, + plane); struct drm_crtc_state *crtc_state = NULL; struct drm_framebuffer *new_fb = new_state->fb; + struct drm_framebuffer *old_fb = old_state->fb; int ret; + /* + * Ignore damage clips if the framebuffer attached to the plane's state + * has changed since the last plane update (page-flip). In this case, a + * full plane update should happen because uploads are done per-buffer. + */ + if (old_fb != new_fb) + new_state->ignore_damage_clips = true; + if (new_state->crtc) crtc_state = drm_atomic_get_new_crtc_state(state, new_state->crtc); -- 2.41.0