All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
To: Dave Stevenson <dave.stevenson@raspberrypi.com>,
	Stefan Wahren <stefan.wahren@i2se.com>
Cc: Eric Anholt <eric@anholt.net>,
	Florian Fainelli <f.fainelli@gmail.com>,
	linux-rpi-kernel@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org,
	Maxime Ripard <maxime@cerno.tech>
Subject: Re: [PATCH] ARM: dts: bcm283x: Use firmware PM driver for V3D
Date: Fri, 20 Mar 2020 15:43:25 +0100	[thread overview]
Message-ID: <2f198d1afe80e4a4c48703462d63bdb0858fb4a2.camel@suse.de> (raw)
In-Reply-To: <CAPY8ntBB3wwkVj=+fzNRXzAqQs5q5MYmb7t7Be74zADeMCXHVA@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 2525 bytes --]

On Mon, 2020-03-16 at 13:57 +0000, Dave Stevenson wrote:
>  Hi Stefan and Nicolas
> 
> Checking the docs it does state the restriction that Eric quotes.
> 
> HDMI Core Clock (state machine clock)
> Most of the HDMI logic operates on that clock. It
> is asynchronous to system core clock and pixel
> clock. Source for this clock can be chosen from
> various PLLs in the chip. See CPR Manager for
> details.
> 
> This clock is also used for clocking pixel valve
> when HDMI peripheral is used. See Pixel Valve
> for details.axi_clock >= hdmi_core_clock > 108% of
> pixel_clock.
> 
> 
> The default max pixel clock from the firmware side is 162MHz.
> 
> In the firmware source we have a comment
>          // HDMI state machine clock must be faster than pixel clock -
> infinitessimally faster tested in simulation.
>          // Otherwise, exact value is unimportant - for HDMI operation.
>          // hdmi state machine clock now derived from PLLC_PER (typ
> 500MHz, see relevant platform.c).
>          //
>          // However, CEC bit clock is derived from the HSM clock, and
> the (programmable) CEC timing table
>          // is configured for a 40.00kHz CEC clock.
>          const unsigned margin = 1*1000*1000;
>          unsigned min_hsm_clock = margin + timings->pixel_freq;
>          const unsigned max_hsm_clock_for_cec = max(163682864,
> hdmi_pixel_freq_limit);
> 
>          unsigned hdmi_state_machine_clock = max_hsm_clock_for_cec;
> 
> So it adds 1MHz to the pixel clock for min_hsm_clock, but then doesn't
> use the value.
> Unless you do request a higher hdmi_pixel_freq_limit then the HSM is
> running at the same 163.68MHz that Eric's driver hard codes, and our
> max pixel clock is 162MHz.
> Keeping it a fixed value makes sorting the divider for CEC easier.
> 
> Just adopting a 162MHz limit with a suitable comment is probably the
> most sensible move here, and Maxime's patches can pick up the same
> value.

I agree with Dave.

Moreover, this was initially introduced to fix resolution negotiations with 4k
devices, which use higher pixel clocks than HSM_CLOCK_FREQ. I've been reviewing
common HDMI resolutions and 1200p60 seems to be the one closer to RPi's HSM
limitations (as far as widely used aspect ratios are concerned). So I can't
image how setting a smaller than HSM_CLOCK_FREQ limit here is going to break
anything. That said I'm no expert in this area.

Stefan, any opinions? Feel like sending a patch? :)

Regards,
Nicolas


[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-03-20 14:43 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-03 17:32 [PATCH] ARM: dts: bcm283x: Use firmware PM driver for V3D Nicolas Saenz Julienne
2020-03-03 17:32 ` Nicolas Saenz Julienne
2020-03-03 18:17 ` Stefan Wahren
2020-03-03 18:17   ` Stefan Wahren
2020-03-03 18:37   ` Nicolas Saenz Julienne
2020-03-03 18:37     ` Nicolas Saenz Julienne
2020-03-03 19:24     ` Stefan Wahren
2020-03-03 19:24       ` Stefan Wahren
2020-03-05 10:44       ` Nicolas Saenz Julienne
2020-03-05 10:44         ` Nicolas Saenz Julienne
2020-03-06 20:33         ` Stefan Wahren
2020-03-06 20:33           ` Stefan Wahren
2020-03-09 15:41           ` Stefan Wahren
2020-03-09 15:41             ` Stefan Wahren
2020-03-09 19:22             ` Nicolas Saenz Julienne
2020-03-09 19:22               ` Nicolas Saenz Julienne
2020-03-13 13:59               ` Stefan Wahren
2020-03-13 13:59                 ` Stefan Wahren
2020-03-15 19:16                 ` Stefan Wahren
2020-03-16 12:40                   ` Nicolas Saenz Julienne
2020-03-16 13:57                     ` Dave Stevenson
2020-03-20 14:43                       ` Nicolas Saenz Julienne [this message]
2020-03-23 14:56                       ` Maxime Ripard
2020-03-23 15:55                         ` Dave Stevenson
2020-03-23 18:48                           ` Stefan Wahren
2020-03-23 19:10                             ` Dave Stevenson
2020-03-26 12:24 ` Nicolas Saenz Julienne
2020-03-26 12:24   ` Nicolas Saenz Julienne
2020-03-26 17:24   ` Stefan Wahren
2020-03-26 17:24     ` Stefan Wahren
2020-03-27  0:35     ` Florian Fainelli
2020-03-27  0:35       ` Florian Fainelli
2020-03-27 10:41       ` Nicolas Saenz Julienne
2020-03-27 10:41         ` Nicolas Saenz Julienne
2020-03-27 11:24       ` Stefan Wahren
2020-03-27 11:24         ` Stefan Wahren
2020-03-27 12:58 ` Nicolas Saenz Julienne
2020-03-27 12:58   ` Nicolas Saenz Julienne

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2f198d1afe80e4a4c48703462d63bdb0858fb4a2.camel@suse.de \
    --to=nsaenzjulienne@suse.de \
    --cc=dave.stevenson@raspberrypi.com \
    --cc=eric@anholt.net \
    --cc=f.fainelli@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-rpi-kernel@lists.infradead.org \
    --cc=maxime@cerno.tech \
    --cc=stefan.wahren@i2se.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.