From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 2D40D26AC5; Sat, 12 Sep 2026 15:58:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789228737; cv=none; b=f8I1EAlyGddm6bJMPVinrLLvzUgTRf+P56lHlDncRf7mgjikzzTTwCYOHJYXzVuqlkGi61jSvNBTOVwrInjPdSdrQaAFJjd6GPpZ0703lAp6Toxc8DpMEHrLKB6i1+DlPkRNTXEK9MNNBgf3Q6WvVv1a9Sn76vcJzUiV91PQ0Ck= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789228737; c=relaxed/simple; bh=N6pIiE1TFsAJ5mROXfsGn4LeFODaZfrjBy9WifCfaMA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=XvB1wRh0uCKhj2PxvznYGFIfU00CJlfr56RF3rYQ2WokPc1pkTUBb5z0dTsnbLXWRdWGZrL6ZLUlWMXB6DFy58rGBRl/5GlD99RZs3THC0r9i7w4mHjXTJrZKdafmDI7l3AnIwB0Raft4fwH3JCkRHWbXNpEQtzuBLhzYMo+Fak= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=rCQtVH2W; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="rCQtVH2W" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E09BC1F000FF; Sat, 12 Sep 2026 15:58:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1789228735; bh=oxPR9q83fZoV+zywgjI2MQ/5iKoAQ4Ud8FpCHqrzEJA=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=rCQtVH2WfFjgSJwxikIEGzroJb//QjxoAzjlUczWoNMmx5+nWdVezCLso7Rvr8oV+ VbeXSa9Dhu6DO47yOpqD3v9t6/gjZKZ4zoe8t5+177BSS6ogfJgq0A1AUZ9vQBMoL4 gfuAU3BqApGU+S3YmJY1/0avCL414JJksXhQrYbk= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Thomas Zimmermann , Yongbang Shi , Rongrong Zou , Sean Paul , Xinliang Liu , Dmitry Baryshkov , Baihan Li Subject: [PATCH 6.1 0419/1191] drm/hibmc: Fix list of formats on the primary plane Date: Sat, 12 Sep 2026 08:52:27 +0200 Message-ID: <20260912065557.651016372@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260912065548.086904252@linuxfoundation.org> References: <20260912065548.086904252@linuxfoundation.org> User-Agent: quilt/0.69 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 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Thomas Zimmermann commit 0e682e136c466ae37c62f18099f591c096260ee0 upstream. Remove all formats from the primary plane that are unsupported for various reasons. * Formats with alpha channel: planes should not announce alpha channels unless they support transparency. There's no transparency support in the primary plane's implementation. * Formats with BGR order. The common format is in RGB channel order. There's no BGR support in the primary plane's implementation. * RGB888: atomic_update programs the format from cpp[0] * 8 / 16. For RGB888's cpp value of 3 this returns 1.5; rounded to 1. Programming the value of 1 to HIBMC_CRT_DISP_CTL_FORMAT sets up RGB565. Hence, the output is distorted. This can be tested by booting with video=1024x768-24. Removing all unsupported formats leaves XRGB8888 and RGB565. Both of which are supported and work correctly. Signed-off-by: Thomas Zimmermann Fixes: da52605eea8f ("drm/hisilicon/hibmc: Add support for display engine") Reviewed-by: Yongbang Shi Cc: Rongrong Zou Cc: Sean Paul Cc: Xinliang Liu Cc: Dmitry Baryshkov Cc: Yongbang Shi Cc: Baihan Li Cc: # v4.10+ Link: https://patch.msgid.link/20260618123142.92298-3-tzimmermann@suse.de Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) --- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c +++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c @@ -153,10 +153,8 @@ static void hibmc_plane_atomic_update(st } static const u32 channel_formats1[] = { - DRM_FORMAT_RGB565, DRM_FORMAT_BGR565, DRM_FORMAT_RGB888, - DRM_FORMAT_BGR888, DRM_FORMAT_XRGB8888, DRM_FORMAT_XBGR8888, - DRM_FORMAT_RGBA8888, DRM_FORMAT_BGRA8888, DRM_FORMAT_ARGB8888, - DRM_FORMAT_ABGR8888 + DRM_FORMAT_XRGB8888, + DRM_FORMAT_RGB565, }; static const struct drm_plane_funcs hibmc_plane_funcs = {