On Thu, Oct 13, 2022 at 12:12 AM Marek Vasut <ma...@denx.de> wrote:

> The RTNI field is multiplied by 16 and incremented by 512 before being
> used as the minimum number of pixel clock per horizontal line, hence
> it is necessary to subtract those 512 bytes from htotal and then divide
> the result by 16 before writing the value into the RTNI field. Fix the
> calculation.
>
> Fixes: de2b4917843c ("drm/panel/panel-sitronix-st7701: Infer horizontal pixel 
> count from TFT mode")
> Signed-off-by: Marek Vasut <ma...@denx.de>
> ---
> Cc: Guido Günther <a...@sigxcpu.org>
> Cc: Jagan Teki <ja...@amarulasolutions.com>
> Cc: Laurent Pinchart <laurent.pinch...@ideasonboard.com>
> Cc: Linus Walleij <linus.wall...@linaro.org>
> Cc: Sam Ravnborg <s...@ravnborg.org>
> Cc: Thierry Reding <thierry.red...@gmail.com>
> ---
> V2: Clamp the htotal to range 512...1008, so RTNI always fits the bitfield

I tried to apply this to drm-misc-fixes but the branch has not yet
been moved forward to v6.1-rc1.

Yours,
Linus Walleij

Reply via email to