Home
last modified time | relevance | path

Searched hist:"2 c17a4368aad2b88b68e4390c819e226cf320f70" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/drivers/gpu/drm/sun4i/
H A Dsun4i_tcon.cdiff 58b3d02f066e5b1480d80bd308c545526eea3250 Wed Jun 13 03:16:47 CDT 2018 Paul Kocialkowski <paul.kocialkowski@bootlin.com> Revert "drm/sun4i: Handle DRM_BUS_FLAG_PIXDATA_*EDGE"

This reverts commit 2c17a4368aad2b88b68e4390c819e226cf320f70.

The offending commit triggers a run-time fault when accessing the panel
element of the sun4i_tcon structure when no such panel is attached.

It was apparently assumed in said commit that a panel is always used with
the TCON. Although it is often the case, this is not always true.
For instance a bridge might be used instead of a panel.

This issue was discovered using an A13-OLinuXino, that uses the TCON
in RGB mode for a simple DAC-based VGA bridge.

Cc: stable@vger.kernel.org
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180613081647.31183-1-paul.kocialkowski@bootlin.com
diff 2c17a4368aad2b88b68e4390c819e226cf320f70 Tue Mar 13 12:54:37 CDT 2018 Giulio Benetti <giulio.benetti@micronovasrl.com> drm/sun4i: Handle DRM_BUS_FLAG_PIXDATA_*EDGE

Handle both positive and negative dclk polarity,
according to bus_flags, taking care of this:

On A20 and similar SoCs, the only way to achieve Positive Edge
(Rising Edge), is setting dclk clock phase to 2/3(240°).
By default TCON works in Negative Edge(Falling Edge), this is why phase
is set to 0 in that case.
Unfortunately there's no way to logically invert dclk through IO_POL
register.
The only acceptable way to work, triple checked with scope,
is using clock phase set to 0° for Negative Edge and set to 240° for
Positive Edge.
On A33 and similar SoCs there would be a 90° phase option, but it divides
also dclk by 2.
This patch is a way to avoid quirks all around TCON and DOTCLOCK drivers
for using A33 90° phase divided by 2 and consequently increase code
complexity.

Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1520963677-124239-1-git-send-email-giulio.benetti@micronovasrl.com