From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3E0A6C41604 for ; Tue, 6 Oct 2020 17:15:38 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D17B3206DD for ; Tue, 6 Oct 2020 17:15:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="gesXePzp"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="KSeuBH5t" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D17B3206DD Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=raspberrypi.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=G50J4cBjq4u3uKk1vLXy350t1pT5qog3RXY0xspG8pE=; b=gesXePzpSDdu0BYwP0gwTwMiE JTo6Cw9XzG1zgRaBCC8Z3GsoUiFn278RWhTPjFTwGcI4JX3xtD0UBiV1F0L+UqPc8NeBQ1p14uYQ2 JGl/AQGcjfwG2Eap8xJ9V2A5srC1mo8qpKhbC95+bDjcnYbVjDp3TyFaGHITMvdkxL+tAH0sFzBqn 8+yCILCUETvcCul4w1GvEMsNM8nD1t7my7Qkr6STGn45YxVp2HxPx67Z68sDO3TZtLpRW4C+LQudP mDNIJoEXZuNtIAHR+kwXA7CutQpUK26jJUENLdi5YQ4PyMC51opSAKzlJZR8Lhn9OkuaF4LZDxmzj n7oRF3b2w==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kPqXh-0002hv-9T; Tue, 06 Oct 2020 17:14:25 +0000 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kPqXe-0002gk-Mq for linux-arm-kernel@lists.infradead.org; Tue, 06 Oct 2020 17:14:23 +0000 Received: by mail-wr1-x441.google.com with SMTP id n15so8596966wrq.2 for ; Tue, 06 Oct 2020 10:14:20 -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=RQkN1upH+slzKJbrqvfok78tbpU8Cenolhq9OlECd6A=; b=KSeuBH5t/vKToC5zcoC+y7kYXjwLeOm8feTMa90733C8BopxSpG0eFIiHU6f2JPIbq Wl8Rla+2of/uHa6ZUKH46vGJVuWPUiRfrfteZyCLXu3MMKhss2k9lztpnTokcp0dHJLc ZX03Qgm23v5lkOsVNWOfWbwvdm/vB59fNtIjvvS4UOctL+ct3k19ARHryUP7wQOmDcdK E7fcfPKg2zfvuKnMZY+AeYrYvqJQQUpvZV7alJ/8JDwSqwYVWn8sKSsmnxULqdg51vh6 Ah9Qo3i5QLGtwRE+EqHUViTgyta+hc0O42FT8wVpXpXUAWLGQSRJX9M5QedGjQEc+MpW U8NA== 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=RQkN1upH+slzKJbrqvfok78tbpU8Cenolhq9OlECd6A=; b=PxssABQj1U3IqPTuH94klSF6HqiOVtAUkvpeK5wUn3KVNBdapTmu0pHXKr2cZygZ85 yPIDzmtG3DtoWOYJtYWyqiuv2hgKZ5Ka28X0xfh1iw9jWQetsa2SM9EZw/2EhG4ldsrO tr9uaig4DCXau/YjnHFUhz0cXrsV+Hw4yEkl81VRAo5KlgqNFmZ5JwlVLECw3YQ59vfv cBXqPL0GG2xtVmfdzdkKUnsfcrgHKR2f2HHQMO3mUTxviPwqUZoCWpUiJKE6VFhzSl3G KcOHoMHeeY/3LSaqaPlYwf9v0+of1aXd9DJM1Xn2ZxzV5pEMGj8s4J4VlqOuXQcCu4U+ U4Sw== X-Gm-Message-State: AOAM531z0G+6Mqiy4sEfV/iWfw8O4QMoc2NeqAqx6yNpmPFxBv0WiXiU DYU1g2c9Bsgkt8r7miVk0umgD+RrlI/aeMCPDT5SxA== X-Google-Smtp-Source: ABdhPJx6JoolLP3mOQPYECXAgK8Q7YDbgX/kE5v0qictkEpeZ+HVDNJCsA+ZQIvOflpmzULotVi7OCEqMN67r0A90lQ= X-Received: by 2002:adf:e806:: with SMTP id o6mr6065570wrm.42.1602004459187; Tue, 06 Oct 2020 10:14:19 -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> <20201006152623.sjc3jxagj4wh7g5f@gilmour.lan> In-Reply-To: <20201006152623.sjc3jxagj4wh7g5f@gilmour.lan> From: Dave Stevenson Date: Tue, 6 Oct 2020 18:14:01 +0100 Message-ID: Subject: Re: [PATCH v5 80/80] ARM: dts: bcm2711: Enable the display pipeline To: Maxime Ripard X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201006_131422_762946_1A5B0B19 X-CRM114-Status: GOOD ( 31.68 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Stefan Wahren , Tim Gover , Chanwoo Choi , LKML , DRI Development , Phil Elwell , Eric Anholt , bcm-kernel-feedback-list@broadcom.com, linux-rpi-kernel@lists.infradead.org, Nathan Chancellor , Hoegeun Kwon , Nicolas Saenz Julienne , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Maxime On Tue, 6 Oct 2020 at 16:26, Maxime Ripard wrote: > > Hi Dave, > > On Fri, Oct 02, 2020 at 04:57:05PM +0100, Dave Stevenson wrote: > > 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. > > I had in mind something like if the clock driver can infer that somehow > through some the boundaries reported by the firmware maybe? IIRC, > hdmi_enable_4kp60 will already change the max frequency reported to > 550MHz instead of 500MHz Yes, that's plausible, but I don't know enough about the clock infrastructure for advertising limits to know what works there. Tell me what you need from the mailbox service and I'll see what I can do. We do already have RPI_FIRMWARE_GET_MAX_CLOCK_RATE and RPI_FIRMWARE_GET_MIN_CLOCK_RATE. It'd take a few minutes of staring at the code (or a quick test) to confirm if they definitely are changed for CORE clock by hdmi_enable_4kp60 - I think it does. Dave _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel