Tomi Valkeinen
fd70c7755b
drm/bridge: tc358767: fix max_tu_symbol value
...
max_tu_symbol was programmed to TU_SIZE_RECOMMENDED - 1, which is not
what the spec says. The spec says:
roundup ((input active video bandwidth in bytes/output active video
bandwidth in bytes) * tu_size)
It is not quite clear what the above means, but calculating
max_tu_symbol = (input Bps / output Bps) * tu_size seems to work and
fixes the issues seen.
This fixes artifacts in some videomodes (e.g. 1024x768@60 on 2-lanes &
1.62Gbps was pretty bad for me).
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com >
Tested-by: Jyri Sarha <jsarha@ti.com >
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190924131702.9988-1-tomi.valkeinen@ti.com
2019-10-10 11:15:45 +02:00
Sam Ravnborg
7bb0a60aa5
drm/bridge: tc358767: fix opencoded use of drm_panel_*
...
Replace open coded version with call to drm_panel_get_modes().
Include change to deal with the possible negative
return values from drm_panel_get_modes()
v2:
- Added more info to changelog (Philipp)
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de >
Reviewed-by: Emil Velikov <emil.velikov@collabora.com >
Cc: Andrzej Hajda <a.hajda@samsung.com >
Cc: Neil Armstrong <narmstrong@baylibre.com >
Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com >
Cc: Jonas Karlman <jonas@kwiboo.se >
Cc: Jernej Skrabec <jernej.skrabec@siol.net >
Link: https://patchwork.freedesktop.org/patch/msgid/20190804201637.1240-2-sam@ravnborg.org
2019-08-10 15:41:47 +02:00
Lucas Stach
52c2197aae
drm/bridge: tc358767: do a software reset if reset pin isn't connected
...
To get the chip into the expected state, even when the hardware reset pin
isn't connected, do a software reset in this case. It isn't as thorough as
the hardware reset, as the I2C communication block can not be reset for
obvious reasons, but it's getting the chip into a defined state.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de >
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190627085958.28331-1-l.stach@pengutronix.de
2019-07-01 12:31:18 +02:00
Andrey Smirnov
fdb29b7380
drm/bridge: tc358767: Add support for address-only I2C transfers
...
Transfer size of zero means a request to do an address-only
transfer. Since the HW support this, we probably shouldn't be just
ignoring such requests. While at it allow DP_AUX_I2C_MOT flag to pass
through, since it is supported by the HW as well.
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com >
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com >
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com >
Cc: Andrzej Hajda <a.hajda@samsung.com >
Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com >
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com >
Cc: Andrey Gusakov <andrey.gusakov@cogentembedded.com >
Cc: Philipp Zabel <p.zabel@pengutronix.de >
Cc: Cory Tusar <cory.tusar@zii.aero >
Cc: Chris Healy <cphealy@gmail.com >
Cc: Lucas Stach <l.stach@pengutronix.de >
Cc: dri-devel@lists.freedesktop.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190619052716.16831-16-andrew.smirnov@gmail.com
2019-06-27 13:38:24 +02:00
Andrey Smirnov
32d3621996
drm/bridge: tc358767: Replace magic number in tc_main_link_enable()
...
We don't need 8 byte array, DP_LINK_STATUS_SIZE (6) should be
enough. This also gets rid of a magic number as a bonus.
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com >
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com >
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com >
Cc: Andrzej Hajda <a.hajda@samsung.com >
Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com >
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com >
Cc: Andrey Gusakov <andrey.gusakov@cogentembedded.com >
Cc: Philipp Zabel <p.zabel@pengutronix.de >
Cc: Cory Tusar <cory.tusar@zii.aero >
Cc: Chris Healy <cphealy@gmail.com >
Cc: Lucas Stach <l.stach@pengutronix.de >
Cc: dri-devel@lists.freedesktop.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190619052716.16831-15-andrew.smirnov@gmail.com
2019-06-27 13:38:21 +02:00
Andrey Smirnov
d174db0788
drm/bridge: tc358767: Drop unnecessary 8 byte buffer
...
tc_get_display_props() never reads more than a byte via AUX, so
there's no need to reserve 8 for that purpose. No function change
intended.
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com >
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com >
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com >
Cc: Andrzej Hajda <a.hajda@samsung.com >
Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com >
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com >
Cc: Andrey Gusakov <andrey.gusakov@cogentembedded.com >
Cc: Philipp Zabel <p.zabel@pengutronix.de >
Cc: Cory Tusar <cory.tusar@zii.aero >
Cc: Chris Healy <cphealy@gmail.com >
Cc: Lucas Stach <l.stach@pengutronix.de >
Cc: dri-devel@lists.freedesktop.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190619052716.16831-14-andrew.smirnov@gmail.com
2019-06-27 13:38:19 +02:00
Andrey Smirnov
7264892648
drm/bridge: tc358767: Simplify tc_aux_wait_busy()
...
We never pass anything but 100 as timeout_ms to tc_aux_wait_busy(), so
we may as well hardcode that value and simplify function's signature.
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com >
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com >
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com >
Cc: Andrzej Hajda <a.hajda@samsung.com >
Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com >
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com >
Cc: Andrey Gusakov <andrey.gusakov@cogentembedded.com >
Cc: Philipp Zabel <p.zabel@pengutronix.de >
Cc: Cory Tusar <cory.tusar@zii.aero >
Cc: Chris Healy <cphealy@gmail.com >
Cc: Lucas Stach <l.stach@pengutronix.de >
Cc: dri-devel@lists.freedesktop.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190619052716.16831-13-andrew.smirnov@gmail.com
2019-06-27 13:38:17 +02:00
Andrey Smirnov
134fb306b1
drm/bridge: tc358767: Introduce tc_pllupdate()
...
tc_wait_pll_lock() is always called as a follow-up for updating
PLLUPDATE and PLLEN bit of a given PLL control register. To simplify
things, merge the two operation into a single helper function
tc_pllupdate() and convert the rest of the code to use it. No
functional change intended.
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com >
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com >
Cc: Andrzej Hajda <a.hajda@samsung.com >
Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com >
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com >
Cc: Andrey Gusakov <andrey.gusakov@cogentembedded.com >
Cc: Philipp Zabel <p.zabel@pengutronix.de >
Cc: Cory Tusar <cory.tusar@zii.aero >
Cc: Chris Healy <cphealy@gmail.com >
Cc: Lucas Stach <l.stach@pengutronix.de >
Cc: dri-devel@lists.freedesktop.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190619052716.16831-12-andrew.smirnov@gmail.com
2019-06-27 13:38:13 +02:00
Andrey Smirnov
c49f60dfbf
drm/bridge: tc358767: Introduce tc_set_syspllparam()
...
Move common code converting clock rate to an appropriate constant and
configuring SYS_PLLPARAM register into a separate routine and convert
the rest of the code to use it. No functional change intended.
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com >
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com >
Cc: Andrzej Hajda <a.hajda@samsung.com >
Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com >
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com >
Cc: Andrey Gusakov <andrey.gusakov@cogentembedded.com >
Cc: Philipp Zabel <p.zabel@pengutronix.de >
Cc: Chris Healy <cphealy@gmail.com >
Cc: Cory Tusar <cory.tusar@zii.aero >
Cc: Lucas Stach <l.stach@pengutronix.de >
Cc: dri-devel@lists.freedesktop.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190619052716.16831-11-andrew.smirnov@gmail.com
2019-06-27 13:38:08 +02:00
Andrey Smirnov
12dfe7c4d9
drm/bridge: tc358767: Use reported AUX transfer size
...
Don't assume that requested data transfer size is the same as amount
of data that was transferred. Change the code to get that information
from DP0_AUXSTATUS instead.
Since the check for AUX_BUSY in tc_aux_get_status() is pointless (it
will always called after tc_aux_wait_busy()) and there's only one user
of it, inline its code into tc_aux_transfer() instead of trying to
accommodate the change above.
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com >
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com >
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com >
Cc: Andrzej Hajda <a.hajda@samsung.com >
Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com >
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com >
Cc: Andrey Gusakov <andrey.gusakov@cogentembedded.com >
Cc: Philipp Zabel <p.zabel@pengutronix.de >
Cc: Cory Tusar <cory.tusar@zii.aero >
Cc: Chris Healy <cphealy@gmail.com >
Cc: Lucas Stach <l.stach@pengutronix.de >
Cc: dri-devel@lists.freedesktop.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190619052716.16831-10-andrew.smirnov@gmail.com
2019-06-27 13:38:00 +02:00
Andrey Smirnov
e0655feaec
drm/bridge: tc358767: Increase AUX transfer length limit
...
According to the datasheet tc358767 can transfer up to 16 bytes via
its AUX channel, so the artificial limit of 8 appears to be too
low. However only up to 15-bytes seem to be actually supported and
trying to use 16-byte transfers results in transfers failing
sporadically (with bogus status in case of I2C transfers), so limit it
to 15.
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com >
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com >
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com >
Cc: Andrzej Hajda <a.hajda@samsung.com >
Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com >
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com >
Cc: Andrey Gusakov <andrey.gusakov@cogentembedded.com >
Cc: Philipp Zabel <p.zabel@pengutronix.de >
Cc: Cory Tusar <cory.tusar@zii.aero >
Cc: Chris Healy <cphealy@gmail.com >
Cc: Lucas Stach <l.stach@pengutronix.de >
Cc: dri-devel@lists.freedesktop.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190619052716.16831-9-andrew.smirnov@gmail.com
2019-06-27 13:37:55 +02:00
Andrey Smirnov
792a081a1b
drm/bridge: tc358767: Simplify AUX data write
...
Simplify AUX data write by dropping index arithmetic and shifting and
replacing it with a call to a helper function that does two things:
1. Copies user-provided data into a write buffer
2. Transfers contents of the write buffer to up to 4 32-bit
registers on the chip
Note that separate data endianness fix:
tmp = (tmp << 8) | buf[i];
that was reserved for DP_AUX_I2C_WRITE looks really strange, since it
will place data differently depending on the passed user-data
size. E.g. for a write of 1 byte, data transferred to the chip would
look like:
[byte0] [dummy1] [dummy2] [dummy3]
whereas for a write of 4 bytes we'd get:
[byte3] [byte2] [byte1] [byte0]
Since there's no indication in the datasheet that I2C write buffer
should be treated differently than AUX write buffer and no comment in
the original code explaining why it was done this way, that special
I2C write buffer transformation was dropped in this patch.
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com >
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com >
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com >
Cc: Andrzej Hajda <a.hajda@samsung.com >
Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com >
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com >
Cc: Andrey Gusakov <andrey.gusakov@cogentembedded.com >
Cc: Philipp Zabel <p.zabel@pengutronix.de >
Cc: Cory Tusar <cory.tusar@zii.aero >
Cc: Chris Healy <cphealy@gmail.com >
Cc: Lucas Stach <l.stach@pengutronix.de >
Cc: dri-devel@lists.freedesktop.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190619052716.16831-8-andrew.smirnov@gmail.com
2019-06-27 13:37:48 +02:00
Andrey Smirnov
53b166dca5
drm/bridge: tc358767: Simplify AUX data read
...
Simplify AUX data read by removing index arithmetic and shifting with
a helper function that does two things:
1. Fetch data from up to 4 32-bit registers from the chip
2. Copy read data into user provided array.
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com >
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com >
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com >
Cc: Andrzej Hajda <a.hajda@samsung.com >
Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com >
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com >
Cc: Andrey Gusakov <andrey.gusakov@cogentembedded.com >
Cc: Philipp Zabel <p.zabel@pengutronix.de >
Cc: Cory Tusar <cory.tusar@zii.aero >
Cc: Chris Healy <cphealy@gmail.com >
Cc: Lucas Stach <l.stach@pengutronix.de >
Cc: dri-devel@lists.freedesktop.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190619052716.16831-7-andrew.smirnov@gmail.com
2019-06-27 13:37:40 +02:00
Andrey Smirnov
6d0c383159
drm/bridge: tc358767: Drop custom tc_write()/tc_read() accessors
...
A very unfortunate aspect of tc_write()/tc_read() macro helpers is
that they capture quite a bit of context around them and thus require
the caller to have magic variables 'ret' and 'tc' as well as label
'err'. That makes a number of code paths rather counter-intuitive and
somewhat clunky, for example tc_stream_clock_calc() ends up being like
this:
int ret;
tc_write(DP0_VIDMNGEN1, 32768);
return 0;
err:
return ret;
which is rather surprising when you read the code for the first
time. Since those helpers arguably aren't really saving that much code
and there's no way of fixing them without making them too verbose to
be worth it change the driver code to not use them at all.
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com >
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com >
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com >
Cc: Andrzej Hajda <a.hajda@samsung.com >
Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com >
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com >
Cc: Andrey Gusakov <andrey.gusakov@cogentembedded.com >
Cc: Philipp Zabel <p.zabel@pengutronix.de >
Cc: Cory Tusar <cory.tusar@zii.aero >
Cc: Chris Healy <cphealy@gmail.com >
Cc: Lucas Stach <l.stach@pengutronix.de >
Cc: dri-devel@lists.freedesktop.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190619052716.16831-6-andrew.smirnov@gmail.com
2019-06-27 13:37:31 +02:00
Andrey Smirnov
3f072c304c
drm/bridge: tc358767: Simplify tc_set_video_mode()
...
Simplify tc_set_video_mode() by replacing explicit shifting using
macros from <linux/bitfield.h>. No functional change intended.
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com >
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com >
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com >
Cc: Andrzej Hajda <a.hajda@samsung.com >
Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com >
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com >
Cc: Andrey Gusakov <andrey.gusakov@cogentembedded.com >
Cc: Philipp Zabel <p.zabel@pengutronix.de >
Cc: Cory Tusar <cory.tusar@zii.aero >
Cc: Chris Healy <cphealy@gmail.com >
Cc: Lucas Stach <l.stach@pengutronix.de >
Cc: dri-devel@lists.freedesktop.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190619052716.16831-5-andrew.smirnov@gmail.com
2019-06-27 13:37:21 +02:00
Andrey Smirnov
aa92213f38
drm/bridge: tc358767: Simplify polling in tc_link_training()
...
Replace explicit polling in tc_link_training() with equivalent call to
tc_poll_timeout() for simplicity. No functional change intended (not
including slightly altered debug output).
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com >
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com >
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com >
Cc: Andrzej Hajda <a.hajda@samsung.com >
Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com >
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com >
Cc: Andrey Gusakov <andrey.gusakov@cogentembedded.com >
Cc: Philipp Zabel <p.zabel@pengutronix.de >
Cc: Cory Tusar <cory.tusar@zii.aero >
Cc: Chris Healy <cphealy@gmail.com >
Cc: Lucas Stach <l.stach@pengutronix.de >
Cc: dri-devel@lists.freedesktop.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190619052716.16831-4-andrew.smirnov@gmail.com
2019-06-27 13:37:15 +02:00
Andrey Smirnov
ebcce4e642
drm/bridge: tc358767: Simplify polling in tc_main_link_setup()
...
Replace explicit polling loop with equivalent call to
tc_poll_timeout() for brevity. No functional change intended.
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com >
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com >
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com >
Cc: Andrzej Hajda <a.hajda@samsung.com >
Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com >
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com >
Cc: Andrey Gusakov <andrey.gusakov@cogentembedded.com >
Cc: Philipp Zabel <p.zabel@pengutronix.de >
Cc: Cory Tusar <cory.tusar@zii.aero >
Cc: Chris Healy <cphealy@gmail.com >
Cc: Lucas Stach <l.stach@pengutronix.de >
Cc: dri-devel@lists.freedesktop.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190619052716.16831-3-andrew.smirnov@gmail.com
2019-06-27 13:37:09 +02:00
Andrey Smirnov
93a105694f
drm/bridge: tc358767: Simplify tc_poll_timeout()
...
Implementation of tc_poll_timeout() is almost a 100% copy-and-paste of
the code for regmap_read_poll_timeout(). Replace copied code with a
call to the original. While at it change tc_poll_timeout to accept
"struct tc_data *" instead of "struct regmap *" for brevity. No
functional change intended.
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com >
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com >
Cc: Andrzej Hajda <a.hajda@samsung.com >
Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com >
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com >
Cc: Andrey Gusakov <andrey.gusakov@cogentembedded.com >
Cc: Philipp Zabel <p.zabel@pengutronix.de >
Cc: Cory Tusar <cory.tusar@zii.aero >
Cc: Chris Healy <cphealy@gmail.com >
Cc: Lucas Stach <l.stach@pengutronix.de >
Cc: dri-devel@lists.freedesktop.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190619052716.16831-2-andrew.smirnov@gmail.com
2019-06-27 13:37:01 +02:00
Daniel Vetter
52d2d44eee
Merge v5.2-rc5 into drm-next
...
Maarten needs -rc4 backmerged so he can pull in the fbcon notifier
removal topic branch into drm-misc-next.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
2019-06-19 12:07:29 +02:00
Tomi Valkeinen
f25ee5017e
drm/bridge: tc358767: add IRQ and HPD support
...
Add support for interrupt and hotplug handling. Both are optional.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com >
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com >
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190528082747.3631-24-tomi.valkeinen@ti.com
2019-05-31 15:41:31 +02:00
Tomi Valkeinen
af9526f262
drm/bridge: tc358767: add GPIO & interrupt registers
...
Add GPIO and interrupt related registers for HPD work. Mark INTSTS_G and
GPIOI as volatile.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com >
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com >
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190528082747.3631-23-tomi.valkeinen@ti.com
2019-05-31 15:41:30 +02:00
Tomi Valkeinen
3231573065
drm/bridge: tc358767: read display_props in get_modes()
...
We need to know the link bandwidth to filter out modes we cannot
support, so we need to have read the display props before doing the
filtering.
To ensure we have up to date display props, call tc_get_display_props()
in the beginning of tc_connector_get_modes().
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com >
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com >
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190528082747.3631-22-tomi.valkeinen@ti.com
2019-05-31 15:41:29 +02:00
Tomi Valkeinen
46648a3cec
drm/bridge: tc358767: copy the mode data, instead of storing the pointer
...
In tc_bridge_mode_set callback, we store the pointer to the given
drm_display_mode, and use the mode later. Storing a pointer in such a
way looks very suspicious to me, and I have observed odd issues where
the timings were apparently (at least mostly) zero.
Do a copy of the drm_display_mode instead to ensure we don't refer to
freed/modified data.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com >
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com >
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190528082747.3631-21-tomi.valkeinen@ti.com
2019-05-31 15:41:29 +02:00
Tomi Valkeinen
0cdb42f313
drm/bridge: tc358767: remove tc_connector_best_encoder
...
drm_connector_helper_funcs.best_encoder is only needed when the
connector can have more than one encoder, and that is never the case
here.
So remove tc_connector_best_encoder.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com >
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190528082747.3631-20-tomi.valkeinen@ti.com
2019-05-31 15:41:28 +02:00
Tomi Valkeinen
4647a64fd5
drm/bridge: tc358767: use bridge mode_valid
...
We have tc_connector_mode_valid() to filter out videomdoes that the
tc358767 cannot support. As it is a bridge limitation, change the code
to use drm_bridge_funcs's mode_valid instead.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com >
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190528082747.3631-19-tomi.valkeinen@ti.com
2019-05-31 15:41:27 +02:00
Tomi Valkeinen
2792c152a8
drm/bridge: tc358767: remove check for video mode in link enable
...
tc_main_link_enable() checks if videomode has been set, and fails if
there's no videomode. As tc_main_link_enable() no longer depends on the
videomode, we can drop the check.
Also, while tc_stream_enable() does depend on the videomode, we can
expect that a mode has been set before drm_bridge_funcs.enable is
called, so we don't need the check there either.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com >
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com >
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190528082747.3631-18-tomi.valkeinen@ti.com
2019-05-31 15:41:26 +02:00
Tomi Valkeinen
f953835776
drm/bridge: tc358767: clean-up link training
...
The current link training code does unnecessary retry-loops, and does
extra writes to the registers. It is easier to follow the flow and
ensure it's similar to Toshiba's documentation if we deal with LT inside
tc_main_link_enable() function.
This patch adds tc_wait_link_training() which handles waiting for the LT
phase to finish, and does the necessary LT register setups in
tc_main_link_enable, without extra loops.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com >
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com >
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190528082747.3631-17-tomi.valkeinen@ti.com
2019-05-31 15:41:26 +02:00
Tomi Valkeinen
0bf2514651
drm/bridge: tc358767: cleanup LT result check
...
The driver has a loop after ending link training, where it reads the
DPCD link status and prints an error if that status is not ok.
The loop is unnecessary, as far as I can understand from DP specs, so
let's remove it. We can also print the more specific errors to help
debugging.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com >
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com >
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190528082747.3631-16-tomi.valkeinen@ti.com
2019-05-31 15:41:25 +02:00
Tomi Valkeinen
0776a269d7
drm/bridge: tc358767: use more reliable seq when finishing LT
...
At the end of the link training, two steps have to be taken: 1)
tc358767's LT mode is disabled by a write to DP0_SRCCTRL, and 2) Remove
LT flag in DPCD 0x102.
Toshiba's documentation tells to first write the DPCD, then modify
DP0_SRCCTRL. In my testing this often causes issues, and the link
disconnects right after those steps.
If I reverse the steps, it works every time. There's a chance that this
is DP sink specific, though, but as my testing shows this sequence to be
much more reliable, let's change it.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com >
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com >
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190528082747.3631-15-tomi.valkeinen@ti.com
2019-05-31 15:41:24 +02:00
Tomi Valkeinen
31b4c8848a
drm/bridge: tc358767: remove unnecessary msleep
...
For some reason the driver has a msleep(100) after writing to
DP_PHY_CTRL. Toshiba's documentation doesn't suggest any delay is
needed, and I have not seen any issues with the sleep removed.
Drop it, as msleep(100) is a rather big one.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com >
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com >
Reviewed-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com >
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190528082747.3631-14-tomi.valkeinen@ti.com
2019-05-31 15:41:24 +02:00
Tomi Valkeinen
67bca92fa8
drm/bridge: tc358767: ensure DP is disabled before LT
...
Link training will sometimes fail if the DP link is enabled when
tc_main_link_enable() is called. The driver makes sure the DP link is
disabled when the DP output is disabled, and we never enable the DP
without first disabling it, so this should never happen.
However, as the HW behavior seems to be somewhat random if DP link has
erroneously been left enabled, let's add a WARN_ON() for the case and
set DP0CTL to 0.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com >
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com >
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190528082747.3631-13-tomi.valkeinen@ti.com
2019-05-31 15:41:23 +02:00
Tomi Valkeinen
1c928267b1
drm/bridge: tc358767: disable only video stream in tc_stream_disable
...
Currently the code writes 0 to DP0CTL in tc_stream_disable(), which
disables the whole DP link instead of just the video stream. We always
disable the link and the stream together from tc_bridge_disable(), so
this doesn't cause any issues.
Nevertheless, fix this by only clearing VID_EN in tc_stream_disable to
stop the video stream while keeping the link enabled.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com >
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com >
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190528082747.3631-12-tomi.valkeinen@ti.com
2019-05-31 15:41:22 +02:00
Tomi Valkeinen
cb3263b2df
drm/bridge: tc358767: add link disable function
...
Currently we have tc_main_link_setup(), which configures and enabled the
link, but we have no counter-part for disabling the link.
Add tc_main_link_disable, and rename tc_main_link_setup to
tc_main_link_enable.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com >
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com >
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190528082747.3631-11-tomi.valkeinen@ti.com
2019-05-31 15:41:22 +02:00
Tomi Valkeinen
bb24836869
drm/bridge: tc358767: move PXL PLL enable/disable to stream enable/disable
...
We set up the PXL PLL inside tc_main_link_setup. This is unnecessary,
and makes tc_main_link_setup depend on the video-mode, which should not
be the case. As PXL PLL is used only for the video stream (and only when
using the HW test pattern), let's move the PXL PLL setup into
tc_stream_enable.
Also, currently the PXL PLL is only disabled if the driver if removed.
Let's disable the PXL PLL when the stream is disabled.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com >
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190528082747.3631-10-tomi.valkeinen@ti.com
2019-05-31 15:41:21 +02:00
Tomi Valkeinen
80d5724506
drm/bridge: tc358767: split stream enable/disable
...
It is nicer to have enable/disable functions instead of set(bool enable)
style function.
Split tc_main_link_stream into tc_stream_enable and tc_stream_disable.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com >
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com >
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190528082747.3631-9-tomi.valkeinen@ti.com
2019-05-31 15:41:20 +02:00
Tomi Valkeinen
5761a259aa
drm/bridge: tc358767: move video stream setup to tc_main_link_stream
...
The driver currently sets the video stream registers in
tc_main_link_setup. One should be able to establish the DP link without
any video stream, so a more logical place is to configure the stream in
the tc_main_link_stream. So move them there.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com >
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190528082747.3631-8-tomi.valkeinen@ti.com
2019-05-31 15:41:20 +02:00
Tomi Valkeinen
ca342386a9
drm/bridge: tc358767: cleanup aux_link_setup
...
The driver sets up AUX link at probe time, but, for some reason, also
sets the main link's number of lanes using tc->link.base.num_lanes. This
is not needed nor correct, as the number of lanes has not been decided
yet. The number of lanes will be set later during main link setup.
Modify aux_link_setup so that it does not use tc->link, and thus makes
aux setup independent of the link probing.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com >
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190528082747.3631-7-tomi.valkeinen@ti.com
2019-05-31 15:41:19 +02:00
Tomi Valkeinen
ab947eb65a
drm/bridge: tc358767: remove unused swing & preemp
...
swing and preemp fields are not used. Remove them.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com >
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190528082747.3631-6-tomi.valkeinen@ti.com
2019-05-31 15:41:18 +02:00
Tomi Valkeinen
e5607637c4
drm/bridge: tc358767: cleanup spread & scrambler_dis
...
Minor cleanups:
- Use bool for boolean fields
- Use DP_MAX_DOWNSPREAD_0_5 instead of BIT(0)
- debug print down-spread and scrambler status
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com >
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190528082747.3631-5-tomi.valkeinen@ti.com
2019-05-31 15:41:18 +02:00
Tomi Valkeinen
4b30bf41e1
drm/bridge: tc358767: fix ansi 8b10b use
...
DP always uses ANSI 8B10B encoding. Some monitors (old?) may not have
the ANSI 8B10B bit set in DPCD, even if it should always be set.
The tc358767 driver currently respects that flag, and turns the encoding
off if the monitor does not have the bit set, which then results in the
monitor not working.
This patch makes the driver to always use ANSI 8B10B encoding, and drops
the 'coding8b10b' field which is no longer used.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com >
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com >
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190528082747.3631-4-tomi.valkeinen@ti.com
2019-05-31 15:41:17 +02:00
Tomi Valkeinen
c28d14849d
drm/bridge: tc358767: reset voltage-swing & pre-emphasis
...
We need to reset DPCD voltage-swing & pre-emphasis before starting the
link training, as otherwise tc358767 will use the previous values as
minimums.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com >
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com >
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190528082747.3631-3-tomi.valkeinen@ti.com
2019-05-31 15:41:16 +02:00
Tomi Valkeinen
bfb6e014c4
drm/bridge: tc358767: fix tc_aux_get_status error handling
...
tc_aux_get_status() does not report AUX_TIMEOUT correctly, as it only
checks the AUX_TIMEOUT if aux is still busy. Fix this by always checking
for AUX_TIMEOUT.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com >
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com >
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190528082747.3631-2-tomi.valkeinen@ti.com
2019-05-31 15:41:15 +02:00
Thomas Gleixner
c942fddf87
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157
...
Based on 3 normalized pattern(s):
this program is free software you can redistribute it and or modify
it under the terms of the gnu general public license as published by
the free software foundation either version 2 of the license or at
your option any later version this program is distributed in the
hope that it will be useful but without any warranty without even
the implied warranty of merchantability or fitness for a particular
purpose see the gnu general public license for more details
this program is free software you can redistribute it and or modify
it under the terms of the gnu general public license as published by
the free software foundation either version 2 of the license or at
your option any later version [author] [kishon] [vijay] [abraham]
[i] [kishon]@[ti] [com] this program is distributed in the hope that
it will be useful but without any warranty without even the implied
warranty of merchantability or fitness for a particular purpose see
the gnu general public license for more details
this program is free software you can redistribute it and or modify
it under the terms of the gnu general public license as published by
the free software foundation either version 2 of the license or at
your option any later version [author] [graeme] [gregory]
[gg]@[slimlogic] [co] [uk] [author] [kishon] [vijay] [abraham] [i]
[kishon]@[ti] [com] [based] [on] [twl6030]_[usb] [c] [author] [hema]
[hk] [hemahk]@[ti] [com] this program is distributed in the hope
that it will be useful but without any warranty without even the
implied warranty of merchantability or fitness for a particular
purpose see the gnu general public license for more details
extracted by the scancode license scanner the SPDX license identifier
GPL-2.0-or-later
has been chosen to replace the boilerplate/reference in 1105 file(s).
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Reviewed-by: Allison Randal <allison@lohutok.net >
Reviewed-by: Richard Fontana <rfontana@redhat.com >
Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org >
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190527070033.202006027@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-05-30 11:26:37 -07:00
Laurent Pinchart
88bc417856
drm: Use new DRM_BUS_FLAG_*_(DRIVE|SAMPLE)_(POS|NEG)EDGE flags
...
The DRM_BUS_FLAG_PIXDATA_(POS|NEG)EDGE and
DRM_BUS_FLAG_SYNC_(POS|NEG)EDGE flags are deprecated in favour of the
new DRM_BUS_FLAG_PIXDATA_(DRIVE|SAMPLE)_(POS|NEG)EDGE and
new DRM_BUS_FLAG_SYNC_(DRIVE|SAMPLE)_(POS|NEG)EDGE flags. Replace them
through the code.
This effectively changes the value of the .sampling_edge bridge timings
field in the dumb-vga-dac driver. This is safe to do as no driver
consumes these values yet.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com >
Acked-by: Linus Walleij <linus.walleij@linaro.org >
Reviewed-by: Stefan Agner <stefan@agner.ch >
Tested-by: Sebastian Reichel <sebastian.reichel@collabora.com >
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com >
2019-03-18 11:42:13 +02:00
Dave Airlie
c06de56121
Merge v5.0-rc7 into drm-next
...
Backmerging for nouveau and imx that needed some fixes for next pulls.
Signed-off-by: Dave Airlie <airlied@redhat.com >
2019-02-18 13:27:15 +10:00
Daniel Vetter
fcd70cd36b
drm: Split out drm_probe_helper.h
...
Having the probe helper stuff (which pretty much everyone needs) in
the drm_crtc_helper.h file (which atomic drivers should never need) is
confusing. Split them out.
To make sure I actually achieved the goal here I went through all
drivers. And indeed, all atomic drivers are now free of
drm_crtc_helper.h includes.
v2: Make it compile. There was so much compile fail on arm drivers
that I figured I'll better not include any of the acks on v1.
v3: Massive rebase because i915 has lost a lot of drmP.h includes, but
not all: Through drm_crtc_helper.h > drm_modeset_helper.h -> drmP.h
there was still one, which this patch largely removes. Which means
rolling out lots more includes all over.
This will also conflict with ongoing drmP.h cleanup by others I
expect.
v3: Rebase on top of atomic bochs.
v4: Review from Laurent for bridge/rcar/omap/shmob/core bits:
- (re)move some of the added includes, use the better include files in
other places (all suggested from Laurent adopted unchanged).
- sort alphabetically
v5: Actually try to sort them, and while at it, sort all the ones I
touch.
v6: Rebase onto i915 changes.
v7: Rebase once more.
Acked-by: Harry Wentland <harry.wentland@amd.com >
Acked-by: Sam Ravnborg <sam@ravnborg.org >
Cc: Sam Ravnborg <sam@ravnborg.org >
Cc: Jani Nikula <jani.nikula@linux.intel.com >
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Acked-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Acked-by: Benjamin Gaignard <benjamin.gaignard@linaro.org >
Acked-by: Jani Nikula <jani.nikula@intel.com >
Acked-by: Neil Armstrong <narmstrong@baylibre.com >
Acked-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com >
Acked-by: CK Hu <ck.hu@mediatek.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Acked-by: Sam Ravnborg <sam@ravnborg.org >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Acked-by: Liviu Dudau <liviu.dudau@arm.com >
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
Cc: linux-arm-kernel@lists.infradead.org
Cc: virtualization@lists.linux-foundation.org
Cc: etnaviv@lists.freedesktop.org
Cc: linux-samsung-soc@vger.kernel.org
Cc: intel-gfx@lists.freedesktop.org
Cc: linux-mediatek@lists.infradead.org
Cc: linux-amlogic@lists.infradead.org
Cc: linux-arm-msm@vger.kernel.org
Cc: freedreno@lists.freedesktop.org
Cc: nouveau@lists.freedesktop.org
Cc: spice-devel@lists.freedesktop.org
Cc: amd-gfx@lists.freedesktop.org
Cc: linux-renesas-soc@vger.kernel.org
Cc: linux-rockchip@lists.infradead.org
Cc: linux-stm32@st-md-mailman.stormreply.com
Cc: linux-tegra@vger.kernel.org
Cc: xen-devel@lists.xen.org
Link: https://patchwork.freedesktop.org/patch/msgid/20190117210334.13234-1-daniel.vetter@ffwll.ch
2019-01-24 13:20:42 +01:00
Laurent Pinchart
63f8f3badf
drm: bridge: Constify mode arguments to bridge .mode_set() operation
...
The mode and ajusted_mode passed to the bridge .mode_set() operation
should never be modified by the bridge (and are not in any of the
existing bridge drivers). Make them const to make this clear.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com >
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch >
2019-01-14 03:51:14 +02:00
Tomi Valkeinen
f8c15790e4
drm/bridge: tc358767: use DP connector if no panel set
...
tc358767 driver sets the connector type always to eDP.
This patch sets the type to DP if there is no panel defined, which
implies that there's a DP connector on the board.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com >
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com >
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190103115954.12785-8-tomi.valkeinen@ti.com
2019-01-09 10:49:31 +01:00
Tomi Valkeinen
7923e09c7a
drm/bridge: tc358767: fix output H/V syncs
...
The H and V syncs of the DP output are always set to active high. This
patch fixes the syncs by configuring them according to the videomode.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com >
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com >
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190103115954.12785-7-tomi.valkeinen@ti.com
2019-01-09 10:49:31 +01:00
Tomi Valkeinen
51b9e62eb6
drm/bridge: tc358767: reject modes which require too much BW
...
The current driver accepts any videomode with pclk < 154MHz. This is not
correct, as with 1 lane and/or 1.62Mbps speed not all videomodes can be
supported.
Add code to reject modes that require more bandwidth that is available.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com >
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com >
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190103115954.12785-6-tomi.valkeinen@ti.com
2019-01-09 10:49:30 +01:00