From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (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 6A940266576 for ; Thu, 30 Jul 2026 01:08:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785373738; cv=none; b=JxNAzSebxaTk+N1EobDj1qpuVzamDu8GflreIT0gyAiLZcGh9vbZsrngQgHVQW8kOo1XDT3xjkVst2enNUdowZIq21l4InkEEB1U0ddnORjKppuiXE3MeQJ1j4GnRsN9HismgbF7B9atSOpgDk3Yo+hS2cx9O6jBDrtjvlKmQf4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785373738; c=relaxed/simple; bh=mVVg+G2Umy60UY1Thm4b9t9eyQ0DEqIsz5vchKvLic4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ULBYU7mL/12xmdpnqYzqRYbUt/xmI2p3ql+yOdcYPLWFgnCBUA2EdZPChVM86B/N3q9B5xEzFVqSgqCasinOaFERrZNH5N18SQjkHSiOZIk6qYOvfWDMTqYe40z43cbBbp5vf8OBnisjRUxkmKJjdLvTv6w/ZQdyWNEQlKu6H5o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=L3XO2ASn; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="L3XO2ASn" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1785373736; 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=SkWNKPrbSggGlE5xxJvOBDKhVHqxI+6ofz9WoGQEXGM=; b=L3XO2ASnO1Quc61Fkri7BGBNdnFuTeSxIGxCgJ1ttXaTog3DscIB50qV8IjB51zkYjOlD2 xvR5BcLPYhzFdmlMfN9OpkSJCVVJ5JScOVnPe5DgEWt+mdU/Mpzv1Ywzhrqg1t6ZOu7w3H wc94IUdfHnOJVlHpa9byF4mLxtEBU7A= Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-644-ECZ0wZzkPP6lq68OyepV0Q-1; Wed, 29 Jul 2026 21:08:50 -0400 X-MC-Unique: ECZ0wZzkPP6lq68OyepV0Q-1 X-Mimecast-MFC-AGG-ID: ECZ0wZzkPP6lq68OyepV0Q_1785373729 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id BC53C195608B; Thu, 30 Jul 2026 01:08:48 +0000 (UTC) Received: from GoldenWind.lan (unknown [10.22.88.35]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 46DAD1800480; Thu, 30 Jul 2026 01:08:47 +0000 (UTC) From: Lyude Paul To: dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: "Maarten Lankhorst" , "Simona Vetter" , "David Airlie" , "Thomas Zimmermann" , "Maxime Ripard" , "Danilo Krummrich" , "Lyude Paul" Subject: [PATCH 2/4] drm/nouveau/kms: Check nouveau.atomic parameter after nvif_device_ctor() Date: Wed, 29 Jul 2026 20:56:08 -0400 Message-ID: <20260730010828.1056397-3-lyude@redhat.com> In-Reply-To: <20260730010828.1056397-1-lyude@redhat.com> References: <20260730010828.1056397-1-lyude@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 Waiting until the NVIF device is ready is preferable, as this will allow us to factor in the chipset generation into whether or not we enable atomic by default. Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/nouveau_drm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c index ad693d2849bec..8899f009f825e 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drm.c +++ b/drivers/gpu/drm/nouveau/nouveau_drm.c @@ -727,7 +727,7 @@ nouveau_drm_device_del(struct nouveau_drm *drm) } static struct nouveau_drm * -nouveau_drm_device_new(const struct drm_driver *drm_driver, struct device *parent, +nouveau_drm_device_new(struct drm_driver *drm_driver, struct device *parent, struct nvkm_device *device) { static const struct nvif_mclass @@ -770,6 +770,9 @@ nouveau_drm_device_new(const struct drm_driver *drm_driver, struct device *paren goto done; } + if (nouveau_atomic) + driver_pci.driver_features |= DRIVER_ATOMIC; + ret = nvif_device_map(&drm->device); if (ret) { NV_ERROR(drm, "Failed to map PRI: %d\n", ret); @@ -879,9 +882,6 @@ static int nouveau_drm_probe(struct pci_dev *pdev, pci_set_master(pdev); - if (nouveau_atomic) - driver_pci.driver_features |= DRIVER_ATOMIC; - drm = nouveau_drm_device_new(&driver_pci, &pdev->dev, device); if (IS_ERR(drm)) { ret = PTR_ERR(drm); -- 2.55.0