Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp6752319ybi; Wed, 29 May 2019 12:33:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqx2XKvrkzIX91hOQmKj9G2z/gclOR8eoRoXWP5qT2ryUH/9Z6h42Acj/SgROHtFjtmbjp8A X-Received: by 2002:a63:4c1c:: with SMTP id z28mr49522909pga.122.1559158398553; Wed, 29 May 2019 12:33:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559158398; cv=none; d=google.com; s=arc-20160816; b=hsTYrH0M/0XvL6dZ86VjFjgqKt7TiZ4JzK2uKq4cx2MzKR0xFHOGBypXEmdzzUkld3 Gz2ROMKCiFDpKYfWxS0+TCSSMhyVSU87x8qahBqRs689NssCpWGJyWyvoUgi+9jZtIhS 1jNMNBCENX1mYga3mAW2gJzIVjC5qKUaKrxq1JSHdNQW2Pyh07IUnYiOWrhuDZQFtTDb RwdYtxvBMos4wOPBxYmcNAwy/mfGt/Q7HkpbF201DbJh3xwCjLa7CqC95hw9af0mr4xb YL4PwMzPAXB4iK3al2yofCoPLV/oJRVaRPVnyis7hvnILpoUnb0fa5fD/T457Egl7vnb 17rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=Fnn06qrljwVCv/rqKCUD5iztjI5zpMbhoCNMSfSHVhY=; b=VYz01srPHqaqrCBlUycS5Zp7JHvWAeRDXdg5fH6kR0MITw+JTtiHbl+ZXzIDMcaCfd 9PT/9R7PwO+2Ko321d6lOlC3cLSvtetqJ2YfA/vUw2LuZUaygpii5De6wOjoWoGJ9Vg9 v2nUorAXhG3k48iO1JRm90ivyiwcLPxMWLOFaBfjvjdRtl0tJ69gP38y6UydaAcaJaZZ 1ciOK4IaTK2d08B7yt6BLpyxzaWufjnSZYs2W2+Gap7/ytB1l9Q2yrbYDVqEggGS9AQm lgf5W7RaEsuJVBb9rRDpgBw7kwxXGHRmaJ/izsXEGu2GIGpcnsgmt5aYB09bntjD44Kx j7ZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@onstation.org header.s=default header.b=M+ksa92q; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 204si655724pga.373.2019.05.29.12.33.01; Wed, 29 May 2019 12:33:18 -0700 (PDT) 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; dkim=pass (test mode) header.i=@onstation.org header.s=default header.b=M+ksa92q; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726245AbfE2Tat (ORCPT + 99 others); Wed, 29 May 2019 15:30:49 -0400 Received: from onstation.org ([52.200.56.107]:43656 "EHLO onstation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725956AbfE2Tat (ORCPT ); Wed, 29 May 2019 15:30:49 -0400 Received: from localhost (c-98-239-145-235.hsd1.wv.comcast.net [98.239.145.235]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: masneyb) by onstation.org (Postfix) with ESMTPSA id 178A03E80A; Wed, 29 May 2019 19:30:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=onstation.org; s=default; t=1559158247; bh=4hAGm9jsyCI3/b1K5x1cRkJ1u1uCXrMQWlcs3/4kggk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=M+ksa92qE21lR6e9FRGoYaTcjW/5xYMh2O6q3svhEEVNnlww909FH3ozeFmK2mYX8 q0OlKznqgdlYhJwRwZnqRlzVFquhcBzQeeiPNzMY3Oou0dqnRup+0sI8Pf84BNFKSw mNC/tiVgUSeZGfFmu+0kjBQfTQ+FsQmaMGqLGM4g= Date: Wed, 29 May 2019 15:30:46 -0400 From: Brian Masney To: Jeffrey Hugo Cc: Linus Walleij , Sean Paul , Rob Herring , Jonathan Marek , Dave Airlie , MSM , "linux-kernel@vger.kernel.org" , "open list:DRM PANEL DRIVERS" , Rob Clark , Daniel Vetter , freedreno Subject: Re: [Freedreno] [PATCH RFC v2 0/6] ARM: qcom: initial Nexus 5 display support Message-ID: <20190529193046.GA19876@basecamp> References: <20190509020352.14282-1-masneyb@onstation.org> <20190529011705.GA12977@basecamp> <20190529013713.GA13245@basecamp> <20190529024648.GA13436@basecamp> <20190529102822.GA15027@basecamp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 29, 2019 at 08:41:31AM -0600, Jeffrey Hugo wrote: > On Wed, May 29, 2019 at 4:28 AM Brian Masney wrote: > > > > On Tue, May 28, 2019 at 08:53:49PM -0600, Jeffrey Hugo wrote: > > > On Tue, May 28, 2019 at 8:46 PM Brian Masney wrote: > > > > > > > > On Tue, May 28, 2019 at 07:42:19PM -0600, Jeffrey Hugo wrote: > > > > > > > Do you know if the nexus 5 has a video or command mode panel? There > > > > > > > is some glitchyness with vblanks and command mode panels. > > > > > > > > > > > > Its in command mode. I know this because I see two 'pp done time out' > > > > > > messages, even on 4.17. Based on my understanding, the ping pong code is > > > > > > only applicable for command mode panels. > > > > > > > > > > Actually, the ping pong element exists in both modes, but 'pp done > > > > > time out' is a good indicator that it is command mode. > > > > > > > > > > Are you also seeing vblank timeouts? > > > > > > > > Yes, here's a snippet of the first one. > > > > > > > > [ 2.556014] WARNING: CPU: 0 PID: 5 at drivers/gpu/drm/drm_atomic_helper.c:1429 drm_atomic_helper_wait_for_vblanks.part.1+0x288/0x290 > > > > [ 2.556020] [CRTC:49:crtc-0] vblank wait timed out > > > > [ 2.556023] Modules linked in: > > > > [ 2.556034] CPU: 0 PID: 5 Comm: kworker/0:0 Not tainted 5.2.0-rc1-00178-g72c3c1fd5f86-dirty #426 > > > > [ 2.556038] Hardware name: Generic DT based system > > > > [ 2.556056] Workqueue: events deferred_probe_work_func > > > > ... > > > > > > > > > Do you have busybox? > > > > > > > > > > Can you run - > > > > > sudo busybox devmem 0xFD900614 > > > > > sudo busybox devmem 0xFD900714 > > > > > sudo busybox devmem 0xFD900814 > > > > > sudo busybox devmem 0xFD900914 > > > > > sudo busybox devmem 0xFD900A14 > > > > > > > > # busybox devmem 0xFD900614 > > > > 0x00020020 > > > > > > Ok, so CTL_0 path, command mode, ping pong 0, with the output going to DSI 1. > > > > > > Next one please: > > > > > > busybox devmem 0xFD912D30 > > > > It's 0x00000000 on mainline and 4.17. I used the following script to > > dump the entire mdp5 memory region and attached the dump from 4.17 and > > 5.2rc1. > > > > ok, 0 means autorefresh is not on. Which is fine. My next guess > would be the vblank code checking the hardware vblank counter, which > doesn't exist. > In video mode, there is a frame counter which increments, which can be > used as the vblank counter. Unfortunately, that hardware isn't active > in command mode, and there isn't an equivalent. > > So, the vblank code is going to read the register, and look for an > update, which will never happen, thus it will timeout. There is a > backup path which uses timestamps (no hardware), which you can > activate with a quick hack - make max_vblank_count = 0 at the > following line > https://elixir.bootlin.com/linux/latest/source/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c#L753 That fixed the issue! I previously observed that mdp5_get_vblank_counter, specifically mdp5_encoder_get_framecount, would always return 0. What's the best way to fix this in mainline? Set that to zero if any of the interface modes is MDP5_INTF_DSI_MODE_COMMAND? Brian