Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp915142lqs; Fri, 14 Jun 2024 09:08:37 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUDZI6FmB7QLtf7TPWHqwnfJwVwfC4cp7IJnt5cptlEpi0+HLG2wi74IwDHVn2C7etcapS2ilig8Wk/FC/pModPZp+k8sPkcASVrkcIxA== X-Google-Smtp-Source: AGHT+IGciXG7+4fLX+2aMihSpsntHk+BDkvIhCbcFas4mgXkPLVmlNPZ7sgBaRAhVam+pWoyNrgV X-Received: by 2002:a05:6a20:b71c:b0:1ba:f390:5532 with SMTP id adf61e73a8af0-1baf3905551mr975896637.27.1718381317684; Fri, 14 Jun 2024 09:08:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718381317; cv=pass; d=google.com; s=arc-20160816; b=S0C4Btw3oe3V4WJAzEjCJFCacbmF3AxsbuTL0QgATVOFQs4Sr4u9oLz86MKky19pis t+LbQTdnWC7wR3vjKN5irkqsRKJ8Pp/YiMVpCdhjmwZlHRWchnLz2PzIpItpT2q0LRGw jbVEZC7CBcXaigAi2B2Dfa9HG9gqEGbMGxZhzHYqw2yt1db/0OuRn8PC63aQ8UJP4urR Kf7/rMl1Ku5oPbWqRV2EmTJJFi8ACSmiLoHXqS7HVbQCHTxnShbTCzFeuJ5V3vnMiGdg fWOL6kXfpd38vaQUSILPInLaO+iXy9X1E+5SmH/9GAskQxznyYprb/peKImYexMxFqv9 2u5Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=DKE9E8EfN4qFoXgS2Nhr4CIKzmxCOJoEG4cKtj5vuJs=; fh=63W4dWKO34EGHE3T1vWmuYqFyINTaFbMpUFQla9Mwa0=; b=NM8LhOIAc9ZvZk1w8B8/hVPssYR0sWG/CRx0P4Q3zp7UJ/sy14jFKq6ZLHlQ+qQxNw +GO86ESxcFzEMbGZ1MCLtM1DGpJjx7nDoooX5/jmaP4RejbfRfa3OfuHmHI7Lo+9pyPw SBpsxyEyrRA1Og1dvPQRSNJvrd9WP+Xj+k2/f0GtyP3Y+JoNDIHaprqFcslbobODm1pO onUf0nl+A4zEG8f1JVwZD36O3NvbF/iWs4pOedALHAmxvMlleS+hH2zlVn9c3ynYAQOl bwv26CGfy7N0eixxSxcoMP7Tx/Go7/S93Y+2sowf64jJ84xvmw61lUeK2R/Xcr1Ngwbr OJ9Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=fail header.i=@igalia.com header.s=20170329 header.b="IaEN/oB6"; arc=pass (i=1 spf=pass spfdomain=igalia.com dkim=pass dkdomain=igalia.com); spf=pass (google.com: domain of linux-kernel+bounces-215161-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-215161-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id d2e1a72fcca58-705ccb7206esi3878683b3a.270.2024.06.14.09.08.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Jun 2024 09:08:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-215161-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=fail header.i=@igalia.com header.s=20170329 header.b="IaEN/oB6"; arc=pass (i=1 spf=pass spfdomain=igalia.com dkim=pass dkdomain=igalia.com); spf=pass (google.com: domain of linux-kernel+bounces-215161-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-215161-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 5FE34B2A52B for ; Fri, 14 Jun 2024 15:37:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A470516FF23; Fri, 14 Jun 2024 15:36:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=igalia.com header.i=@igalia.com header.b="IaEN/oB6" Received: from fanzine2.igalia.com (fanzine.igalia.com [178.60.130.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 49BEE16F0D5 for ; Fri, 14 Jun 2024 15:36:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=178.60.130.6 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718379397; cv=none; b=UYwbFLT87x09izh4sgd1wyPbcdIodmibUaqiGt411j0IqxZVMahW4H8I4U/bEw68quame0ltQVyrnIoBzJBK/znWlltD/8O3e9UkXYZ8FTzqJdq0BAsmXeHqZI7hzJfw8nQgtCPNi+mdXrn0tkinSWooZ3uScKLLOIpskxp7qIs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718379397; c=relaxed/simple; bh=B9dNKu0g1GOvL1g8mOZK4aOrZsmlnULWwgMOQQakRgI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=eTwQDAypGAfH0hA1obmSe/T3z12a6e++PsID4QGgaHZKCeJYazlmf2+N1zJeLymftHBJCWNyoiLB7acnan9FLXIe2Zh7ijop3k+9rNazysbZz0kkePuVQI2eDhuZ34igCqpdkvdAxzS6JNDFZOi/HFmffmr6nxZ8Ywb2CcKrSz0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=igalia.com; spf=pass smtp.mailfrom=igalia.com; dkim=pass (2048-bit key) header.d=igalia.com header.i=@igalia.com header.b=IaEN/oB6; arc=none smtp.client-ip=178.60.130.6 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=igalia.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=igalia.com DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=DKE9E8EfN4qFoXgS2Nhr4CIKzmxCOJoEG4cKtj5vuJs=; b=IaEN/oB63jOJZPzaLtrY3GcTEr O2HwdvD0tELiCl8UT8ClfthshVPMcQjTs4roGd3avMcu/rpj5oOMw1xfjUluVHCPu23C+2vyt2ynX GS+/rJP7mm6UJuE0TowPo0nhB0LGZ+/RhpvIAC6gGSalh5fntHV8Ztdo7yCFztMgNO+EUzGaOwDXX YDRNij7OtLLhDeropi8r9FYTwqLCGjnQbsyYYrksowqXkzlyJlmdq5mUYihHwg6t0GSOVlptQ4TAT ruwfSc0SZhsRQkYFgO+LVvZ7VcLg3J9fjIetGINtzbeVlPa8Hjy6m+/Q8h/1dk9hiUV+aOxPvkcGK OmfZvXsQ==; Received: from [179.118.191.115] (helo=localhost.localdomain) by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim) id 1sI8yf-003B8v-Kq; Fri, 14 Jun 2024 17:36:34 +0200 From: =?UTF-8?q?Andr=C3=A9=20Almeida?= To: dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, nouveau@lists.freedesktop.org, intel-gfx@lists.freedesktop.org Cc: kernel-dev@igalia.com, Melissa Wen , alexander.deucher@amd.com, christian.koenig@amd.com, Simon Ser , Pekka Paalanen , daniel@ffwll.ch, Daniel Stone , =?UTF-8?q?=27Marek=20Ol=C5=A1=C3=A1k=27?= , Dave Airlie , ville.syrjala@linux.intel.com, Xaver Hugl , Joshua Ashton , =?UTF-8?q?Michel=20D=C3=A4nzer?= , Sam Ravnborg , Boris Brezillon , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Jani Nikula , Rodrigo Vivi , Karol Herbst , Lyude Paul , =?UTF-8?q?Andr=C3=A9=20Almeida?= Subject: [PATCH v6 6/8] drm/nouveau: Enable async flips on the primary plane Date: Fri, 14 Jun 2024 12:35:33 -0300 Message-ID: <20240614153535.351689-7-andrealmeid@igalia.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240614153535.351689-1-andrealmeid@igalia.com> References: <20240614153535.351689-1-andrealmeid@igalia.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This driver can perfom async flips on primary planes, so enable it. Signed-off-by: André Almeida --- drivers/gpu/drm/nouveau/dispnv04/crtc.c | 4 ++++ drivers/gpu/drm/nouveau/dispnv50/wndw.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/drivers/gpu/drm/nouveau/dispnv04/crtc.c b/drivers/gpu/drm/nouveau/dispnv04/crtc.c index 4310ad71870b..fd06d46d49ec 100644 --- a/drivers/gpu/drm/nouveau/dispnv04/crtc.c +++ b/drivers/gpu/drm/nouveau/dispnv04/crtc.c @@ -1285,6 +1285,7 @@ int nv04_crtc_create(struct drm_device *dev, int crtc_num) { struct nouveau_display *disp = nouveau_display(dev); + struct nouveau_drm *drm = nouveau_drm(dev); struct nouveau_crtc *nv_crtc; struct drm_plane *primary; int ret; @@ -1338,6 +1339,9 @@ nv04_crtc_create(struct drm_device *dev, int crtc_num) if (ret) return ret; + if (drm->client.device.info.chipset >= 0x11) + primary->async_flip = true; + return nvif_head_vblank_event_ctor(&nv_crtc->head, "kmsVbl", nv04_crtc_vblank_handler, false, &nv_crtc->vblank); } diff --git a/drivers/gpu/drm/nouveau/dispnv50/wndw.c b/drivers/gpu/drm/nouveau/dispnv50/wndw.c index 7a2cceaee6e9..55db0fdf61e7 100644 --- a/drivers/gpu/drm/nouveau/dispnv50/wndw.c +++ b/drivers/gpu/drm/nouveau/dispnv50/wndw.c @@ -763,6 +763,10 @@ nv50_wndw_new_(const struct nv50_wndw_func *func, struct drm_device *dev, return ret; } + if (type == DRM_PLANE_TYPE_PRIMARY && + drm->client.device.info.chipset >= 0x11) + wndw->plane.async_flip = true; + return 0; } -- 2.45.2