Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1051903pxa; Thu, 20 Aug 2020 00:49:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxfBzkn5ZI9pz8hYQBrAOG/SVlMRr3bkVLaKJgJaI7fN/aNWdyTVOHvbJAkoXRWRzJaE3ZO X-Received: by 2002:aa7:d387:: with SMTP id x7mr1662978edq.219.1597909779173; Thu, 20 Aug 2020 00:49:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597909779; cv=none; d=google.com; s=arc-20160816; b=LFdq49QjGv7az0Z/qa37RFA58lKCdJLobpnQzAvQy6toXjyHp3Mttvju4xP6yeP5PD nRTWKXUHl0YZGV0wk3jLOfO+Z32JsIOfHoWJRBVebVkn19ZiynRHpYYzMhfz5n+vlO6z qbkDaq0LFbJE0oW8klI9T+mi0J649QRDaNZY/3i/mT7pv9JT1K7nIzEYXNGy6N/mG0AX DpsDuVklII1tY+q1anJ7EyOGuwIodwsz6/3HDPaVSaizcuDCcIoI5sxYvH4r5QGwYe2M FBe/XY51fnhgAMoOhAOKkoK36nwMeARaokkilTNUMv80+uOftmtleWM99JMgcHnR+iWt pxIg== 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:subject:cc:to:from:date :dkim-signature; bh=VDIkmvkegCnkmq77EkdBxte5zK9bUZyxijazLpT1tmg=; b=uTgcXJeTZ0htVrK02GktlOKBTFWSr0i4oHZPEOXkmoG9Vml7bLdVPH3EASPmstgsIL VNpEbDXiqug81IgtrGtiZvmavjgnraCsPYQuLhRsc7ET5bHB0Bze2sstf1n3A4NHRgNo PqI0CG3Cxr3xS5lBWtElwAYIYba3LrGmzS4tbSv4PhrhJvs2yLN+NCkMU+QKB4U2dfmF oKyxdCONJh0GBqI4bZO9W5HKHfsVed5QBlvZwfgzFiS9hqS3V4+QKe1U+Ky4JPOcVObf y+RbXukeB+eFQPU9VOEnYDlN7iSmu/1DR8CJLC7x3v6LLNymtZSFeXKrKPHlTChZhweA YFFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=q9mr5rBK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b4si862842edr.513.2020.08.20.00.49.15; Thu, 20 Aug 2020 00:49:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=q9mr5rBK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726731AbgHTHsQ (ORCPT + 99 others); Thu, 20 Aug 2020 03:48:16 -0400 Received: from mail.kernel.org ([198.145.29.99]:57424 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726387AbgHTHsM (ORCPT ); Thu, 20 Aug 2020 03:48:12 -0400 Received: from coco.lan (ip5f5ad5a3.dynamic.kabel-deutschland.de [95.90.213.163]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id DF7492076E; Thu, 20 Aug 2020 07:48:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597909691; bh=g2IqS522aDpDOMRGjJhoBBKmc9vDx5nkutC89s6uJR4=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=q9mr5rBKWlaN6yOMGAvpVnslZyDPcwewIL7KGeA4ddSFK2LedtABk2YcfI/a2xWSo vj4XxLKWhcOWpuFnRThSQO8Cn4AnL6tc5Bg7GCM7GCId3AAXYo0vPaJOaK7wHu4CUU CDlaI3bQpIBtNGU4ubSBKKXxRpxl+QeouugEhmNw= Date: Thu, 20 Aug 2020 09:48:00 +0200 From: Mauro Carvalho Chehab To: John Stultz Cc: Greg Kroah-Hartman , linuxarm@huawei.com, mauro.chehab@huawei.com, Manivannan Sadhasivam , Daniel Vetter , dri-devel , Bogdan Togorean , Liwei Cai , linux-arm-kernel , Daniel Borkmann , Rob Herring , "David S. Miller" , Xinliang Liu , Neil Armstrong , Wanchun Zheng , driverdevel , BPF Mailing List , linux-media , Tomi Valkeinen , Jesper Dangaard Brouer , Laurent Pinchart , Xinwei Kong , Alexei Starovoitov , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Rob Clark , Laurentiu Palcu , Andrzej Hajda , John Fastabend , Liuyao An , "moderated list:DMA BUFFER SHARING FRAMEWORK" , Wei Xu , Rongrong Zou , Philipp Zabel , Sam Ravnborg , Network Development , Sumit Semwal , lkml , Jakub Kicinski , David Airlie , Chen Feng Subject: Re: [PATCH 00/49] DRM driver for Hikey 970 Message-ID: <20200820094800.3ede7970@coco.lan> In-Reply-To: References: X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Wed, 19 Aug 2020 20:28:44 -0700 John Stultz escreveu: > On Wed, Aug 19, 2020 at 7:01 PM John Stultz wrote: > > > > On Wed, Aug 19, 2020 at 2:36 PM John Stultz wrote: > > > > > > On Wed, Aug 19, 2020 at 4:46 AM Mauro Carvalho Chehab > > > wrote: > > > > So, IMO, the best is to keep it on staging for a while, until those > > > > remaining bugs gets solved. > > > > > > > > I added this series, together with the regulator driver and > > > > a few other patches (including a hack to fix a Kernel 5.8 > > > > regression at WiFi ) at: > > > > > > > > https://gitlab.freedesktop.org/mchehab_kernel/hikey-970/-/commits/master > > > > > > Sorry, one more small request: Could you create a branch that only has > > > the DRM driver changes in it? > > > > > > The reason I ask, is that since the HiKey960 isn't affected by the > > > majority of the problems you listed as motivation for going through > > > staging. So if we can validate that your tree works fine on HiKey960, > > > the series can be cleaned up and submitted properly upstream to enable > > > that SoC, and the outstanding 970 issues can be worked out afterwards > > > against mainline. > > > > Just as a heads up, I tried testing your tree with my HiKey960, and > > after fixing the compat string inconsistency, the drivers seem to load > > properly. However the drm_hwcomposer seems to have some trouble with > > the driver: > > 01-01 00:12:41.456 345 345 E hwc-drm-display-compositor: Commit > > test failed for display 0, FIXME > > 01-01 00:12:41.456 345 345 E hwc-drm-two: Failed to apply the > > frame composition ret=-22 > > 01-01 00:12:41.456 351 351 E HWComposer: > > presentAndGetReleaseFences: present failed for display 0: BadParameter > > (4) > > > > I'll dig in a bit further as to why, but wanted to give you a heads up. > > Ok, I've mostly gotten it sorted out: > - You're missing a few color formats. > - And I re-discovered a crash that was already fixed in my tree. > > I'll send those patches in a few here. Thank you for the patches! I'll test them with Hikey 970 in order to be sure they're compatible also with such SoC. > > That said even with the patches I've got on top of your series, I > still see a few issues: > 1) I'm seeing red-blue swap with your driver. I need to dig a bit to > see what the difference is, I know gralloc has a config option for > this, and maybe the version of the driver I'm carrying has it wrong? There are some settings at adv7535 with regards to the colormap. The 4.9 fork of it has some different settings. Maybe it could be somehow related to it. I have here a Hikey 960, but didn't test it yet. > 2) Performance is noticeably worse. Whereas with my tree, I see close > to 60fps (that clk issue we mentioned earlier is why it's not exactly > 60) in most tests, but with yours it mostly hovers around 30some fps, > occasionally speeding up to 40 and then back down. That's weird, but it could be due to some settings related to CMA, IOMMU and/or AFBC. > Obviously with some work I suspect we'll be able to sort these out, > but I also do feel that the set you're starting with for upstreaming > is pretty old. The driver I'm carrying was heavily refactored around > 5.0 to share code with the existing kirin driver, in the hopes of > making usptreaming easier, and it seems a shame to throw that out and > focus your efforts on the older tree. > > But to be fair, I've not had time to upstream the driver myself, and > it's obviously your choice on how you spend your time. I am really > excited to see your efforts here, regardless of which driver you end > up pushing. On a quick look I've done, besides not having support for Hikey 970, the code on your tree seems to have less settings than the original one for Hikey 960. Yet, it should take some time to figure out what those extra settings are doing. Once I get this driver merged, and have USB support working fine[1], my plan is to compare the version from your tree, and compare with the one I have, in order to cleanup some stuff, check performance and do some other optimizations. - [1] this is a little OOT here: USB has been a challenge. Depending on the build, I'm getting an NMI interrupt error when the USB3 stack is loaded (usually at dwc3). The error is ESR_ELx_AET_UC. Unfortunately, it doesn't point to where this error is generated, making very hard to debug it. Thanks, Mauro