From patchwork Wed Sep 4 07:54:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Pu, Hui" X-Patchwork-Id: 13789921 Received: from mx0a-00176a03.pphosted.com (mx0a-00176a03.pphosted.com [67.231.149.52]) (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 C9650146A93 for ; Wed, 4 Sep 2024 07:55:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=67.231.149.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725436519; cv=none; b=eDI1nshqovVoNkNZdx/oJdSXG3xPqXhg3D28jWd6FHWCkW85xGJawW3oOUU5rp7PE9zKQtwh+j88zW/1GBdBJXxJSYOV99iv6nRR0W78e4rd1w8Gl1uUSIpF+9wzoRypTdcvfbJu9o3ugLLmoxat8G+4/rH2NOm05AYLq8bcZIA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725436519; c=relaxed/simple; bh=r0a5AYrIFTg6126FS0HDRo81dWEf9zYSuTdKXXqeSbE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=tE44DP0Ye5y+y6re4QX7ErZehX6NJlM52O2pLupihclgVXbT5l9Bxyy/WVXrKH4PgJ0lpiT1VOxb8MtjqGMKGX2sYypM4FICUgfiSeDxP1G7//nYwlYWsH8Sux4InuJ6jeY1oEuCTEoPY/Edbq5W7wpun+ihLwo6fkBGYpnVN8M= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gehealthcare.com; spf=pass smtp.mailfrom=gehealthcare.com; dkim=pass (2048-bit key) header.d=gehealthcare.com header.i=@gehealthcare.com header.b=atGzVY/T; arc=none smtp.client-ip=67.231.149.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gehealthcare.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gehealthcare.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gehealthcare.com header.i=@gehealthcare.com header.b="atGzVY/T" Received: from pps.filterd (m0048274.ppops.net [127.0.0.1]) by m0048274.ppops.net-00176a03. (8.18.1.2/8.18.1.2) with ESMTP id 4846pVYn011262 for ; Wed, 4 Sep 2024 03:55:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= gehealthcare.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to; s= outbound; bh=YgLq/2dBPG+eknMq5HrdJ7VBavF7x7z1tmaFPepaKYE=; b=atG zVY/TKNHFS4XOhbr9ByGV2JUUchfNsJZ9oAJGH8PoeErq9DntD1U46bn246Qn3n9 1jqnl7jrhyE8OOXOTcaomJ+RC/gn/B8Xb+59s7znmUw3kYNvhLZ3gDEy3mGe7MRl rZ1xRsCnNnxJlVPwqEoLxqKDfLbSi1/dSOMESpFoXGNtVrNb+6+Ob1Ix7xhYPtNo z8K+397lR+f27hcM4vDCl64UnqdCN2qguomD57e41TJRCPeueNGRW20lIVXcWE/4 w2D86V3Iu/vmME4tmlpimBlYHXO38IRUZmlHnxJ1u0LgpddEg3f7x6zpgJfNsQC3 VdBaSOOXFLwYH1z69xg== From: Paul Pu To: p.zabel@pengutronix.de, Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Lucas Stach Cc: hui.pu@gehealthcare.com, HuanWang@gehealthcare.com, taowang@gehealthcare.com, sebastian.reichel@collabora.com, ian.ray@gehealthcare.com, stable@vger.kernel.org, dri-devel@lists.freedesktop.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] drm/imx/ipuv3: ipuv3-plane: Round up plane width for IPUV3_CHANNEL_MEM_DC_SYNC Date: Wed, 4 Sep 2024 10:54:17 +0300 Message-Id: <20240904075417.53-1-hui.pu@gehealthcare.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240904024315.120-1-hui.pu@gehealthcare.com> References: <20240904024315.120-1-hui.pu@gehealthcare.com> Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: lvES04ImBt8Zu6n7T515X2upZyln4RXV X-Proofpoint-GUID: lvES04ImBt8Zu6n7T515X2upZyln4RXV X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.60.29 definitions=2024-09-04_05,2024-09-04_01,2024-09-02_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 priorityscore=1501 impostorscore=0 phishscore=0 spamscore=0 bulkscore=0 mlxlogscore=999 mlxscore=0 malwarescore=0 adultscore=0 clxscore=1015 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2407110000 definitions=main-2409040060 This changes the judgement of if needing to round up the width or not, from using the `dp_flow` to the plane's type. The `dp_flow` can be -22(-EINVAL) even if the plane is a PRIMARY one. See `client_reg[]` in `ipu-common.c`. [ 0.605141] [drm:ipu_plane_init] channel 28, dp flow -22, possible_crtcs=0x0 Per the commit message in commit: 4333472f8d7b, using the plane type for judging if rounding up is needed is correct. This fixes HDMI cannot work for odd screen resolutions, e.g. 1366x768. Fixes: 4333472f8d7b ("drm/imx: ipuv3-plane: Fix overlay plane width") Cc: stable@vger.kernel.org # 5.15+ Signed-off-by: Paul Pu Reviewed-by: Philipp Zabel Acked-by: Liu Ying --- v1 -> v2: Fixed addressed review comments --- drivers/gpu/drm/imx/ipuv3/ipuv3-plane.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) base-commit: 431c1646e1f86b949fa3685efc50b660a364c2b6 diff --git a/drivers/gpu/drm/imx/ipuv3/ipuv3-plane.c b/drivers/gpu/drm/imx/ipuv3/ipuv3-plane.c index 704c549750f9..3ef8ad7ab2a1 100644 --- a/drivers/gpu/drm/imx/ipuv3/ipuv3-plane.c +++ b/drivers/gpu/drm/imx/ipuv3/ipuv3-plane.c @@ -614,7 +614,7 @@ static void ipu_plane_atomic_update(struct drm_plane *plane, break; } - if (ipu_plane->dp_flow == IPU_DP_FLOW_SYNC_BG) + if (plane->type == DRM_PLANE_TYPE_PRIMARY) width = ipu_src_rect_width(new_state); else width = drm_rect_width(&new_state->src) >> 16;