From patchwork Tue Oct 8 06:47:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Jason-JH.Lin" X-Patchwork-Id: 13825709 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 37410CED270 for ; Tue, 8 Oct 2024 06:54:05 +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-Type:MIME-Version: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=2XiantOmKqjioInym8Nce6qiqk44yqx/b6CiBTn2y/w=; b=uf/T9yZzpuYfTE0eXf1oGu9rf+ xjextX5qe8E5sy5kToY+/xbAewHo3324rVplDWezPgmgyJjFpQxSrgEiolHOjOB0SNOAjek1tfZaG 7ODjuoCTM44DAjfiKSzUtjJvFGqiLYRPvz2GlHIUQs1jDsCkd9vzpCIEyPupgJfYREZxiUaASIISn Ps6dUIrZ63GBpRPbvvvNaIxOrs0uDCDhM61VClEHxK7WxpuqtRm656XTEYP24qgDvasBpPREa61nw 0FeIKEhWr7PSbqS2Z3gf+k6NFRnQG7zXI8MTSEX5/n/HtXbwiXUzRNmBmpKpUpxt4nyyUpWJmhSl1 6Ht2Gwsg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1sy46e-00000004icy-12oq; Tue, 08 Oct 2024 06:54:04 +0000 Received: from mailgw02.mediatek.com ([216.200.240.185]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1sy40F-00000004hTE-2yCI; Tue, 08 Oct 2024 06:47:29 +0000 X-UUID: 2a874cc2854111efba0aef63c0775dbf-20241007 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:MIME-Version:Message-ID:Date:Subject:CC:To:From; bh=2XiantOmKqjioInym8Nce6qiqk44yqx/b6CiBTn2y/w=; b=SXIU1nrNuO6+vcOFn0eiRHSL6EzVgJDqprzXK0+MUtQi9ujJ1XC2uGI5xpbBlQxgCkVTD7/4nQEnA0Ysd6lt5bPNeg5m/zKK3FL5Bgcl/+jK+3VG2xzbIDUchlg42KrgFBb7gDAzNvb258CUbFKhCcJG2NXKU8yrB5r7Rpj6RXU=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.41,REQID:4cf11fcc-0735-4ee3-b22e-07453a50d9fc,IP:0,U RL:0,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION: release,TS:0 X-CID-META: VersionHash:6dc6a47,CLOUDID:b6457526-5902-4533-af4f-d0904aa89b3c,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:1,EDM:-3,IP:nil,U RL:0,File:nil,RT:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA:0,AV:0,LES:1, SPR:NO,DKR:0,DKP:0,BRR:0,BRE:0,ARC:0 X-CID-BVR: 0 X-CID-BAS: 0,_,0,_ X-CID-FACTOR: TF_CID_SPAM_SNR X-UUID: 2a874cc2854111efba0aef63c0775dbf-20241007 Received: from mtkmbs13n2.mediatek.inc [(172.21.101.108)] by mailgw02.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 327168633; Mon, 07 Oct 2024 23:47:20 -0700 Received: from mtkmbs13n2.mediatek.inc (172.21.101.108) by MTKMBS09N2.mediatek.inc (172.21.101.94) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Mon, 7 Oct 2024 23:47:17 -0700 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs13n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1118.26 via Frontend Transport; Tue, 8 Oct 2024 14:47:17 +0800 From: Jason-JH.Lin To: Adam Thiede , Yassine Oudjana , Chun-Kuang Hu , AngeloGioacchino Del Regno CC: Shawn Sung , Alper Nebi Yasak , , , , , "Jason-JH . Lin" , Singo Chang , Nancy Lin , Subject: [PATCH v10 0/5] Fix degradation problem of alpha blending series Date: Tue, 8 Oct 2024 14:47:11 +0800 Message-ID: <20241008064716.14670-1-jason-jh.lin@mediatek.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241007_234727_820686_9D7B9D7E X-CRM114-Status: GOOD ( 13.95 ) X-BeenThere: linux-mediatek@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-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Some SoCs do not support the ignore_pixl_alpha flag, which breaks the XRGB8888 format. Some SoCs do not support pre-multiplied pixel formats and extending configuration of OVL pre-multiplied color formats, such as MT8173. Fix the SoC degradation problem by this sreies. Tested-by: Chen-Yu Tsai --- Change in v10: 1. Fix the commit message and comment for OVL_CON_AEN Change in v9: 1. Add the fix patch for the XRGB8888 downgrade issue of MT8173 2. Add the refine patch for ignore_pixel_alpha statement Change in v8: Remove blend_modes for not supported pre-multiplied SoCs to fix the return error from drm_plane_create_blend_mode_property(). Change in v7: 1. Add the remove color format comment patch for OVL 2. Fix warning: 'const' type qualifier on return type has no effect Chnage in v6: 1. Use blend_modes instead of function pointer in OVL 2. Use ethdr instead of mdp_rdma to get blend_modes 3. Add 0 checking for adding blend_mode property for mtk_plane Change in v5: Add fix patch for mtk_plane Change in v4: Add lost cases of mtk_ovl_fmt_convert_with_blend Change in v3: Change MACRO approach to function pointer in driver data Change in v2: Fix build error and typo Change in v1: Add fix patch for OVL unsupport color format settings by driver data --- Jason-JH.Lin (5): drm/mediatek: ovl: Fix XRGB format breakage for blend_modes unsupported SoCs drm/mediatek: ovl: Refine ignore_pixel_alpha comment and placement drm/mediatek: ovl: Remove the color format comment for ovl_fmt_convert() drm/mediatek: ovl: Add blend_modes to driver data drm/mediatek: Add blend_modes to mtk_plane_init() for different SoCs drivers/gpu/drm/mediatek/mtk_crtc.c | 1 + drivers/gpu/drm/mediatek/mtk_ddp_comp.c | 2 + drivers/gpu/drm/mediatek/mtk_ddp_comp.h | 10 +++ drivers/gpu/drm/mediatek/mtk_disp_drv.h | 2 + drivers/gpu/drm/mediatek/mtk_disp_ovl.c | 70 ++++++++++++++----- .../gpu/drm/mediatek/mtk_disp_ovl_adaptor.c | 7 ++ drivers/gpu/drm/mediatek/mtk_ethdr.c | 7 ++ drivers/gpu/drm/mediatek/mtk_ethdr.h | 1 + drivers/gpu/drm/mediatek/mtk_plane.c | 15 ++-- drivers/gpu/drm/mediatek/mtk_plane.h | 4 +- 10 files changed, 92 insertions(+), 27 deletions(-)