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.129.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 90825212FAD for ; Wed, 19 Aug 2026 16:00:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787155234; cv=none; b=K1/5tID9V91PWfh0/KJA9+dIEpLRz7xrhrrSUIMee21KRoaXA293GmCci3vi/gGBYpAYQcvpdyDMH0L8hxT1EtyOJkhX1D9MF4Inrmk6GzXLBTqdJRsw3cHAH8sp2rKCVpGb2+xgMId+ai5V5zifS63Ii+cwlO6Wi+13JK96XjU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787155234; c=relaxed/simple; bh=0UyVVQWZh27567FrgxGhJJ/fRDBKgHJExverwoUCMqg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=YmfhnA101vItrIcJR0pRkDRoS9rjsD6VZR26MnYaNiq+x6RwbYj874FODYNGLmLCFNxZz3B4jmmAeTJdQG88lKc3+hMGTBVIdzPBg9OCXa/+JAO26Ni2Os47DoKtrLqumLKIgZsmAD7IKkXAjkUdhho7uXzE9R22zGO+6h91Tvo= 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=Yj9YkzIl; arc=none smtp.client-ip=170.10.129.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="Yj9YkzIl" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1787155231; 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=JT0fofyDnN3jIOFGkcp2QtaEzfnX9HVu+laIRR16rT8=; b=Yj9YkzIlsIdiha2R1kqRmf5ocHlVf7lR8IuYxvXkGTesxjBUoRfctAAzR7EdolrKCmTsc2 eUmGLNFrPPu3AEwXAP/LV+Hfy32K01L7KI4EhcXgROcIahS+7bDrodihD5ahMLKEMx6AIl dttVao6kG/NawAZiNmSRz6cliNmwmdE= Received: from mx-prod-mc-05.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-3-_fe2aKthM6-dWDRcoiYhNQ-1; Wed, 19 Aug 2026 12:00:26 -0400 X-MC-Unique: _fe2aKthM6-dWDRcoiYhNQ-1 X-Mimecast-MFC-AGG-ID: _fe2aKthM6-dWDRcoiYhNQ_1787155214 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (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-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 56A7019560B9; Wed, 19 Aug 2026 16:00:14 +0000 (UTC) Received: from GoldenWind.lan (unknown [10.22.89.72]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 517EF180034F; Wed, 19 Aug 2026 16:00:10 +0000 (UTC) From: Lyude Paul To: dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org, linux-kernel@vger.kernel.org, Marek Czernohous Cc: Marek Czernohous , "Faith Ekstrand" , "Dave Airlie" , "Maarten Lankhorst" , "Marco Crivellari" , "Luca Ceresoli" , "Kees Cook" , "Simona Vetter" , "Ben Skeggs" , "David Airlie" , "Thomas Zimmermann" , "Maxime Ripard" , "Danilo Krummrich" , "Jani Nikula" , "James Jones" , "Lyude Paul" Subject: [PATCH v2 4/6] drm/nouveau/kms/nv50-: Stop using nv_encoder->crtc in nv50_disp_atomic_commit_core() Date: Wed, 19 Aug 2026 11:43:51 -0400 Message-ID: <20260819155934.154125-5-lyude@redhat.com> In-Reply-To: <20260819155934.154125-1-lyude@redhat.com> References: <20260819155934.154125-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.111 Another leftover spot where we still use nv_encoder->crtc. Get rid of it and do the right thing: get the currently assigned CRTC from the new atomic state. Signed-off-by: Lyude Paul Reported-by: Marek Czernohous --- V2: * Only grab the new CRTC for an outp if we're enabling it, which guarantees that we have the CRTC's atomic state present in the current atomic commit (also removing the need for a NULL check). drivers/gpu/drm/nouveau/dispnv50/disp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c b/drivers/gpu/drm/nouveau/dispnv50/disp.c index f19820dc055ae..d038743d1382a 100644 --- a/drivers/gpu/drm/nouveau/dispnv50/disp.c +++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c @@ -2173,7 +2173,8 @@ nv50_disp_atomic_commit_core(struct drm_atomic_commit *state, u32 *interlock) struct nouveau_encoder *nv_encoder = nouveau_encoder(outp->encoder); if (outp->enabled) { - nv50_audio_enable(outp->encoder, nouveau_crtc(nv_encoder->crtc), + nv50_audio_enable(outp->encoder, + nv50_outp_get_new_crtc(state, nv_encoder), nv_encoder->conn, NULL, NULL); outp->enabled = outp->disabled = false; } else { -- 2.55.0