From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=148.251.105.195 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1793869162; b=ld6uL5pxWePXBAvHDfJ18rcyONe9TLWpho16MqMGQEwYlRfk5LQO7ceg0MHrhxLASWle +VChcFmrIKzGzj7H1EYXttvQj9sHwJ8BaHJi0yTRe/wdp5DGV8n/LBGX49LL+lk4vPVV6 h6jSzZtp108NLG4uSEei3Yy95LhbG7sqbD8uvg57WOp/x0o0JyJ9N1uj401Ljb5sf5oez Flc0iSSRpljq4lPAv9adPX/qcHOu9gAeRaBmBv31ExUaePbvC3ZdrFNjVbTba0OJ5dZKD OFgQjLuvNg2RfJ/fvF6/qFleq3ciyDJ6zNjf7Us/fR2+gm7SL3SiV+kp/vwOsQ3y+HQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793869162; h=DMARC-Filter:DKIM-Signature:Received:Message-ID:Date:MIME-Version: User-Agent:Subject:To:Cc:References:From:Content-Language:In-Reply-To: Content-Type:Content-Transfer-Encoding; bh=bBn1ykyRQWqMly5VMYEBKX4QjwJ5XVSM4rfTKbZt6Os=; b=E4U+l3kF7Lm66XCmaXoO2C74rEpclYDqez/XlioEn9fugGkdAvrQWZf4QmZPHovTp4of I7WziZjfXE89jTx+MWhzC0DqO9d8+ZbzbG0yjggHJNAjBZZgzi6K/G+tRaWXhaC29xuvH Rsyqfb6ro4lGJwKEJdNjfE4ZNkMiE7KpoKJOpPxDAn/Th3XsQzXeBzN3h4UpuarhT9aDK MRtK3TZfOOTohvinMLZ4DFw+p5iOfiHy7EfVx3fpuWMi7U49XcFYmnWTtMxz4KdQvRe8X jhGVXHnFCBQKn9BFSlvSbOcGoLIp0I+mjFO/DZa+AlXCLBhkrVzc5g+0+vtAcnipq5w== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass header.d=collabora.com header.i=@collabora.com header.a=rsa-sha256 header.s=mail header.b=D8hkm7cL; arc=none smtp.remote-ip=148.251.105.195 Received: from bali.collaboradmins.com (bali.collaboradmins.com [148.251.105.195]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F2402606A32C; Thu, 5 Nov 2026 08:59:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org F2402606A32C Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=collabora.com header.i=@collabora.com header.a=rsa-sha256 header.s=mail header.b=D8hkm7cL DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1793869160; bh=ZKaZFFHipOBBEL4aN3JZCurDbr471IQ5mAHx+yt6YDI=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=D8hkm7cLJ7S+YmF4PZLUoJwECskt1Lx2wBGPwMxKGB7U+y+B1ib+bRRjrhTYsxFfw uIHzv5kGUcdqzY7GQvciwIRUnjE6E1bjhIAm02/rvqjKZ4cMuSbwVViK78+8ioi4mp eds24T+OXz4w10VRzgrjCm/MNXaYzxHaTm/CjNuYotXypSNeel73uJThZZWhRkrGHb zYQghiYqQPaW8FT/Oc+6gAA7+/0J7UQTy9aPUips21sAW2f9qfwXovX73eEfDlXyK2 qEJkPV5RCAnKVk4ouAglPbYCYECNTQKSLvYyyHXgWUEYrEZ4891C0BvrPwQ6SfXsc0 LF7orzWiVgBsQ== Received: from [100.64.1.21] (unknown [100.64.1.21]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by bali.collaboradmins.com (Postfix) with ESMTPSA id 50DF617E05D6; Thu, 05 Nov 2026 09:59:19 +0100 (CET) Message-ID: Date: Thu, 5 Nov 2026 09:59:18 +0100 X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v9 02/13] drm/mediatek: Implement Display Stream Compression support To: Roman Vivchar , chunkuang.hu@kernel.org Cc: p.zabel@pengutronix.de, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, matthias.bgg@gmail.com, jitao.shi@mediatek.com, dri-devel@lists.freedesktop.org, linux-mediatek@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel@collabora.com, justin.yeh@mediatek.com, jason-jh.lin@mediatek.com References: <8fcdd2fa-7c9c-4af5-a7b4-45fb881d88a8@protonmail.com> From: AngeloGioacchino Del Regno Content-Language: en-US In-Reply-To: <8fcdd2fa-7c9c-4af5-a7b4-45fb881d88a8@protonmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 11/4/26 19:51, Roman Vivchar wrote: > Hi Angelo, > > I have tested this series with my out-of-tree mt6595 (command mode > panel) and mt6768 (video mode) DRM. There's no regressions, but I > spotted an issue with kconfig. > > On 9/16/26 14:08, AngeloGioacchino Del Regno wrote: >> Add a real driver for the Display Stream Compression (DSC) Display >> Controller IP, implementing support for DSC v1.1 to v1.2. >> >> In order to do this, it was necessary to remove the basic DSC IP >> bypass setup from mtk_ddp_comp: this functionality is retained in >> the new mtk_disp_dsc driver, which checks if DSC was actually >> requested by other components (with the only one that currently >> supports this being DSI) and, if not, it will set BYPASS mode in >> the DSC IP. >> >> Like before, the BYPASS mode is set before starting the DSC IP, >> but unlike before, this is being done in the component start >> callback instead of the config one. >> Notably, the config callback is called by mtk_crtc always >> immediately before the calling start callback, so the order of >> register writes is retained. >> The only real difference is that now this is being done through >> CPU writes instead of CMDQ, but since that's called only once >> and since it's just three registers, the performance impact will >> not be minimal and not even measurable. >> >> As anticipated, DSC handling was also introduced in the mtk_dsi >> driver: when performing dsi_host_attach, the driver now checks >> if the DSI panel adds the DSC configuration structure to the >> mipi_dsi_device structure and, if it does, it will store a >> pointer in the driver-local mtk_dsi structure's `dsc` member. >> >> The DSI driver will then check whether the DSC configuration >> that comes from the panel is valid (in regard to MediaTek DSI) >> and will call the DRM API's DSC helpers to calculate and set >> all of the const and RC parameters for the actual DSC setup. >> >> For the time being, even though the latest MediaTek SoCs do >> support DSC v1.2, only DSC v1.1 pre-scr support is implemented >> as an initial contribution (which is rather big, and 1.2 would >> make it even bigger - but that can anyway be implemented later). >> >> As a last step for validation of DSC parameters in DSI, a check >> for the hdisplay against DSC slice sidth and one for vdisplay >> against DSC slice height was added to the mode_valid callback, >> making sure that H/V are, as expected, multiples of slice W/H. >> >> Signed-off-by: AngeloGioacchino Del Regno > > ... > >> --- a/drivers/gpu/drm/mediatek/mtk_dsi.c >> +++ b/drivers/gpu/drm/mediatek/mtk_dsi.c >> @@ -18,6 +18,8 @@ >> #include