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 B3D083806C2 for ; Tue, 18 Aug 2026 23:57:14 +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=1787097436; cv=none; b=ZWpr9ixdbfDGcLvIQhDsGKTUm1bzME7l8pTvALiC+gFD3bi7SG8bAVTDfwxX6QnYLG+3D3R9ATPdjk7l89cVwe/GY+JZLuEoG6rrKpbWLpYIebVG8RAB7igNUGxoiU2VNGDv/KIEvpmgBrnKkrpDfILwFGHb8pgP5Of4EOMuYrQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787097436; c=relaxed/simple; bh=Go9qyjClI5XuqFOTeUdtCcOltUcHrxHIVnsoj1l3gZQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=eDPitzOCe5w2S89QuQiAnreSMLfpVOSQ/zMQKfQRa8oHUOYz0+0a11vCJhSQq2JOXGo7T6fddAf6KyRlvonW85Jm0BaT96pR02AWs8YNeRJAkJneikR6jdyiLJWmZeatZA6ctHSOmKiUogPibwvdsk+eLiNDdjL/L0TBheNTjyE= 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=dKj5Gd3V; 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="dKj5Gd3V" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1787097433; 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=Cdwphjmf7twiQKozt/YmavKP3Voyo4Fdnf0ShOQkMVE=; b=dKj5Gd3VlqowZdPONMKI3WiKeLA49JB5E8Qxw+EPYkI/QCe3tLTB74bKjAEX9K6I+YbhTv RF4mW+fCSUdmy/++mMjOjbokaCsAE7iUhjZA7yHMwyL4nqKLsZM5SMZT2Rg4ZkvWl0Xe71 xtXplVvxy/BIgTqGIbsvGzcMtjE4QPo= Received: from mx-prod-mc-03.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-355-dpPbQUV8Ok279EuZMzRjBQ-1; Tue, 18 Aug 2026 19:56:59 -0400 X-MC-Unique: dpPbQUV8Ok279EuZMzRjBQ-1 X-Mimecast-MFC-AGG-ID: dpPbQUV8Ok279EuZMzRjBQ_1787097417 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-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id B0DD419560AA; Tue, 18 Aug 2026 23:56:56 +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 A06ED180049F; Tue, 18 Aug 2026 23:56:53 +0000 (UTC) From: Lyude Paul To: dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org, linux-kernel@vger.kernel.org, Marek Czernohous Cc: stable@vger.kernel.org, "Faith Ekstrand" , "Dave Airlie" , "Marek Czernohous" , "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 2/6] drm/nouveau/kms/nv50-: Add nv50_outp_get_old_crtc() Date: Tue, 18 Aug 2026 19:48:44 -0400 Message-ID: <20260818235637.1738055-3-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 Does what it says on the label, unused for now. Signed-off-by: Lyude Paul Fixes: f575f2bdb6c3 ("drm/nouveau/kms/nv50-: Remove (nv_encoder->crtc) checks in ->disable callbacks") Cc: # v5.12+ --- drivers/gpu/drm/nouveau/dispnv50/disp.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c b/drivers/gpu/drm/nouveau/dispnv50/disp.c index a885394f7cb92..152361f7feb42 100644 --- a/drivers/gpu/drm/nouveau/dispnv50/disp.c +++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c @@ -459,6 +459,22 @@ nv50_outp_get_old_connector(struct drm_atomic_commit *state, struct nouveau_enco return NULL; } +static struct nouveau_crtc * __maybe_unused +nv50_outp_get_old_crtc(const struct drm_atomic_commit *state, const struct nouveau_encoder *outp) +{ + struct drm_crtc *crtc; + struct drm_crtc_state *crtc_state; + const u32 mask = drm_encoder_mask(&outp->base.base); + int i; + + for_each_old_crtc_in_state(state, crtc, crtc_state, i) { + if (crtc_state->encoder_mask & mask) + return nouveau_crtc(crtc); + } + + return NULL; +} + static struct nouveau_crtc * nv50_outp_get_new_crtc(const struct drm_atomic_commit *state, const struct nouveau_encoder *outp) { -- 2.55.0