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 0FB1E1459F6; Wed, 5 Feb 2025 13:54:17 +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=1738763657; cv=none; b=iSkauyvJI6xIR1d//Ln7WhauFchwYcGzgVh4VlxUrrUrZHwNJTyX+P1SZMx+vKyS6YXcp/UNHwI8Yl+LWxMUvtdUvZK6gteOUd9JaeKi/4tbBTnF4pbn/ZStJs4aALP4t9z0iu/TvCx2dhfbQh5EgA7egaPcuo1TXKofZ/jk2qQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738763657; c=relaxed/simple; bh=ErCHignTEg5SXds5lSPyB2P1oF9yRVT/1Bk6v1qbTP4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=qBeiiDwc111prVl/KH2qMowhtQJZ93P8DRILor4uDohvDHQmZpJ9sDub+gjzCgIgM1wnBve+gEkP6qNDqhfIcNjHsrtR/VlFjdq1Grg7874eLkfuj3nTxrDQkTRL+m8Wy3KxlcvYXbRE9HTAuh6iFj5HsZK5PRRd028TeuO5wTY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=s/LMFZ83; 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="s/LMFZ83" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 776BFC4CEDD; Wed, 5 Feb 2025 13:54:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1738763656; bh=ErCHignTEg5SXds5lSPyB2P1oF9yRVT/1Bk6v1qbTP4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=s/LMFZ83d7xm7XU0aQhyW+M9jksXtztDlA5ockbyiAo76iQiN6RcxJNALvk1XNgC0 grduAZdekayZLTQjcUVtDM/7w1MyU2FO56MVMse713VfIZV0sc6n8rSJskXErgURvq AkB+sZ3Z9+KPx6OhJqvmntQJw31Z5zaWh5OlebbQ= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Derek Foreman , Andy Yan , Heiko Stuebner , Sasha Levin Subject: [PATCH 6.12 045/590] drm/rockchip: vop2: Fix the mixer alpha setup for layer 0 Date: Wed, 5 Feb 2025 14:36:40 +0100 Message-ID: <20250205134456.980122282@linuxfoundation.org> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250205134455.220373560@linuxfoundation.org> References: <20250205134455.220373560@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Andy Yan [ Upstream commit 6b4dfdcde3573a12b72d2869dabd4ca37ad7e9c7 ] The alpha setup should start from the second layer, the current calculation starts incorrectly from the first layer, a negative offset will be obtained in the following formula: offset = (mixer_id + zpos - 1) * 0x10 Fixes: 604be85547ce ("drm/rockchip: Add VOP2 driver") Tested-by: Derek Foreman Signed-off-by: Andy Yan Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20241209122943.2781431-7-andyshrk@163.com Signed-off-by: Sasha Levin --- drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c index 594923303a850..630a204440ba8 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c @@ -2248,6 +2248,12 @@ static void vop2_setup_alpha(struct vop2_video_port *vp) struct vop2_win *win = to_vop2_win(plane); int zpos = plane->state->normalized_zpos; + /* + * Need to configure alpha from second layer. + */ + if (zpos == 0) + continue; + if (plane->state->pixel_blend_mode == DRM_MODE_BLEND_PREMULTI) premulti_en = 1; else -- 2.39.5