Received: by 2002:a05:7412:b101:b0:e2:908c:2ebd with SMTP id az1csp2585671rdb; Wed, 15 Nov 2023 05:16:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IHzo/o5dcN8Hz5YrGNJcSN2kP3CTIMy+FY6CeVxRNZei8T3KOuwO2pdNarZ9MToqofP2xf1 X-Received: by 2002:a05:6a20:7fa0:b0:187:4bf3:fc50 with SMTP id d32-20020a056a207fa000b001874bf3fc50mr3320475pzj.13.1700054215706; Wed, 15 Nov 2023 05:16:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700054215; cv=none; d=google.com; s=arc-20160816; b=pxkPFmJu5fHfUQHDFV0ZiIS32KEaIySfDpr7WVs0hKJ+gsvyKBLckxvxKG0UxthveH q+c5BIgi5rw6lZGA0JKn6wziWeoJUtzcinZVmBPyInjqwcZyuw891jjLj8Zicv76OG/i +BN2gPgn7rFNJLCbe5FGYpld+YgQ1SkLrc5qPMxTmeQoRtzxhtOKIFKUcoiC9O2lWAWy bfXUWF1jM8CUOGWQCuvfDZ3+uql5WesZEnYamwQMkucp+BGQRttVf11XnoDrawOaeE91 Val8UlZ2/ikXgYjeKKs3J6JDqo15M5HlKkw6paCS2W0oHWxNPL6as3tjRqROATyTS7sv Z53A== 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=g4aNlMTSkF6Z7WtRPqPRRN4O3d3mqRlG6UdzSZTHX4Q=; fh=JZc7Ky9ybZKYkk2rLIZ6vPKMjoOupI/RfcJ0s/qyCHw=; b=d0XrJOoWUWJjaUvh/Gt2F1YG5ErtZfsrL3azHHS2VL6pgzik+p45aYfWLw1X6kzQ7K AGa57CX4v/ZuSZpnh8ds3r3ta0iGJeZEbCuLZ8XfKBsWCPZt2Zh+DYij/coKDQQMZHVO fjhmzpVD3oYwt0RWw++1O9n8RLEk4Z8XbyCynHgRapOTJVxr4hDi40WorGnV2srnBp0G J3R42MkeE4JnirmCIMAohzxYq9yo5gmU0OlfYhLW3MbPVVEdOCg2K/ArgfCIPetqQuFT 7kB4EnrV1mcW5ouQOq6jx9+W3Y8O6A78jr89bu0qNE4aYxE6N3rlGTgIzv/cQIU/tQBF yVOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Zc6r4a5E; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id c14-20020a63ea0e000000b005bdfbdb8135si9525716pgi.830.2023.11.15.05.16.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Nov 2023 05:16:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Zc6r4a5E; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 7854B805F9EA; Wed, 15 Nov 2023 05:16:29 -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 S1343933AbjKONQR (ORCPT + 99 others); Wed, 15 Nov 2023 08:16:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44864 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343905AbjKONQG (ORCPT ); Wed, 15 Nov 2023 08:16:06 -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 7C1FE11D for ; Wed, 15 Nov 2023 05:16:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1700054162; 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=g4aNlMTSkF6Z7WtRPqPRRN4O3d3mqRlG6UdzSZTHX4Q=; b=Zc6r4a5ELkoj29e+7WzDYM4gddcQRuATlVqetDnRFZZgI/Bth/MnbTt1/m1yBM7WvwWkvK FC2244qfuo5bNnNyURSFTE6QC5Q5RA8Lh29GoSDn49ce0nflDFQDBo0JEvivsfms9YVp1a lNYXkpCSaQo4uiylzn8+hwElSjUgmvA= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-659-rcU_iRgZNAqTnCDQ5ps-Iw-1; Wed, 15 Nov 2023 08:16:01 -0500 X-MC-Unique: rcU_iRgZNAqTnCDQ5ps-Iw-1 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-4084d08235fso43103385e9.3 for ; Wed, 15 Nov 2023 05:16:01 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700054159; x=1700658959; 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=g4aNlMTSkF6Z7WtRPqPRRN4O3d3mqRlG6UdzSZTHX4Q=; b=EivhpINEIiqbKLoN4ELOESxhMt5oL62Pb5mzFJZVegJZSHyJWVFw7tUXCZvmbS5QzJ Lq5xfrKKUPT4wu2P9Wm4qnSsIgchaVvkdlb9eooz3D8nDLxeoEj7WqOe+nZHmfWeoIdl r5lYtRjCh8JngDc7IT9SQQI6ZUdK7bLJlPRvvwvRuoYHbgUMeqw9N9zOha6rIBbQvuhb NPkJB0UzeEB5HxERZe3iUmnmXE7A7DxjFUhlzwJzCDkvjUYqOzCaaV4zK49KwIDIy8vn XSq9a9yEgQ1GAL8VJoCA8kqfNA8gCOxrlxjCw/Ljv3dflQlq2ETB9SlTJln3a8vAKi+P U/OA== X-Gm-Message-State: AOJu0YyyiCTOBVa5fd1RGDYI7/px/n5OE3xDrvtHBL/3PvG5iy7JHXFL bdy0KyztV4u51oGa29HFi8kAz3wY5oCxCS40gaMLL7GGvc/akc3A0QS2SdRKoqtsX9WNBDjZAI1 Tv5zcZ0wcSkgdUJz/wX1vbFuDsBjUImldOZYkpr3ERfxCRf32PRSbb1LE+2J/r3l8LxbfSdrndl hYw6gZGLs= X-Received: by 2002:a5d:49c4:0:b0:32d:bc6e:7f0d with SMTP id t4-20020a5d49c4000000b0032dbc6e7f0dmr8014903wrs.18.1700054159384; Wed, 15 Nov 2023 05:15:59 -0800 (PST) X-Received: by 2002:a5d:49c4:0:b0:32d:bc6e:7f0d with SMTP id t4-20020a5d49c4000000b0032dbc6e7f0dmr8014875wrs.18.1700054159031; Wed, 15 Nov 2023 05:15:59 -0800 (PST) Received: from localhost (205.pool92-176-231.dynamic.orange.es. [92.176.231.205]) by smtp.gmail.com with ESMTPSA id n2-20020a5d4202000000b0032d886039easm10435546wrq.14.2023.11.15.05.15.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Nov 2023 05:15:57 -0800 (PST) From: Javier Martinez Canillas To: linux-kernel@vger.kernel.org Cc: Maxime Ripard , Bilal Elmoussaoui , Simon Ser , Erico Nunes , Pekka Paalanen , Thomas Zimmermann , Sima Vetter , Javier Martinez Canillas , Daniel Vetter , David Airlie , Maarten Lankhorst , VMware Graphics Reviewers , Zack Rusin , dri-devel@lists.freedesktop.org Subject: [PATCH v2 3/5] drm/vmwgfx: Disable damage clipping if FB changed since last page-flip Date: Wed, 15 Nov 2023 14:15:42 +0100 Message-ID: <20231115131549.2191589-4-javierm@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231115131549.2191589-1-javierm@redhat.com> References: <20231115131549.2191589-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]); Wed, 15 Nov 2023 05:16:29 -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 --- 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