From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 917EBCA0ED3 for ; Wed, 4 Sep 2024 07:56:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=YgLq/2dBPG+eknMq5HrdJ7VBavF7x7z1tmaFPepaKYE=; b=QxNjrzVMrPe4irJbAvoHMVf2/M GL2B2x1tnycjqNmnBVw6OOaG3Gt9IvrqmQOWBo5zJCB9A9eF/0siVHSanISq3fLTb2Hz9MYm6+ClE ZIZyw/0hLNtyJ7DJu1eUfCZRmQr07dN2S3hvK5PrEHlxOJiYjB/wElIji0hUcvef3iiftK0vQnRbn wRbC6AozLHJm7x5/Fchvt0L7DQylwXsadVnKn0KQtB8wY8wIFCE8r7rHhE4J1Cpwi8ubyEB004L35 +FpQ2IVLTTRTiogQjQ6TqoETeY7ymcjHMyLysFmENRl/FDU+7ZCvecLA+ArwQ/h+Dpp6U55d2v5+J OMzwe1gQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1slkrm-00000003Hfs-1s29; Wed, 04 Sep 2024 07:55:50 +0000 Received: from mx0a-00176a03.pphosted.com ([67.231.149.52]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1slkqq-00000003HTB-2Sb1 for linux-arm-kernel@lists.infradead.org; Wed, 04 Sep 2024 07:54:54 +0000 Received: from pps.filterd (m0048275.ppops.net [127.0.0.1]) by m0048275.ppops.net-00176a03. (8.18.1.2/8.18.1.2) with ESMTP id 4845gmfi022228 for ; Wed, 4 Sep 2024 03:54:52 -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> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Proofpoint-ORIG-GUID: i2G4XXWIrvDAuu4iLdR6V9NOGE6NJx2x X-Proofpoint-GUID: i2G4XXWIrvDAuu4iLdR6V9NOGE6NJx2x 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 adultscore=0 impostorscore=0 suspectscore=0 mlxlogscore=999 lowpriorityscore=0 malwarescore=0 priorityscore=1501 phishscore=0 mlxscore=0 spamscore=0 bulkscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2407110000 definitions=main-2409040059 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240904_005452_665061_5E79D18D X-CRM114-Status: GOOD ( 13.34 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 --- v1 -> v2: Fixed addressed review comments --- drivers/gpu/drm/imx/ipuv3/ipuv3-plane.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; base-commit: 431c1646e1f86b949fa3685efc50b660a364c2b6 -- 2.39.2