Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp318969pxk; Thu, 1 Oct 2020 03:17:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw16atiJG+J3lA7gTpckW/p+0Ddhrs7GdB4RcLke5lVt35Ft1SO2WkoaYFPx9pzgmXZj85J X-Received: by 2002:a17:906:453:: with SMTP id e19mr1980919eja.391.1601547443209; Thu, 01 Oct 2020 03:17:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601547443; cv=none; d=google.com; s=arc-20160816; b=Bb0jiHoazG8oha9v043m72itHMsyODdngLg01bdLB0mdX6DK3H7+sITpf/d1eZohVg FseCRnVBdXkT9PYHbKaM4QZM20L8CxpYOwbcO9CE2r+rMk9qJvrdcPlCjuyDhmMqVuE6 ZDZ8PfPI7zYPPeJS4j0y5pkYa/qvR0SWepnxeELHd1867hJIBrNKx4Rspmkm9sgnAVcr 2dgF9ZrZKxIpwJEa6qZqGEWqAcwNt6D+rrzqjCmGUZYxHnXh8OPeHQtAg9pmfiJF4u/x /7SosHbGp/yjkA4O8Y1A9CaDpxanajTbS+Nm0qr2JC9iDaBia0CUYw4V7elg2rDX7Tb3 ynaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=sbHB4UppKAenF5cuB/vMr8n45MQRc8w9Jto0vU1UBGI=; b=BhcZr+b4nV1qJX2mLSk+Q2Tj2Xy8yX0yNPqwh9Tn6JFZOOeTNpIpmeipQoNX8ltrQE 4uFmjAVEpvflsv/+/SOc7fWlTRxODUp2XAUoVEsC9ClnGtpV9nCvMAhefh7cjTyijFgE Ykxi74aa4XTz/45dYBnlBmLPGOefgt9Ut0L4wx/BgdRceV9vy4DLbOdU69z09zAX2zKK RNnRpFOP5vDg9dFpx/7KAlVADO8N7R6K/ZQ+O0ke0uBNUqWLEVNVVI5inNgJ8Yy/vVRN 4fOnAZIwNAzUcSusom11Laj4WGEu3jPMvsoGH0Giy812rLQg2THs8pirdoLxn+p29kBa J8MA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@raspberrypi.com header.s=google header.b=beAv55Us; 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=raspberrypi.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u2si2875041edd.517.2020.10.01.03.17.00; Thu, 01 Oct 2020 03:17:23 -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=@raspberrypi.com header.s=google header.b=beAv55Us; 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=raspberrypi.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731839AbgJAKP7 (ORCPT + 99 others); Thu, 1 Oct 2020 06:15:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47116 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725938AbgJAKP7 (ORCPT ); Thu, 1 Oct 2020 06:15:59 -0400 Received: from mail-lf1-x142.google.com (mail-lf1-x142.google.com [IPv6:2a00:1450:4864:20::142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BE2A6C0613D0 for ; Thu, 1 Oct 2020 03:15:58 -0700 (PDT) Received: by mail-lf1-x142.google.com with SMTP id b22so5839751lfs.13 for ; Thu, 01 Oct 2020 03:15:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=sbHB4UppKAenF5cuB/vMr8n45MQRc8w9Jto0vU1UBGI=; b=beAv55UsVyfGF0QS4DSb8YtWr0/kLHdy8m7Y/p3vuAvNYpKj8Er+VNcAzrvV5a2nlI P5CCC9NT2Dh7rpn0ytCR0SxxE/nYyM6ucU+QWymp1zSTe6mTGqB5eV7x7+C+eCFEOnE9 3ZBduzCDBKM3GdWJTemquWib0vXuxiJ7ShPVqqMhQKcwJ2k6mIvHB2tU7jtn0D03ThEu 2QXjy7xpu9fmyJ2oujUuQVzqAr3wReGopQc27sm263SGrZfj2VBYSxrhde1YMimP/ZxN IPLAxgUNwbuO4WrNPX5W5PaD6ohanEcXYl0PxyVM/bEukSoOEYvS7sviOJqjQ5GYVZYo aa6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=sbHB4UppKAenF5cuB/vMr8n45MQRc8w9Jto0vU1UBGI=; b=cGyMRPJKYl2sQeDxFtLR9xz1blq5bDrDwyykZMecW7LZzhsKU0G1SeQO+yDBFa+UTv 8rUIKDcTg10Vb+F59kmdiQlI68W+U3pfiOL3tD3F8HUjrWYfwb5E8Ve9aF7I8UEB+Zug cICwoLawjfx3hRJvhHIo5h4qP0/+Skq9OPEFycxsl1w63CdpwpW8LDN6yveQNiq0padk wKr1fWXUibr0CU+kQUDgA2m7AAqCGj+gL0I9n4yJjBqWbY7FYV94r1Nc0xB05qPOvrWR iGBH3L9NWc0y9MxvYi0+dBS+qPSV7VIPkYb8F69lwwdhSB4z0uwHDJdJcvdF/ucyXXni vUeg== X-Gm-Message-State: AOAM530Bn6MctASk+4JSoMYOsfdqDJPvpRfCVKZWse3dV8IcDsJUsgwP J3pHElWDfbocpSDesyrHR6venWkgmDubFpLYW6oyow== X-Received: by 2002:a19:8044:: with SMTP id b65mr2152189lfd.366.1601547357111; Thu, 01 Oct 2020 03:15:57 -0700 (PDT) MIME-Version: 1.0 References: <20200929221526.GA1370981@ubuntu-m3-large-x86> <20200930140758.gummt3umouva3wyu@gilmour.lan> <20200930163823.GA237050@ubuntu-m3-large-x86> <20201001064843.dlewcu3b7dvqanyy@gilmour.lan> <20201001085402.t6mzzwzplviunhoc@gilmour.lan> In-Reply-To: <20201001085402.t6mzzwzplviunhoc@gilmour.lan> From: Tim Gover Date: Thu, 1 Oct 2020 11:15:46 +0100 Message-ID: Subject: Re: [PATCH v5 80/80] ARM: dts: bcm2711: Enable the display pipeline To: Maxime Ripard Cc: Stefan Wahren , Nathan Chancellor , Nicolas Saenz Julienne , Eric Anholt , Dave Stevenson , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Hoegeun Kwon , Chanwoo Choi , bcm-kernel-feedback-list@broadcom.com, linux-rpi-kernel@lists.infradead.org, Phil Elwell , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org hdmi_enable_4k60=1 causes the firmware to select 3.3 GHz for the PLLC VCO to support a core-frequency of 550 MHz which is the minimum frequency required by the HVS at 4Kp60. The side effect is that if the display clock requirements are lower than 4Kp60 then you will see different core frequencies selected by DVFS. If enable_uart=1 and the mini-uart is selected (default unless bluetooth is disabled) then the firmware will pin the core-frequency to either core_freq max (500 or 550). Although, I think there is a way of pinning it to a lower fixed frequency. The table in overclocking.md defines options for setting the maximum core frequency but unless core_freq_min is specified DVFS will automatically pick the lowest idle frequency required by the display resolution. On Thu, 1 Oct 2020 at 09:54, Maxime Ripard wrote: > > On Thu, Oct 01, 2020 at 08:48:43AM +0200, Maxime Ripard wrote: > > Hi Stefan, > > > > On Wed, Sep 30, 2020 at 06:52:13PM +0200, Stefan Wahren wrote: > > > Am 30.09.20 um 18:38 schrieb Nathan Chancellor: > > > > On Wed, Sep 30, 2020 at 04:07:58PM +0200, Maxime Ripard wrote: > > > >> Hi Nathan, > > > >> > > > >> On Tue, Sep 29, 2020 at 03:15:26PM -0700, Nathan Chancellor wrote: > > > >>> On Thu, Sep 03, 2020 at 10:01:52AM +0200, Maxime Ripard wrote: > > > >>>> Now that all the drivers have been adjusted for it, let's bring in the > > > >>>> necessary device tree changes. > > > >>>> > > > >>>> The VEC and PV3 are left out for now, since it will require a more specific > > > >>>> clock setup. > > > >>>> > > > >>>> Reviewed-by: Dave Stevenson > > > >>>> Tested-by: Chanwoo Choi > > > >>>> Tested-by: Hoegeun Kwon > > > >>>> Tested-by: Stefan Wahren > > > >>>> Signed-off-by: Maxime Ripard > > > >>> Apologies if this has already been reported or have a solution but this > > > >>> patch (and presumably series) breaks output to the serial console after > > > >>> a certain point during init. On Raspbian, I see systemd startup messages > > > >>> then the output just turns into complete garbage. It looks like this > > > >>> patch is merged first in linux-next, which is why my bisect fell on the > > > >>> DRM merge. I am happy to provide whatever information could be helpful > > > >>> for debugging this. I am on the latest version of the firmware > > > >>> (currently 26620cc9a63c6cb9965374d509479b4ee2c30241). > > > >> Unfortunately, the miniUART is in the same clock tree than the core > > > >> clock and will thus have those kind of issues when the core clock is > > > >> changed (which is also something that one should expect when using the > > > >> DRM or other drivers). > > > >> > > > >> The only real workaround there would be to switch to one of the PL011 > > > >> UARTs. I guess we can also somehow make the UART react to the core clock > > > >> frequency changes, but that's going to require some effort > > > >> > > > >> Maxime > > > > Ack, thank you for the reply! There does not really seem to be a whole > > > > ton of documentation around using one of the other PL011 UARTs so for > > > > now, I will just revert this commit locally. > > > > > > there was a patch series & discussion about this topic, but we finally > > > didn't find a rock solid solution. > > > > > > You can have a look at "[RFC 5/5] serial: 8250: bcm2835aux: add notifier > > > to follow clock changes" from 3.4.2019 on linux-rpi-kernel. > > > > I couldn't find that discussion on the archive, but based on the title I > > guess there's some patches that have been merged this cycle for the 8250 > > driver to do just that (868f3ee6e452 ("serial: 8250: Add 8250 port clock > > update method") and cc816969d7b5 ("serial: 8250_dw: Fix common clocks > > usage race condition")). > > > > However, I'm not entirely sure the clock notifier works in our case with > > the firmware / MMIO clocks duality > > I was a bit intrigued by this, so I looked into it, and it seems that > it's worth that it used to be. The core clock is supposed to be running > at 500 Mhz in most cases, and that's what we're setting so it shouldn't > cause any pratical issue. > > However, it looks like on my board now the firmware reports that the > core clock is running at either 311MHz or 233MHz with hdmi_enable_4k60 > (which seems odd?) and that contradicts the documentation here: > https://www.raspberrypi.org/documentation/configuration/config-txt/overclocking.md > > Linux then comes in, changes the frequency to 500MHz and breaks the > UART. So either the doc is wrong, or the clock driver is. > > vcgencmd measure_clock core reports that it's indeed 233Mhz and I'm > running a year-old firmware (built on the 2019-11-29), so I'd be > inclined to think that the doc is wrong here or we're misinterpreting > something. > > Dave, Tim, any idea? > > Thanks! > Maxime