Received: by 2002:a4f:b056:0:0:0:0:0 with SMTP id m22csp1388517ivi; Fri, 2 Oct 2020 08:59:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy1+1qcxGF5wFvL9CWyNfJj+prSuCkpFLaCM0CY9XOUFO9T+YA4wNjeKo9izBH9THQjbVSH X-Received: by 2002:a05:6402:1148:: with SMTP id g8mr3109632edw.271.1601654370598; Fri, 02 Oct 2020 08:59:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601654370; cv=none; d=google.com; s=arc-20160816; b=MK9JZR/Fm04xyELTaiVFhgys8wFqMhrNdcwOYJhC6J1gu64434SGcfNJ/jfi5L9qjo 0a260FDmXpKOeoUeX2S4ehEUlxfdtxtZcRRTDjPMk53BX3Q9Rpn8Y/iMrloESiB45c+2 175xQ61acchOLsjamO87rgV4C/4QDhIjacFFJU1Ehq9uW1FzPddwZqL9KI222lLOx6Nj /+a4yC49sx1qw4OIOOfbrhqpumGxit/pWPWKag8FGafiduPbqVvvQIcby3VnolrsBheT M8h0XSkqNRupR/piUyk/E8PLSQPIqspoeOojAJm/akzucr9phv+WyUaWzkq+zBKhY1VM V4zw== 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=RKAvB3+WMKNN79UahsqcncMsVNqOcgEb3CYVYKIldnE=; b=T42IOCBOD9yai+gK0HIVwvrH8kPCMRINAr2An+xCoqcJNUWbUo+Sw8WuTyCkuCGTHT E0cN3wWpngreaxi+Xb1dmse35pxm2qeoPug8QrdIfsnR7XpJQ39R4u9gC8jg80p/5p2d ggMn8iZR8mNmIoqPjjL3nSJJ8UlTzIpkaj+k1wWMudqwF6JjveXCzZqHHXqc54h71sZ6 Cp3zLAUoDiulB8PZHOPFCpMiDtUui3ZFr8mhX/9PgUb9LlqwQQm4hbPeKbhU3CJm47qm kO09hMcYmqaCi7OpeS7E6eZdKbFiJYVhpMwr5IaM3L6AaybMM6BtJkXOORZCOEenbD5Z cl+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@raspberrypi.com header.s=google header.b=avZDU7go; 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 z8si1478543edp.90.2020.10.02.08.59.07; Fri, 02 Oct 2020 08:59:30 -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=avZDU7go; 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 S2388089AbgJBP50 (ORCPT + 99 others); Fri, 2 Oct 2020 11:57:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39896 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726017AbgJBP5Z (ORCPT ); Fri, 2 Oct 2020 11:57:25 -0400 Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 20966C0613D0 for ; Fri, 2 Oct 2020 08:57:25 -0700 (PDT) Received: by mail-wr1-x444.google.com with SMTP id w5so2359745wrp.8 for ; Fri, 02 Oct 2020 08:57:25 -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=RKAvB3+WMKNN79UahsqcncMsVNqOcgEb3CYVYKIldnE=; b=avZDU7go3+yv2IeEagTPM8GH/4BJn08wqf5PQiplnVADu+OAvfUcqmRM1af3wCvl+u RFO+xnZ8SUVbzCHkhjKXkZRtfQTiSQU9AtLUK4ZL3ePXVt8v7zC2Yl3mmc07FaJ2vViy GzroUTM1aHOB6qAlZpGSgBAwsdUHsPVAq43hfKmoNvDrtcDMnwviGJkWEPim3xt0mlO6 POEMXBQD10jxyvHgVOQ50LlCv9hSQhnGMGVAfHQ7l5zQZ9Zqw44YKhjZ2rXog0hiBNKi WJKEljWSN3mkOzpn3P9G8oCaAeEQ10F8YeNaegkg930nU8gpVYGuEJsfSc+0YAjzvFNi dezg== 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=RKAvB3+WMKNN79UahsqcncMsVNqOcgEb3CYVYKIldnE=; b=OcFi+JufJSrW8jvfTFJBxOHsB/aniSzljtGBbg2fgc6NuAu1Xf1TjREt0HrJurpjIV T6M3HfoMenZUNwwZN6Aj4Jvn4hAUFF/8/Ad0kA4Cw1FzHwFPN1ZV1Im8sxccdK/SzXkz KVNL5sIejgGH0dMvYNIQ93U/a+hQ5e8uDVnhwNC/x3I9SbgoxjuuMW3WVyt7d3Wmik6l iYQkU/TFsaQwN4LPH7Ejv1QcQiskTzOFJ3d5pAdLUH+zcsqW6Xk1WlTQDVBce3awN9DQ ZTifwBqtAO4pp5htveaOGl/WDCod5zWSa1MbDYDUTzlQL0AdfwzOoGNkZ+q0mAwTIjV2 0uGA== X-Gm-Message-State: AOAM5319qLkGQlSTvJrt32raTJgjd7sG4VgK6J1ZiDT1km5MWXShPCoy KDatJpkZ2CXbVaDbqEF7/xu5iSxXkcPT491YKAGBIQ== X-Received: by 2002:adf:fa02:: with SMTP id m2mr3765016wrr.273.1601654243794; Fri, 02 Oct 2020 08:57:23 -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> <20201002151954.wazqc5riesdomlpx@gilmour.lan> In-Reply-To: <20201002151954.wazqc5riesdomlpx@gilmour.lan> From: Dave Stevenson Date: Fri, 2 Oct 2020 16:57:05 +0100 Message-ID: Subject: Re: [PATCH v5 80/80] ARM: dts: bcm2711: Enable the display pipeline To: Maxime Ripard Cc: Tim Gover , Stefan Wahren , Nathan Chancellor , Nicolas Saenz Julienne , Eric Anholt , LKML , DRI Development , 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 Hi Maxime On Fri, 2 Oct 2020 at 16:19, Maxime Ripard wrote: > > Hi Tim, > > On Thu, Oct 01, 2020 at 11:15:46AM +0100, Tim Gover wrote: > > 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. > > I'm wondering if there's some way to detect this from Linux? I guess it > would be nice to be able to at least detect a broken config to warn / > prevent an user that their situation is not going to be reliable / work > really well (like if they have a 4k display without hdmi_enable_4kp60 > set, or the issue we're discussing here) The main filter in the firmware is the parameter hdmi_pixel_freq_limit. That can either be set manually from config.txt, or defaults appropriately based on hdmi_enable_4kp60. Under firmware_kms [1] I read back those values to use as a filter within crtc_mode_valid[2]. I can't think of a nice way of exposing that without the vc4 driver gaining a DT link to the firmware, and that starts to get ugly. Dave [1] https://github.com/raspberrypi/linux/blob/rpi-5.9.y/drivers/gpu/drm/vc4/vc4_firmware_kms.c#L1859 [2] https://github.com/raspberrypi/linux/blob/rpi-5.9.y/drivers/gpu/drm/vc4/vc4_firmware_kms.c#L1077