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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 D6BC4C433EF for ; Fri, 8 Apr 2022 08:07:54 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4420A10EFDC; Fri, 8 Apr 2022 08:07:54 +0000 (UTC) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8D58A10EFDC for ; Fri, 8 Apr 2022 08:07:53 +0000 (UTC) Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ncjep-0006gG-Rw; Fri, 08 Apr 2022 10:07:51 +0200 Received: from sha by ptx.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1ncjem-0001ic-HQ; Fri, 08 Apr 2022 10:07:48 +0200 Date: Fri, 8 Apr 2022 10:07:48 +0200 From: Sascha Hauer To: Piotr Oniszczuk Subject: Re: [PATCH v9 00/23] drm/rockchip: RK356x VOP2 support Message-ID: <20220408080748.GA2387@pengutronix.de> References: <20220328151116.2034635-1-s.hauer@pengutronix.de> <20220401125205.GL4012@pengutronix.de> <5420D26D-34FD-4637-B602-F6271E38BB8D@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-Uptime: 10:04:12 up 8 days, 20:33, 66 users, load average: 0.29, 0.37, 0.24 User-Agent: Mutt/1.10.1 (2018-07-13) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c0 X-SA-Exim-Mail-From: sha@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "devicetree@vger.kernel.org" , Benjamin Gaignard , Peter Geis , Sandy Huang , dri-devel@lists.freedesktop.org, "open list:ARM/Rockchip SoC..." , Michael Riesch , kernel@pengutronix.de, Andy Yan , "linux-arm-kernel@lists.infradead.org" Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Wed, Apr 06, 2022 at 11:47:22AM +0200, Piotr Oniszczuk wrote: > > > > Wiadomość napisana przez Piotr Oniszczuk w dniu 01.04.2022, o godz. 15:05: > > Sascha > > > > Now works perfectly! > > (hd playback with 3.5...5.5% cpu while rendering to drm plane) > > > > Fantastic work of You! > > Sascha, > > Having vop2 finally working with drm planes rendering i discovered another issue: overlay osd is invisible at playback. > > context: player draws video on plane #X and osd on overlay plane #Y > When user do i.e. seek at playback - app uses overlay OSD plane to display OSD to user. This approach is used by majority of players (KODI, etc.) > > This works well on all platforms i have - except rk3566 > > For me it looks like z-order vop2 issue or alpha blending issue. > As this is only on rk3566 and only on drm-planes mode - issue is vop2 related imho. That turned out to be simpler than I thought it would be. The zpos values were never actually written to the hardware. Please try the following fixup, it should fix this issue. Thanks for your valuable testing feedback so far :) Sascha ----------------------------8<------------------------ >From d5a102ff1d3010320f492a6ebac6710276fc641f Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Fri, 8 Apr 2022 09:45:24 +0200 Subject: [PATCH] fixup! drm: rockchip: Add VOP2 driver --- drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c index 54208b20a5a7e..8d1323a47f822 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c @@ -1943,8 +1943,10 @@ static void vop2_setup_layer_mixer(struct vop2_video_port *vp) break; } - layer_sel &= ~RK3568_OVL_LAYER_SEL__LAYER(nlayer + ofs, 0x7); - layer_sel |= RK3568_OVL_LAYER_SEL__LAYER(nlayer + ofs, win->data->layer_sel_id); + layer_sel &= ~RK3568_OVL_LAYER_SEL__LAYER(plane->state->normalized_zpos + ofs, + 0x7); + layer_sel |= RK3568_OVL_LAYER_SEL__LAYER(plane->state->normalized_zpos + ofs, + win->data->layer_sel_id); nlayer++; } -- 2.30.2 -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |