]> git.baikalelectronics.ru Git - kernel.git/commit
drm/bridge: ti-sn65dsi86: Use 18-bit DP if we can
authorDouglas Anderson <dianders@chromium.org>
Wed, 18 Dec 2019 22:35:27 +0000 (14:35 -0800)
committerNeil Armstrong <narmstrong@baylibre.com>
Thu, 13 Feb 2020 09:21:45 +0000 (10:21 +0100)
commitb5a55bfc8dee238d874d9dd49193fe70a111a8e6
tree06bd109320d55735e8a7b45934146384d778f43b
parentddfd5ef7c9ac36659f542eda686e2dc0f60d9f09
drm/bridge: ti-sn65dsi86: Use 18-bit DP if we can

The current bridge driver always forced us to use 24 bits per pixel
over the DP link.  This is a waste if you are hooked up to a panel
that only supports 6 bits per color or fewer, since in that case you
can run at 18 bits per pixel and thus end up at a lower DP clock rate.

Let's support this.

While at it, let's clean up the math in the function to avoid rounding
errors (and round in the correct direction when we have to round).
Numbers are sufficiently small (because mode->clock is in kHz) that we
don't need to worry about integer overflow.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Tested-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
[narmstrong: s/ran/can/]
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191218143416.v3.6.Iaf8d698f4e5253d658ae283d2fd07268076a7c27@changeid
drivers/gpu/drm/bridge/ti-sn65dsi86.c