From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 C4D6F227E95; Tue, 29 Apr 2025 17:42:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745948538; cv=none; b=aDp6yNSaL7oEmezoDSYCzJsxY0jkvNPNVBPfed/5SelEYut7aJobxz16cAeo5wm3kPPHtpe7dVslTD5KKIQ8eH1WYwkjqtjQ9wGskzy4s2Sjc5jNR6fNVouYLJsxCUR1geKVg14FfwET1fETqxzivWgG5hEQ/5XfN8rzc736Lfc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745948538; c=relaxed/simple; bh=Y9gEAkrfFJgjc+1G2AC3gCIF55d8w45ineqfxgZiuyI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ttqmZzY0G96SiviT5EvJA+2xnpiV2kuYUhQUe0e1QYKX3TG1nJQ3KCt4UhmNfKkzNd1lzkwy2DJs9fgbEBdCiq8/kcTjBFHqXtcHDWAR11vIki4VQRxD5zkpfTLqtTzPCKTQNwuOKKfGeErSN57a3BpOSJHL+d8vZ1b15oXfZ0g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=G93oZPSs; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="G93oZPSs" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 49F8BC4CEE3; Tue, 29 Apr 2025 17:42:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1745948538; bh=Y9gEAkrfFJgjc+1G2AC3gCIF55d8w45ineqfxgZiuyI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=G93oZPSsTvRyVHEXBPT76jC/gMzmikyl9CaayO5n+cFgF1C+I6icFga4sIMG2LVxG JSOv426iZVlrlnH8tsX+yTyl0m8rtf05rEAf0CWs2x3L6mu2HH0Kf3DxlPEXwUdbX6 yk5HCbaAz2OkAel/PozbaFUieWtaZpgwZ6dPO9AU= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Abhinav Kumar , Jessica Zhang , Maxime Ripard , Dmitry Baryshkov , Sasha Levin Subject: [PATCH 5.15 039/373] drm: allow encoder mode_set even when connectors change for crtc Date: Tue, 29 Apr 2025 18:38:36 +0200 Message-ID: <20250429161124.738544739@linuxfoundation.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250429161123.119104857@linuxfoundation.org> References: <20250429161123.119104857@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Abhinav Kumar [ Upstream commit 7e182cb4f5567f53417b762ec0d679f0b6f0039d ] In certain use-cases, a CRTC could switch between two encoders and because the mode being programmed on the CRTC remains the same during this switch, the CRTC's mode_changed remains false. In such cases, the encoder's mode_set also gets skipped. Skipping mode_set on the encoder for such cases could cause an issue because even though the same CRTC mode was being used, the encoder type could have changed like the CRTC could have switched from a real time encoder to a writeback encoder OR vice-versa. Allow encoder's mode_set to happen even when connectors changed on a CRTC and not just when the mode changed. Signed-off-by: Abhinav Kumar Signed-off-by: Jessica Zhang Reviewed-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20241211-abhinavk-modeset-fix-v3-1-0de4bf3e7c32@quicinc.com Signed-off-by: Dmitry Baryshkov Signed-off-by: Sasha Levin --- drivers/gpu/drm/drm_atomic_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c index 2c3883d79f531..bd01d925769db 100644 --- a/drivers/gpu/drm/drm_atomic_helper.c +++ b/drivers/gpu/drm/drm_atomic_helper.c @@ -1279,7 +1279,7 @@ crtc_set_mode(struct drm_device *dev, struct drm_atomic_state *old_state) mode = &new_crtc_state->mode; adjusted_mode = &new_crtc_state->adjusted_mode; - if (!new_crtc_state->mode_changed) + if (!new_crtc_state->mode_changed && !new_crtc_state->connectors_changed) continue; DRM_DEBUG_ATOMIC("modeset on [ENCODER:%d:%s]\n", -- 2.39.5