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=-8.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 5DCB2C4363C for ; Fri, 2 Oct 2020 15:57:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 11E75206FA for ; Fri, 2 Oct 2020 15:57:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="avZDU7go" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388099AbgJBP50 (ORCPT ); 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-Google-Smtp-Source: ABdhPJxwrWnm+dIu+CTA7AHImJjo0wrCfg7Coce7eyfVsTucN19FAy0Kl9BsdVtITTMsbzxPFLnGj/dMkoXGrlM33Yg= 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 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=-8.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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 E0C93C4363C for ; Fri, 2 Oct 2020 15:58:48 +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 728342074B for ; Fri, 2 Oct 2020 15:58:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="n1ujTr9o"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="avZDU7go" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 728342074B 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=q8V2sighGl4hemo4qJreRFX0a6VgNcf/D/0jJlojKXw=; b=n1ujTr9oPqz3Iy4NniwnDdnnb oR+6AFjGs/yfKfjHFXbC+MiD7kZzpRMBGelYTadrskPvVYxw8ahlJJkwodFrAbxei61cB9S1H/Wrq GXYtthYIE8yFUoSdQ5MsYsBJ7R0Bh+EpVLPsACuufxYId3kdE9dF5llBnEX3QE2MgR5T80mhiVuCq VX2srzd1wRuyWn6YANFM2mytTXzmjRwX7ZTF90QU1eiblqvTqthqTHO1qPPXIkJc/yFCU7eofYxhB CSp1QTcAiTqZ2Q76HWS4OLnazqyFyYYRNdX+bIPjXiqUCEmsAb8zViXS6pO1bvLjbdBNPnz2eunQc eka9ZoEtQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kONR5-0006tS-0F; Fri, 02 Oct 2020 15:57:31 +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 1kONR0-0006rj-Sj for linux-arm-kernel@lists.infradead.org; Fri, 02 Oct 2020 15:57:28 +0000 Received: by mail-wr1-x441.google.com with SMTP id s12so2355051wrw.11 for ; Fri, 02 Oct 2020 08:57:24 -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=gVeW304wmJAhKlvXz/vAK2u4gk2mjC64bfAGjP/wzk6nlCUfbGUhrBowOo8Vqn/x3J W0w7yEzGQo6tX/Kz2iBpLHdUe3VLl0ococcgu2fT0/kGyEJQqkWxcY3sxsUqW0RfLe4m 9cccVjnAIJbGXAvOpP6UYNOyLMfWqCpqIzt4pXkvD5GBt5I/Cmz8eZ1drjudfPY389Np 3dU/fws0y3kGHv6rUqfAPHFN6wNXD+2sd8vOKtq2GTlZgcAoO2Zm3Fdgx0iIey7gBlgS L11Kzj3hiPmDhmkFqu20BsGrwUG2MPI44GGUZ1Te1rRS181i6Jrz5pnY89Ed0Q0+l1ce ymww== X-Gm-Message-State: AOAM533cPXBOl+QpD17TTZd1O+EGzAa3i7QVQQNck0j7r8hGno8ib3mn ze3rm9kwWTXaaJca3hE3UdxdU1fiqogb6wZEaLFYNA== X-Google-Smtp-Source: ABdhPJxwrWnm+dIu+CTA7AHImJjo0wrCfg7Coce7eyfVsTucN19FAy0Kl9BsdVtITTMsbzxPFLnGj/dMkoXGrlM33Yg= 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201002_115727_023945_87A92815 X-CRM114-Status: GOOD ( 22.29 ) 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 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel 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=-8.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 E01F4C35257 for ; Fri, 2 Oct 2020 15:57:27 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 89D912074B for ; Fri, 2 Oct 2020 15:57:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="avZDU7go" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 89D912074B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=raspberrypi.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id AF1BC6E0D8; Fri, 2 Oct 2020 15:57:26 +0000 (UTC) Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by gabe.freedesktop.org (Postfix) with ESMTPS id 194116E0D8 for ; Fri, 2 Oct 2020 15:57:25 +0000 (UTC) Received: by mail-wr1-x443.google.com with SMTP id z1so2376048wrt.3 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=mMt5QUEvR91DNHzev4DfE5BKW0S6cO9Pne3vsgl6VhtS+TBbhELb+AgOBwS9HsamUT tNqiLZq8gMtKdgG+QL5suKCFj5CAlqUh546rwZaaJkEpFoAqDs8C1mY/sw/myLxEh+So sNQv/aDdAdWihe27BctBMr92/r56BB55ui3DwGlPReN1LGlAxVwVJBqb1W02/4J1QUhb ot4NpBGPqTPXPpzimJ4R51LZZ140pRFe4QFtmrU5e8mxvhyfPRLLGT1x/s4rPt5Sk/mL O6s+uxrhnN1pSjg1P0UDpXUjoTeip+FrQuR3OcSDPEwPpJZqafoU5eMum2v4Dpm4Dgfj x25w== X-Gm-Message-State: AOAM530RVQsRfcm4KhvvGq9RjRuFB/vmab1mpIQ+9bGpMsyz5VuzMV2C jsr8wu3PA6Jo6VzqqArLoJJFAqXFzMiXh30niS1EMA== X-Google-Smtp-Source: ABdhPJxwrWnm+dIu+CTA7AHImJjo0wrCfg7Coce7eyfVsTucN19FAy0Kl9BsdVtITTMsbzxPFLnGj/dMkoXGrlM33Yg= 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 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Stefan Wahren , Tim Gover , Chanwoo Choi , LKML , DRI Development , Phil Elwell , 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 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel