From patchwork Tue Apr 26 16:41:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jocelyn Falempe X-Patchwork-Id: 12827473 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id A8698C433EF for ; Tue, 26 Apr 2022 16:42:22 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F3C5710E878; Tue, 26 Apr 2022 16:42:21 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id 290F810E878 for ; Tue, 26 Apr 2022 16:42:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1650991338; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/is8L+BY/GI0YdSreLst/xa/jyOypJy9RQk8s12xcwo=; b=VC1R2QJhKDlu+qvt5oOJTarsDluRsVnBppi2SJc1T10DKbMh0BPQgQ3wpo2UAFRPC+tyox 2uKyDBCuiYzS+vvUC/awjDadHsZaeggN6xuhOMkMdiCaPGHjMvy6genyea8LQU8M+GnJwe 5aJbyiRcd5JulW+uM3c97umrB9IXBNk= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-532-kfEIgAlINGWfjquTDapg3g-1; Tue, 26 Apr 2022 12:42:15 -0400 X-MC-Unique: kfEIgAlINGWfjquTDapg3g-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D80A98038E3; Tue, 26 Apr 2022 16:42:14 +0000 (UTC) Received: from hydra.redhat.com (unknown [10.39.193.129]) by smtp.corp.redhat.com (Postfix) with ESMTP id D3D6F2024CB8; Tue, 26 Apr 2022 16:42:13 +0000 (UTC) From: Jocelyn Falempe To: dri-devel@lists.freedesktop.org Subject: [PATCH 1/4] mgag200: Add FB_DAMAGE_CLIPS support Date: Tue, 26 Apr 2022 18:41:05 +0200 Message-Id: <20220426164108.1051295-2-jfalempe@redhat.com> In-Reply-To: <20220426164108.1051295-1-jfalempe@redhat.com> References: <20220426164108.1051295-1-jfalempe@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=jfalempe@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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: Jocelyn Falempe , michel@daenzer.net, tzimmermann@suse.de Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The driver does support damage clips, but doesn't advertise it. So when running gnome/wayland on Matrox hardware, the full frame is copied to the slow Matrox memory, which leads to very poor performances. Add drm_plane_enable_fb_damage_clips() to advertise this capability to userspace. With this patch, gnome/wayland becomes usable on Matrox GPU. Suggested-by: Jonas Ã…dahl Signed-off-by: Jocelyn Falempe Reviewed-by: Thomas Zimmermann --- drivers/gpu/drm/mgag200/mgag200_mode.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/mgag200/mgag200_mode.c b/drivers/gpu/drm/mgag200/mgag200_mode.c index 6e18d3bbd720..cff2e76f3fa0 100644 --- a/drivers/gpu/drm/mgag200/mgag200_mode.c +++ b/drivers/gpu/drm/mgag200/mgag200_mode.c @@ -1107,6 +1107,8 @@ int mgag200_modeset_init(struct mga_device *mdev) return ret; } + drm_plane_enable_fb_damage_clips(&pipe->plane); + /* FIXME: legacy gamma tables; convert to CRTC state */ drm_mode_crtc_set_gamma_size(&pipe->crtc, MGAG200_LUT_SIZE);