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 019B2383C8F for ; Tue, 18 Aug 2026 23:57:23 +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=1787097446; cv=none; b=YSahicsY/Rtf8pQ2yyhdEfWsDFOPj5hGkgjkOC+35N+1FeG9TihfcI/c/qIOU/dEHGQpfLv294MxYKSEb3agiN3Y4cz0R9bLw9zQirR9tSKrreRrKvlCqCwN0U2RWygpy4Cip7VxDhyEAmA6gDDo++YroqqxMYvc0ajNSdTKCe8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787097446; c=relaxed/simple; bh=FEfZVw3I7pLTnOoRqF7JdRxdkEeZS9JVn6Q3+uhuFak=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=KbiBEyuThB4RqYjJwcxMWyeKCzmizCcA+9cBMmyti3GYgcZZQDd9NOxqUuCbrl+bwn1zAuxYp8BdWmYPWqD3PsmJzUhYfDLitqjDgPtbF9qcOeflFc+iBj8CgAZ6xk80nzWxXtvRFTcdWFEiSsLluM+0J0TBm3ss+nWR2Hr0QEk= 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=g0EG2l6b; 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="g0EG2l6b" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1787097442; 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=+AiUvg3f0tmCvkZK9tohm8bvMedZbKf/cdnpoumO1Tw=; b=g0EG2l6bARcijadv8DMrLn808EL5vB2lmGhkIuzo4kMOkMVL1zyeozOgufEMMilsXTOi28 qeqPXAYFgou7N4Hw3lN+ezzuFTofe5FMMoZGQlHFRbWmuON9gFonpMxiNA41C/U95zQe+a GXtiSlfWybL2TNQi52BKRrGkWMJzA2g= Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-330-aqiblKe4MkGyJoEF2yAsqQ-1; Tue, 18 Aug 2026 19:57:12 -0400 X-MC-Unique: aqiblKe4MkGyJoEF2yAsqQ-1 X-Mimecast-MFC-AGG-ID: aqiblKe4MkGyJoEF2yAsqQ_1787097430 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-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 1B8C41800637; Tue, 18 Aug 2026 23:57:10 +0000 (UTC) Received: from GoldenWind.lan (unknown [10.22.80.100]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 1C9D41800347; Tue, 18 Aug 2026 23:57:07 +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" , "Luca Ceresoli" , "Kees Cook" , "Marco Crivellari" , "Simona Vetter" , "Ben Skeggs" , "David Airlie" , "Thomas Zimmermann" , "Maxime Ripard" , "Danilo Krummrich" , "Jani Nikula" , "James Jones" , "Lyude Paul" Subject: [PATCH 4/6] drm/nouveau/kms/nv50-: Stop using nv_encoder->crtc in nv50_disp_atomic_commit_core() Date: Tue, 18 Aug 2026 19:48:46 -0400 Message-ID: <20260818235637.1738055-5-lyude@redhat.com> In-Reply-To: <20260818235637.1738055-1-lyude@redhat.com> References: <20260818235637.1738055-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 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 --- drivers/gpu/drm/nouveau/dispnv50/disp.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c b/drivers/gpu/drm/nouveau/dispnv50/disp.c index f19820dc055ae..63d554e97fb62 100644 --- a/drivers/gpu/drm/nouveau/dispnv50/disp.c +++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c @@ -2171,10 +2171,14 @@ nv50_disp_atomic_commit_core(struct drm_atomic_commit *state, u32 *interlock) list_for_each_entry(outp, &atom->outp, head) { if (outp->encoder->encoder_type != DRM_MODE_ENCODER_DPMST) { struct nouveau_encoder *nv_encoder = nouveau_encoder(outp->encoder); + struct nouveau_crtc *nv_crtc = nv50_outp_get_new_crtc(state, nv_encoder); + + if (drm_WARN_ON(drm->dev, !nv_crtc)) + continue; if (outp->enabled) { - nv50_audio_enable(outp->encoder, nouveau_crtc(nv_encoder->crtc), - nv_encoder->conn, NULL, NULL); + nv50_audio_enable(outp->encoder, nv_crtc, nv_encoder->conn, NULL, + NULL); outp->enabled = outp->disabled = false; } else { if (outp->disabled) { -- 2.55.0