Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp17654800ybl; Thu, 2 Jan 2020 09:27:23 -0800 (PST) X-Google-Smtp-Source: APXvYqz6wd6T+ti7ejUJGosZW51LJA/0eCbDmTQOl7iJkJRK3xzxJZ0z/H40b2G3Nw6fzSozULW0 X-Received: by 2002:a05:6830:124b:: with SMTP id s11mr91786329otp.333.1577986043332; Thu, 02 Jan 2020 09:27:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577986043; cv=none; d=google.com; s=arc-20160816; b=sW68HLmDnvcn6c1QYLtmr3XLil2NqbtgxEKW7/OrzpmFVDMF4baQKOwWNtSFHjOobe q3aEG7ZG7LYT0qUnqt6pdfyiye3c3DV/vIQhhvRwtgD0E/c0g/WFF9cFRVBkFrik/yCY Ao7o+dmqX7vp0AOYGHN5gJ8Jpb7r/xcsdApfnNm6jIKYUwilo8P6kbyaDRNVlh5Oz9GE wucJ83rPHMwJaIiXafCiRevVAtnpoYdFzPMUByziOWg8InA4kd/COh9E0d7L9PvUN2Z/ 3++ZaW2jpyulApl6bonIfAQj9TNeirV1cYw90ppu3TrDSvTZh+hjdWksTYnIiP5maosx XbsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=Q7vhbeoX39zjnvjiZ7sZNHNbqWdS89S4zIDeG96A1Fo=; b=gLtZsG6HY9Hr+Yc9S1azHO3W9gO//0BFjrSQzPivcnSP75WVvQalyIgwL9YF2RfVH5 Ba3gn6JEKC4HbAO3iI/uDIL6fYA0K5i1StdyGmS7dQ/nGXvnuPZdBTkRXjqx1hZo9bUU oWs2pYaTR4XdvFd+mGWbxrMbopEnBTbSSYAKfXzee4XDdOSbmraXuYKyO28lXkSWcLUN HQseYnOGA0b9wzH9Nq6ruA5PP94iuiR8XLMve99kH2wWF6Gytun66GH/T1FlDibMCs4Z ckObG89b5NQO9lcDz8JMIhpgcBTgEl2VEOusRn//ERe0HkFCYT1vS8T7h2Wo+gae1mqb 0sUg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=siol.net Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 8si29806878otd.274.2020.01.02.09.27.10; Thu, 02 Jan 2020 09:27:23 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=siol.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728129AbgABRZK convert rfc822-to-8bit (ORCPT + 99 others); Thu, 2 Jan 2020 12:25:10 -0500 Received: from mailoutvs25.siol.net ([185.57.226.216]:38440 "EHLO mail.siol.net" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728112AbgABRZK (ORCPT ); Thu, 2 Jan 2020 12:25:10 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.siol.net (Postfix) with ESMTP id 64B9C52123C; Thu, 2 Jan 2020 18:25:06 +0100 (CET) X-Virus-Scanned: amavisd-new at psrvmta10.zcs-production.pri Received: from mail.siol.net ([127.0.0.1]) by localhost (psrvmta10.zcs-production.pri [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id lQrdYFwcwuWQ; Thu, 2 Jan 2020 18:25:06 +0100 (CET) Received: from mail.siol.net (localhost [127.0.0.1]) by mail.siol.net (Postfix) with ESMTPS id 00D1D520913; Thu, 2 Jan 2020 18:25:05 +0100 (CET) Received: from jernej-laptop.localnet (89-212-178-211.dynamic.t-2.net [89.212.178.211]) (Authenticated sender: jernej.skrabec@siol.net) by mail.siol.net (Postfix) with ESMTPA id 4EBCD52123C; Thu, 2 Jan 2020 18:25:02 +0100 (CET) From: Jernej =?utf-8?B?xaBrcmFiZWM=?= To: Maxime Ripard , Roman Stratiienko Cc: dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 2/2] drm/sun4i: Use CRTC size instead of PRIMARY plane size as mixer frame. Date: Thu, 02 Jan 2020 18:25:02 +0100 Message-ID: <1837725.8hb0ThOEGa@jernej-laptop> In-Reply-To: References: <20200101204750.50541-1-roman.stratiienko@globallogic.com> <20200102100832.c5fc4imjdmr7otam@gilmour.lan> MIME-Version: 1.0 Content-Transfer-Encoding: 8BIT Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi! Dne četrtek, 02. januar 2020 ob 17:32:07 CET je Roman Stratiienko napisal(a): > чт, 2 янв. 2020 г., 12:08 Maxime Ripard : > > Hi, > > > > On Wed, Jan 01, 2020 at 10:47:50PM +0200, roman.stratiienko@globallogic.com wrote: > > > From: Roman Stratiienko > > > > > > According to DRM documentation the only difference between PRIMARY > > > and OVERLAY plane is that each CRTC must have PRIMARY plane and > > > OVERLAY are optional. > > > > > > Allow PRIMARY plane to have dimension different from full-screen. > > > > > > Fixes: 5bb5f5dafa1a ("drm/sun4i: Reorganize UI layer code in DE2") > > > Signed-off-by: Roman Stratiienko > > > > So it applies to all the 4 patches you've sent, but this lacks some > > context. > > > > There's a few questions that should be answered here: > > - Which situation is it fixing? > > Setting primary plane size less than crtc breaks composition. Also > shifting top left corner also breaks it. True, HW doesn't have notion of primary plane. It's just one plane which is marked as primary, but otherwise it has same capabilities as others, like x,y coordinates, size, etc. > > > - What tool / userspace stack is it fixing? > > I am using Android userspace and drm_hwcomposer HAL. > > @Jernej, you've said that you observed similar issue. Could you share > what userspace have you used? I observed it with DE1, but it has exactly the same issue. I noticed this problem on Kodi (gbm version). Kodi first searches for plane capable of displaying NV12 format (for video) and after that a plane which is capable of displaying RGB888 format (for GUI). In DE1 case, first plane is primary and also capable of displaying NV12 format. So when video is displayed which doesn't cover whole screen, display output is corrupted. However, with such fix, video playback is correct. Luc Verhaegen make equivalent fix for DE1, where he also claims primary plane doesn't have to be same size as CRTC output: https://github.com/libv/fosdem-video-linux/commit/ ae3215d37ca2a55642bcae6c83c3612e26275711 > > > - What happens with your fix? Do you set the plane at coordinates > > > > 0,0 (meaning you'll crop the top-lef corner), do you center it? If > > the plane is smaller than the CTRC size, what is set on the edges? > > You can put primary plane to any part of the screen and make it as > small as 8x8 (according to the datasheet) . Background would be filled > with black color, that is default, but it also could be overridden by > setting corresponding registers. Correct, same logic as for overlay planes applies. Best regards, Jernej > > > Thanks! > > Maxime