[PATCH v4 27/27] drm/panel: panel-simple: Prepare/unprepare are refcounted, not forced

2021-04-16 Thread Douglas Anderson
mplexity. [1] https://lore.kernel.org/r/yhepsqgqoau1v...@pendragon.ideasonboard.com Suggested-by: Laurent Pinchart Signed-off-by: Douglas Anderson --- (no changes since v1) drivers/gpu/drm/panel/panel-simple.c | 14 -- 1 file changed, 14 deletions(-) diff --git a/drivers/gpu/drm/panel/panel

[PATCH v4 26/27] arm64: dts: qcom: Link the panel to the bridge's DDC bus

2021-04-16 Thread Douglas Anderson
Adding this link allows the panel code to do things like read the EDID. Signed-off-by: Douglas Anderson --- (no changes since v1) arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi b/arch/arm64/boot

[PATCH v4 25/27] drm/bridge: ti-sn65dsi86: Don't read EDID blob over DDC

2021-04-16 Thread Douglas Anderson
e the fallback mode to use (since the EDID reading was a bit broken). Suggested-by: Andrzej Hajda Signed-off-by: Douglas Anderson --- (no changes since v1) drivers/gpu/drm/bridge/ti-sn65dsi86.c | 22 -- 1 file changed, 22 deletions(-) diff --git a/drivers/gpu/drm/bridge/ti-

[PATCH v4 22/27] drm/panel: panel-simple: Remove extra call: drm_connector_update_edid_property()

2021-04-16 Thread Douglas Anderson
As of commit 5186421cbfe2 ("drm: Introduce epoch counter to drm_connector") the drm_get_edid() function calls drm_connector_update_edid_property() for us. There's no reason for us to call it again. Signed-off-by: Douglas Anderson --- As Laurent pointed out [1] this is actually a pre

[PATCH v4 21/27] i2c: i2c-core-of: Fix corner case of finding adapter by node

2021-04-16 Thread Douglas Anderson
c-bus" property. I believe that this problem got worse, however, with commit e814e688413a ("i2c: of: Try to find an I2C adapter matching the parent"). Starting at that commit it would be even easier to accidentally miss finding the adapter. Signed-off-by: Douglas Anderson --- This

[PATCH v4 24/27] drm/panel: panel-simple: Cache the EDID as long as we retain power

2021-04-16 Thread Douglas Anderson
use out of this cache. Signed-off-by: Douglas Anderson --- (no changes since v1) drivers/gpu/drm/panel/panel-simple.c | 17 ++--- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index

[PATCH v4 23/27] drm/panel: panel-simple: Power the panel when reading the EDID

2021-04-16 Thread Douglas Anderson
-by: Douglas Anderson --- (no changes since v1) drivers/gpu/drm/panel/panel-simple.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index c91e8aa108f7..40382c1be692 100644 --- a/drivers/gpu/drm/panel

[PATCH v4 19/27] drm/bridge: ti-sn65dsi86: If refclk, DP AUX can happen w/out pre-enable

2021-04-16 Thread Douglas Anderson
ago when we realized how inflexible it was. Even if someone is using the bridge chip without the "refclk" they're in no worse shape than they were before the (fairly recent) commit 58074b08c04a ("drm/bridge: ti-sn65dsi86: Read EDID blob over DDC"). Signed-off-by: Douglas Anders

[PATCH v4 20/27] drm/bridge: ti-sn65dsi86: Promote the AUX channel to its own sub-dev

2021-04-16 Thread Douglas Anderson
of completion), but it seems simple enough to just not even bother creating the bridge device until the AUX channel probes. That's what we'll do. Signed-off-by: Douglas Anderson --- (no changes since v1) drivers/gpu/drm/bridge/ti-sn65dsi86.c | 82 --- 1 file changed, 63

[PATCH v4 17/27] drm/bridge: ti-sn65dsi86: Use pm_runtime autosuspend

2021-04-16 Thread Douglas Anderson
Let's make the bridge use autosuspend with a 500ms delay. This is in preparation for promoting DP AUX transfers to their own sub-driver so that we're not constantly powering up and down the device as we transfer all the chunks. Signed-off-by: Douglas Anderson --- (no changes since v1) drivers

[PATCH v4 18/27] drm/bridge: ti-sn65dsi86: Code motion of refclk management functions

2021-04-16 Thread Douglas Anderson
No functional changes--this just makes the diffstat of a future change easier to understand. Signed-off-by: Douglas Anderson --- (no changes since v1) drivers/gpu/drm/bridge/ti-sn65dsi86.c | 116 +- 1 file changed, 58 insertions(+), 58 deletions(-) diff --git

[PATCH v4 16/27] drm/panel: panel-simple: Get rid of hacky HPD chicken-and-egg code

2021-04-16 Thread Douglas Anderson
's get rid of the old code to clean things up. Signed-off-by: Douglas Anderson --- (no changes since v1) drivers/gpu/drm/panel/panel-simple.c | 24 +--- 1 file changed, 5 insertions(+), 19 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/p

[PATCH v4 14/27] drm/bridge: ti-sn65dsi86: Move all the chip-related init to the start

2021-04-16 Thread Douglas Anderson
the "whole chip" stuff this is actually quite easy now. Signed-off-by: Douglas Anderson --- (no changes since v1) drivers/gpu/drm/bridge/ti-sn65dsi86.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi86.

[PATCH v4 15/27] drm/bridge: ti-sn65dsi86: Break GPIO and MIPI-to-eDP bridge into sub-drivers

2021-04-16 Thread Douglas Anderson
ty present in the bridge chip for a backlight we'll end up with another chicken-and-egg problem. If we allow the PWM to be a sub-driver too then it solves this problem. Signed-off-by: Douglas Anderson --- (no changes since v1) drivers/gpu/drm/bridge/Kconfig| 1 + drivers/gpu/drm

[PATCH v4 12/27] drm/bridge: ti-sn65dsi86: Cleanup managing of drvdata

2021-04-16 Thread Douglas Anderson
Let's: - Set the drvdata as soon as it's allocated. This just sets up a pointer so there's no downside here. - Remove the useless call to i2c_set_clientdata() which is literally the same thing as dev_set_drvdata(). No functional changes intended. Signed-off-by: Douglas Anderson

[PATCH v4 11/27] drm/bridge: ti-sn65dsi86: Add local var for "dev" to simplify probe

2021-04-16 Thread Douglas Anderson
Tiny cleanup for probe so we don't keep having to specify ">dev" or "pdata->dev". No functional changes intended. Signed-off-by: Douglas Anderson --- (no changes since v1) drivers/gpu/drm/bridge/ti-sn65dsi86.c | 26 -- 1 file changed, 12 i

[PATCH v4 13/27] drm/bridge: ti-sn65dsi86: Use devm to do our runtime_disable

2021-04-16 Thread Douglas Anderson
There's no devm_runtime_enable(), but it's easy to use devm_add_action_or_reset() and means we don't need to worry about the disable in our remove() routine or in error paths. No functional changes intended by this change. Signed-off-by: Douglas Anderson --- (no changes since v1) drivers/gpu

[PATCH v4 10/27] drm/bridge: ti-sn65dsi86: Clean debugfs code

2021-04-16 Thread Douglas Anderson
Let's cleanup the debugfs code to: - Check for errors. - Use devm to manage freeing, which also means we don't need to store a pointer in our structure. Signed-off-by: Douglas Anderson --- (no changes since v1) drivers/gpu/drm/bridge/ti-sn65dsi86.c | 32 +-- 1 file

[PATCH v4 08/27] drm/bridge: ti-sn65dsi86: Rename the main driver data structure

2021-04-16 Thread Douglas Anderson
In preparation for splitting this driver into sub-drivers, let's rename the main data structure so it's clear that it's holding data for the whole device and not just the MIPI-eDP bridge part. This is a no-op change. Signed-off-by: Douglas Anderson --- (no changes since v1) drivers/gpu/drm

[PATCH v4 09/27] drm/bridge: ti-sn65dsi86: More renames in prep for sub-devices

2021-04-16 Thread Douglas Anderson
ad of just the MIPI to eDP bridge part) included "sn65dsi86" somewhere in the name instead of just "ti_sn_bridge". Signed-off-by: Douglas Anderson --- (no changes since v1) drivers/gpu/drm/bridge/ti-sn65dsi86.c | 84 +-- 1 file changed, 42 insertions(+

[PATCH v4 06/27] drm/bridge: ti-sn65dsi86: Get rid of the useless detect() function

2021-04-16 Thread Douglas Anderson
If we just leave the detect() function as NULL then the upper layers assume we're always connected. There's no reason for a stub. Signed-off-by: Douglas Anderson Reviewed-by: Andrzej Hajda Reviewed-by: Laurent Pinchart --- (no changes since v1) drivers/gpu/drm/bridge/ti-sn65dsi86.c | 12

[PATCH v4 05/27] drm/bridge: ti-sn65dsi86: Move drm_panel_unprepare() to post_disable()

2021-04-16 Thread Douglas Anderson
We prepared the panel in pre_enable() so we should unprepare it in post_disable() to match. Signed-off-by: Douglas Anderson Reviewed-by: Andrzej Hajda Reviewed-by: Laurent Pinchart --- Changes in v4: - Reword commit mesage slightly. drivers/gpu/drm/bridge/ti-sn65dsi86.c | 4 ++-- 1 file

[PATCH v4 07/27] drm/panel: panel-simple: Use runtime pm to avoid excessive unprepare / prepare

2021-04-16 Thread Douglas Anderson
mory this is a legit thing to assume these days and we don't have to find some fallback to keep working if someone wants to build their system without "PM". Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20210402152701.v3.12.I9e8bd33b49c496745bfac58ea9ab418bd3b6f5ce

[PATCH v4 04/27] drm/bridge: ti-sn65dsi86: Reorder remove()

2021-04-16 Thread Douglas Anderson
Let's make the remove() function strictly the reverse of the probe() function so it's easier to reason about. This patch was created by code inspection and should move us closer to a proper remove. Signed-off-by: Douglas Anderson Reviewed-by: Andrzej Hajda Reviewed-by: Laurent Pinchart

[PATCH v4 02/27] drm/bridge: ti-sn65dsi86: Simplify refclk handling

2021-04-16 Thread Douglas Anderson
-off-by: Douglas Anderson Reviewed-by: Robert Foss Reviewed-by: Bjorn Andersson Reviewed-by: Stephen Boyd Reviewed-by: Laurent Pinchart Reviewed-by: Andrzej Hajda --- (no changes since v2) Changes in v2: - Removed 2nd paragraph in commit message. drivers/gpu/drm/bridge/ti-sn65dsi86.c | 11

[PATCH v4 03/27] drm/bridge: ti-sn65dsi86: Remove incorrectly tagged kerneldoc comment

2021-04-16 Thread Douglas Anderson
A random comment inside a function had "/**" in front of it. That doesn't make sense. Remove. Signed-off-by: Douglas Anderson Reviewed-by: Andrzej Hajda Reviewed-by: Laurent Pinchart --- (no changes since v1) drivers/gpu/drm/bridge/ti-sn65dsi86.c | 2 +- 1 file changed, 1 inser

[PATCH v4 01/27] drm/bridge: Fix the stop condition of drm_bridge_chain_pre_enable()

2021-04-16 Thread Douglas Anderson
The drm_bridge_chain_pre_enable() is not the proper opposite of drm_bridge_chain_post_disable(). It continues along the chain to _before_ the starting bridge. Let's fix that. Fixes: 05193dc38197 ("drm/bridge: Make the bridge chain a double-linked list") Signed-off-by: Douglas Anderson

[PATCH v4 00/27] drm: Fix EDID reading on ti-sn65dsi86; solve some chicken-and-egg problems

2021-04-16 Thread Douglas Anderson
in v2: - Removed 2nd paragraph in commit message. Douglas Anderson (27): drm/bridge: Fix the stop condition of drm_bridge_chain_pre_enable() drm/bridge: ti-sn65dsi86: Simplify refclk handling drm/bridge: ti-sn65dsi86: Remove incorrectly tagged kerneldoc comment drm/bridge: ti-sn65dsi86: Re

[PATCH v3 12/12] drm/panel: panel-simple: Use runtime pm to avoid excessive unprepare / prepare

2021-04-02 Thread Douglas Anderson
and we don't have to find some fallback to keep working if someone wants to build their system without "PM". Signed-off-by: Douglas Anderson --- (no changes since v1) drivers/gpu/drm/panel/Kconfig| 1 + drivers/gpu/drm/panel/panel-simple.c | 93 +++

[PATCH v3 11/12] drm/bridge: ti-sn65dsi86: Print an error if we fallback to panel modes

2021-04-02 Thread Douglas Anderson
-by: Douglas Anderson --- (no changes since v1) drivers/gpu/drm/bridge/ti-sn65dsi86.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi86.c b/drivers/gpu/drm/bridge/ti-sn65dsi86.c index fb50f9f95b0f..3b61898cf9cb 100644 --- a/drivers/gpu/drm/bridge/ti

[PATCH v3 10/12] drm/bridge: ti-sn65dsi86: Read the EDID only if refclk was provided

2021-04-02 Thread Douglas Anderson
we realized how inflexible it was. Even if someone is using the bridge chip without the "refclk" they're in no worse shape than they were before the (fairly recent) commit 58074b08c04a ("drm/bridge: ti-sn65dsi86: Read EDID blob over DDC"). Signed-off-by: Douglas Anderson --- (no ch

[PATCH v3 09/12] drm/bridge: ti-sn65dsi86: Fail aux transfers right away if not powered

2021-04-02 Thread Douglas Anderson
If the bridge (and panel) haven't been powered on then AUX transfers just won't work. Let's just fail them instantly. Signed-off-by: Douglas Anderson --- If the patch ("drm/panel: panel-simple: Use runtime pm to avoid excessive unprepare / prepare") is accepted then we could conside

[PATCH v3 08/12] drm/bridge: ti-sn65dsi86: Power things properly for reading the EDID

2021-04-02 Thread Douglas Anderson
fully off. Then we'll likely have to wait the minimum time between power off and power on. Fixes: 58074b08c04a ("drm/bridge: ti-sn65dsi86: Read EDID blob over DDC") Signed-off-by: Douglas Anderson --- Changes in v3: - Rebased now that we're not moving EDID caching to the core. - Separating ou

[PATCH v3 07/12] drm/bridge: ti-sn65dsi86: Remove extra call: drm_connector_update_edid_property()

2021-04-02 Thread Douglas Anderson
As of commit 5186421cbfe2 ("drm: Introduce epoch counter to drm_connector") the drm_get_edid() function calls drm_connector_update_edid_property() for us. There's no reason for us to call it again. Signed-off-by: Douglas Anderson Reviewed-by: Andrzej Hajda --- (no changes since v1)

[PATCH v3 06/12] drm/bridge: ti-sn65dsi86: Get rid of the useless detect() function

2021-04-02 Thread Douglas Anderson
If we just leave the detect() function as NULL then the upper layers assume we're always connected. There's no reason for a stub. Signed-off-by: Douglas Anderson Reviewed-by: Andrzej Hajda --- (no changes since v1) drivers/gpu/drm/bridge/ti-sn65dsi86.c | 12 1 file changed, 12

[PATCH v3 05/12] drm/bridge: ti-sn65dsi86: Move drm_panel_unprepare() to post_disable()

2021-04-02 Thread Douglas Anderson
We prepared the panel in pre_enable() so we should unprepare it in post_disable() to match. This becomes important once we start using pre_enable() and post_disable() to make sure things are powered on (and then off again) when reading the EDID. Signed-off-by: Douglas Anderson Reviewed

[PATCH v3 03/12] drm/bridge: ti-sn65dsi86: Remove incorrectly tagged kerneldoc comment

2021-04-02 Thread Douglas Anderson
A random comment inside a function had "/**" in front of it. That doesn't make sense. Remove. Signed-off-by: Douglas Anderson Reviewed-by: Andrzej Hajda --- (no changes since v1) drivers/gpu/drm/bridge/ti-sn65dsi86.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH v3 04/12] drm/bridge: ti-sn65dsi86: Reorder remove()

2021-04-02 Thread Douglas Anderson
Let's make the remove() function strictly the reverse of the probe() function so it's easier to reason about. This patch was created by code inspection and should move us closer to a proper remove. Signed-off-by: Douglas Anderson Reviewed-by: Andrzej Hajda --- Changes in v3: - Removed "

[PATCH v3 02/12] drm/bridge: ti-sn65dsi86: Simplify refclk handling

2021-04-02 Thread Douglas Anderson
-off-by: Douglas Anderson Reviewed-by: Robert Foss Reviewed-by: Bjorn Andersson Reviewed-by: Stephen Boyd Reviewed-by: Laurent Pinchart Reviewed-by: Andrzej Hajda --- (no changes since v2) Changes in v2: - Removed 2nd paragraph in commit message. drivers/gpu/drm/bridge/ti-sn65dsi86.c | 11

[PATCH v3 01/12] drm/bridge: Fix the stop condition of drm_bridge_chain_pre_enable()

2021-04-02 Thread Douglas Anderson
The drm_bridge_chain_pre_enable() is not the proper opposite of drm_bridge_chain_post_disable(). It continues along the chain to _before_ the starting bridge. Let's fix that. Fixes: 05193dc38197 ("drm/bridge: Make the bridge chain a double-linked list") Signed-off-by: Douglas Anderson

[PATCH v3 00/12] drm: Fix EDID reading on ti-sn65dsi86

2021-04-02 Thread Douglas Anderson
ssage. - Rebased now that we're not moving EDID caching to the core. - Separating out patch to block AUX channel when not powered. - Added note about boot speed implications. - ("Fail aux transfers right away if not powered") split out for v3. Changes in v2: - Removed 2nd paragraph in commit

[PATCH v2 14/14] drm/panel: panel-simple: Use runtime pm to avoid excessive unprepare / prepare

2021-03-29 Thread Douglas Anderson
and we don't have to find some fallback to keep working if someone wants to build their system without "PM". Signed-off-by: Douglas Anderson --- (no changes since v1) drivers/gpu/drm/panel/Kconfig| 1 + drivers/gpu/drm/panel/panel-simple.c | 93 +++

[PATCH v2 12/14] drm/bridge: ti-sn65dsi86: Read the EDID only if refclk was provided

2021-03-29 Thread Douglas Anderson
we realized how inflexible it was. Even if someone is using the bridge chip without the "refclk" they're in no worse shape than they were before the (fairly recent) commit 58074b08c04a ("drm/bridge: ti-sn65dsi86: Read EDID blob over DDC"). Signed-off-by: Douglas Anderson --- (no ch

[PATCH v2 11/14] drm/bridge: ti-sn65dsi86: Power things properly for reading the EDID

2021-03-29 Thread Douglas Anderson
ailing aux transfers if we're not powered. - If the first read of the EDID fails we try again after powering. Fixes: 58074b08c04a ("drm/bridge: ti-sn65dsi86: Read EDID blob over DDC") Signed-off-by: Douglas Anderson --- Depending on what people think of the other patches in this series, some

[PATCH v2 10/14] drm/bridge: ti-sn65dsi86: Stop caching the EDID ourselves

2021-03-29 Thread Douglas Anderson
Now that we have the patch ("drm/edid: Use the cached EDID in drm_get_edid() if eDP") we no longer need to maintain our own cache. Drop this code. Signed-off-by: Douglas Anderson --- (no changes since v1) drivers/gpu/drm/bridge/ti-sn65dsi86.c | 22 +- 1 file

[PATCH v2 13/14] drm/bridge: ti-sn65dsi86: Print an error if we fallback to panel modes

2021-03-29 Thread Douglas Anderson
-by: Douglas Anderson --- (no changes since v1) drivers/gpu/drm/bridge/ti-sn65dsi86.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi86.c b/drivers/gpu/drm/bridge/ti-sn65dsi86.c index 92498900c58d..20c3b13939c2 100644 --- a/drivers/gpu/drm/bridge/ti

[PATCH v2 09/14] drm/edid: Use the cached EDID in drm_get_edid() if eDP

2021-03-29 Thread Douglas Anderson
the EDID once then we've got the EDID and we should never need to read it again. For now we'll only use the cache for eDP both because it's more important and extra safe. Signed-off-by: Douglas Anderson --- (no changes since v1) drivers/gpu/drm/drm_edid.c | 32 1 file

[PATCH v2 06/14] drm/bridge: ti-sn65dsi86: Move drm_panel_unprepare() to post_disable()

2021-03-29 Thread Douglas Anderson
We prepared the panel in pre_enable() so we should unprepare it in post_disable() to match. This becomes important once we start using pre_enable() and post_disable() to make sure things are powered on (and then off again) when reading the EDID. Signed-off-by: Douglas Anderson --- (no changes

[PATCH v2 08/14] drm/bridge: ti-sn65dsi86: Remove extra call: drm_connector_update_edid_property()

2021-03-29 Thread Douglas Anderson
As of commit 5186421cbfe2 ("drm: Introduce epoch counter to drm_connector") the drm_get_edid() function calls drm_connector_update_edid_property() for us. There's no reason for us to call it again. Signed-off-by: Douglas Anderson --- (no changes since v1) drivers/gpu/drm/bridge/ti-s

[PATCH v2 07/14] drm/bridge: ti-sn65dsi86: Get rid of the useless detect() function

2021-03-29 Thread Douglas Anderson
If we just leave the detect() function as NULL then the upper layers assume we're always connected. There's no reason for a stub. Signed-off-by: Douglas Anderson --- (no changes since v1) drivers/gpu/drm/bridge/ti-sn65dsi86.c | 12 1 file changed, 12 deletions(-) diff --git

[PATCH v2 05/14] drm/bridge: ti-sn65dsi86: Move MIPI detach() / unregister() to detach()

2021-03-29 Thread Douglas Anderson
The register() / attach() for MIPI happen in the bridge's attach(). That means that the inverse belongs in the bridge's detach(). Signed-off-by: Douglas Anderson --- (no changes since v1) drivers/gpu/drm/bridge/ti-sn65dsi86.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions

[PATCH v2 04/14] drm/bridge: ti-sn65dsi86: Reorder remove()

2021-03-29 Thread Douglas Anderson
orphaning memory until better handling of the EDID happens. This patch was created by code inspection and should move us closer to a proper remove. Signed-off-by: Douglas Anderson --- (no changes since v1) drivers/gpu/drm/bridge/ti-sn65dsi86.c | 15 --- 1 file changed, 8 insertions

[PATCH v2 03/14] drm/bridge: ti-sn65dsi86: Remove incorrectly tagged kerneldoc comment

2021-03-29 Thread Douglas Anderson
A random comment inside a function had "/**" in front of it. That doesn't make sense. Remove. Signed-off-by: Douglas Anderson --- (no changes since v1) drivers/gpu/drm/bridge/ti-sn65dsi86.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/bridge/ti

[PATCH v2 02/14] drm/bridge: ti-sn65dsi86: Simplify refclk handling

2021-03-29 Thread Douglas Anderson
-off-by: Douglas Anderson Reviewed-by: Robert Foss Reviewed-by: Bjorn Andersson Reviewed-by: Stephen Boyd Reviewed-by: Laurent Pinchart --- Changes in v2: - Removed 2nd paragraph in commit message. drivers/gpu/drm/bridge/ti-sn65dsi86.c | 11 +++ 1 file changed, 3 insertions(+), 8

[PATCH v2 01/14] drm/bridge: Fix the stop condition of drm_bridge_chain_pre_enable()

2021-03-29 Thread Douglas Anderson
The drm_bridge_chain_pre_enable() is not the proper opposite of drm_bridge_chain_post_disable(). It continues along the chain to _before_ the starting bridge. Let's fix that. Fixes: 05193dc38197 ("drm/bridge: Make the bridge chain a double-linked list") Signed-off-by: Dougla

[PATCH v2 00/14] drm: Fix EDID reading on ti-sn65dsi86

2021-03-29 Thread Douglas Anderson
c74b876e68@changeid/ [2] https://lore.kernel.org/r/161706912161.3012082.17313817257247946...@swboyd.mtv.corp.google.com/ Changes in v2: - Removed 2nd paragraph in commit message. Douglas Anderson (14): drm/bridge: Fix the stop condition of drm_bridge_chain_pre_enable() drm/bridge: ti-sn65dsi86

[RFC PATCH 1/3] dt-bindings: display: simple: Add the panel on sc7180-trogdor-pompom

2021-03-16 Thread Douglas Anderson
at might be attached and other differences were handled by EDID. This patch attempts to set a new precedent and avoid the need for the white lie. Signed-off-by: Douglas Anderson --- .../devicetree/bindings/display/panel/panel-simple.yaml | 4 1 file changed, 4 insertions(+) diff --

[RFC PATCH 3/3] arm64: dts: qcom: Don't specify exactly what panel is on pompom

2021-03-16 Thread Douglas Anderson
As talked about in the previous patch ("dt-bindings: display: simple: Add the panel on sc7180-trogdor-pompom") any number of panels might be attached. Let's stop specifying a single panel and just specify that we have a "pompom panel". Signed-off-by: Douglas Anderson --- Be

[RFC PATCH 2/3] drm/panel: panel-simple: Add the panel on sc7180-trogdor-pompom

2021-03-16 Thread Douglas Anderson
delay" imposed by the Starry panel. Signed-off-by: Douglas Anderson --- For overall discussion about the idea of defining a generic panel at the board level, please respond in the bindings patch so we can keep all discussion in one place. drivers/gpu/drm/panel/panel-simple.c | 12

[PATCH v2 2/2] arm64: dts: qcom: Add "dmic_clk_en" + sound model for sc7180-trogdor-pompom

2021-03-15 Thread Douglas Anderson
Match what's downstream for this board. Cc: Srinivasa Rao Mandadapu Cc: Ajit Pandey Cc: Judy Hsiao Cc: Cheng-Yi Chiang Cc: Stephen Boyd Cc: Matthias Kaehlcke Signed-off-by: Douglas Anderson --- This applies atop the patch (arm64: dts: qcom: sc7180-trogdor: Add lpass dai link for I2S driver

[PATCH v2 1/2] arm64: dts: qcom: Add "dmic_clk_en" for sc7180-trogdor-coachz

2021-03-15 Thread Douglas Anderson
Chiang Cc: Stephen Boyd Cc: Matthias Kaehlcke Signed-off-by: Douglas Anderson --- This applies atop the patch ("arm64: dts: qcom: Add sound node for sc7180-trogdor-coachz") [1]. NOTE: downstream this property was present in each of the board revisions. There's actually no longer

[PATCH 2/2] arm64: dts: qcom: Add "dmic_clk_en" + sound model for sc7180-trogdor-pompom

2021-03-15 Thread Douglas Anderson
Match what's downstream for this board. Cc: Srinivasa Rao Mandadapu Cc: Ajit Pandey Cc: Judy Hsiao Cc: Cheng-Yi Chiang Cc: Stephen Boyd Cc: Matthias Kaehlcke Signed-off-by: Douglas Anderson --- This applies atop the patch (arm64: dts: qcom: sc7180-trogdor: Add lpass dai link for I2S driver

[PATCH 1/2] arm64: dts: qcom: Add "dmic_clk_en" for sc7180-trogdor-coachz

2021-03-15 Thread Douglas Anderson
This was present downstream. Add upstream too. Cc: Srinivasa Rao Mandadapu Cc: Ajit Pandey Cc: Judy Hsiao Cc: Cheng-Yi Chiang Cc: Stephen Boyd Cc: Matthias Kaehlcke Signed-off-by: Douglas Anderson --- This applies atop the patch ("arm64: dts: qcom: Add sound node for sc7180-trogdor-c

[PATCH] arm64: dts: qcom: sc7180: Fix sc7180-qmp-usb3-dp-phy reg sizes

2021-03-15 Thread Douglas Anderson
c: Rob Clark Fixes: 58fd7ae621e7 ("arm64: dts: qcom: sc7180: Update dts for DP phy inside QMP phy") Reported-by: Dmitry Baryshkov Signed-off-by: Douglas Anderson --- arch/arm64/boot/dts/qcom/sc7180.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/b

[PATCH] arm64: dts: qcom: sc7180: Drop duplicate dp_hot_plug_det node in trogdor

2021-03-11 Thread Douglas Anderson
rogdor dts. Let's do it now. Signed-off-by: Stephen Boyd [dianders: updated desc] Signed-off-by: Douglas Anderson --- Sorry for missing this in my last batch. I think my eyes glazed over everything "dp" related as not-done-yet even though this one is easy to do now. arch/arm64/boot/dts/qc

[PATCH 3/3] PM: AVS: qcom-cpr: Use nvmem_cell_read_variable_le_u32()

2021-03-05 Thread Douglas Anderson
doesn't fit in 32-bits (the old code would have truncated silently). Signed-off-by: Douglas Anderson --- I haven't done any more than compile-test this. Mostly I'm just writing this patch because it helped provide inspiration for the general API function. drivers/soc/qcom/cpr.c | 43

[PATCH 1/3] nvmem: core: Add functions to make number reading easy

2021-03-05 Thread Douglas Anderson
t;big endian" version would require adding "big endian" support to nvmem_shift_read_buffer_in_place(). Signed-off-by: Douglas Anderson --- This is a logical follow-up to: https://lore.kernel.org/r/20210227002603.3260599-1-diand...@chromium.org/ ...but since it doesn't really share

[PATCH 2/3] drm/msm: Use nvmem_cell_read_variable_le_u32() to read speed bin

2021-03-05 Thread Douglas Anderson
Let's use the newly-added nvmem_cell_read_variable_le_u32() to future proof ourselves a little bit. Signed-off-by: Douglas Anderson --- This is based on my previous patch ("drm/msm: Fix speed-bin support not to access outside valid memory") which has already landed in msm-next. In

[PATCH 3/3] drm/bridge: ti-sn65dsi86: Properly get the EDID, but only if refclk

2021-03-04 Thread Douglas Anderson
r with doing them before userspace requests anything. Fixes: 58074b08c04a ("drm/bridge: ti-sn65dsi86: Read EDID blob over DDC") Signed-off-by: Douglas Anderson --- drivers/gpu/drm/bridge/ti-sn65dsi86.c | 98 --- 1 file changed, 88 insertions(+), 10 deletions(-)

[PATCH 2/3] drm/bridge: ti-sn65dsi86: Move code in prep for EDID read fix

2021-03-04 Thread Douglas Anderson
This patch is _only_ code motion to prepare for the patch ("drm/bridge: ti-sn65dsi86: Properly get the EDID, but only if refclk") and make it easier to understand. Signed-off-by: Douglas Anderson --- drivers/gpu/drm/bridge/ti-sn65dsi86.c | 196 +- 1 file c

[PATCH 1/3] drm/bridge: ti-sn65dsi86: Simplify refclk handling

2021-03-04 Thread Douglas Anderson
: this makes things look a tad bit asymmetric now since we check for NULL before clk_prepare_enable() but not for clk_disable_unprepare(). This seemed OK to me. We already have to check for NULL in the enable case anyway so why not avoid the extra call? Signed-off-by: Douglas Anderson --- drivers

[PATCH v2 13/13] arm64: dts: qcom: Add sc7180-trogdor-coachz skus

2021-03-01 Thread Douglas Anderson
Kaehlcke Cc: Stephen Boyd Cc: Tzung-Bi Shih Cc: Judy Hsiao Signed-off-by: Douglas Anderson Reviewed-by: Matthias Kaehlcke --- NOTE: technically the "google,cros-ec-mkbp-proximity" binding hasn't landed upstream yet. However it has a Reviewed-by from Rob and the series in general sounds a

[PATCH v2 11/13] arm64: dts: qcom: Add sc7180-lazor-limozeen skus

2021-03-01 Thread Douglas Anderson
[1] https://lore.kernel.org/r/20210115144345.v2.4.I6889e21811df6adaff5c5b8a8c80fda0669ab3a5@changeid Cc: Stephen Boyd Signed-off-by: Douglas Anderson Reviewed-by: Matthias Kaehlcke --- Changes in v2: - Add link to Acked bindings. - Proper compatible for the "correct" panel (added

[PATCH v2 12/13] arm64: dts: qcom: Add sc7180-trogdor-pompom skus

2021-03-01 Thread Douglas Anderson
m/c/2719075> for the keyboard. Cc: Philip Chen Cc: Matthias Kaehlcke Cc: Stephen Boyd Cc: Tzung-Bi Shih Cc: Judy Hsiao Signed-off-by: Douglas Anderson Reviewed-by: Matthias Kaehlcke --- Changes in v2: - Rebase atop commit 7822de1a2946 ("arm64:...1 for charger temperature") -

[PATCH v2 10/13] arm64: dts: qcom: sc7180: Set up lazor r3+ as sc7180-lite SKUs

2021-03-01 Thread Douglas Anderson
From: Matthias Kaehlcke Lazor rev3 and later use the 'lite' version of the SC7180 SoC. Cc: Stephen Boyd Signed-off-by: Matthias Kaehlcke [dianders: Adjust commit message which referred to downstream history] Signed-off-by: Douglas Anderson --- (no changes since v1) arch/arm64/boot/dts

[PATCH v2 08/13] arm64: dts: qcom: sc7180: Remove clock for bluetooth on Trogdor

2021-03-01 Thread Douglas Anderson
From: Venkata Lakshmi Narayana Gubba Removed voting for RPMH_RF_CLK2 which is not required as it is getting managed by BT SoC through SW_CTRL line. Cc: Matthias Kaehlcke Signed-off-by: Venkata Lakshmi Narayana Gubba Signed-off-by: Douglas Anderson Reviewed-by: Matthias Kaehlcke

[PATCH v2 09/13] arm64: dts: qcom: sc7180: add GO_LAZOR variant property for lazor

2021-03-01 Thread Douglas Anderson
-by: Douglas Anderson Reviewed-by: Matthias Kaehlcke --- (no changes since v1) arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor.dtsi | 4 1 file changed, 4 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor.dtsi b/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor.dtsi index

[PATCH v2 06/13] arm64: dts: qcom: Disable camera clk on sc7180-trogdor devices by default

2021-03-01 Thread Douglas Anderson
no coachz upstream yet] Signed-off-by: Douglas Anderson Reviewed-by: Matthias Kaehlcke --- (no changes since v1) arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi | 4 1 file changed, 4 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi b/arch/arm64/boot/dts/qcom/sc7180

[PATCH v2 07/13] arm64: dts: qcom: sc7180-trogdor: Remove fp control pins in prep for coachz

2021-03-01 Thread Douglas Anderson
Since we're not using hogs, we rely on AP firmware to set all the control pins correctly. Cc: Stephen Boyd Cc: Craig Hesling Signed-off-by: Alexandru M Stan [dianders: adjusted since coachz isn't upstream yet] Reviewed-by; Matthias Kaehlcke Signed-off-by: Douglas Anderson --- (no changes

[PATCH v2 05/13] arm64: dts: qcom: trogdor: Only wakeup from pen eject

2021-03-01 Thread Douglas Anderson
From: Stephen Boyd Configure the pen to be a wakeup source only when the pen is ejected instead of both when the pen is ejected and inserted. This corresponds to wake source requirements. Signed-off-by: Stephen Boyd Signed-off-by: Douglas Anderson Reviewed-by: Matthias Kaehlcke

[PATCH v2 04/13] arm64: dts: qcom: Unify the sc7180-trogdor panel nodes

2021-03-01 Thread Douglas Anderson
Let's avoid a bit of duplication by pushing this up to the trogdor.dtsi file. Signed-off-by: Douglas Anderson Reviewed-by: Matthias Kaehlcke --- (no changes since v1) .../boot/dts/qcom/sc7180-trogdor-lazor.dtsi | 21 --- .../arm64/boot/dts/qcom/sc7180-trogdor-r1.dts | 19

[PATCH v2 02/13] arm64: dts: qcom: Move sc7180 MI2S config to board files and make pulldown

2021-03-01 Thread Douglas Anderson
In general pinconf belongs in board files, not SoC files. Move it to the only current user (trogdor). Also adjust the drive strengths and pulls. Cc: V Sujith Kumar Reddy Cc: Srinivasa Rao Mandadapu Cc: Tzung-Bi Shih Cc: Judy Hsiao Signed-off-by: Douglas Anderson Reviewed-by: Matthias

[PATCH v2 01/13] arm64: dts: qcom: sc7180: Update dts for DP phy inside QMP phy

2021-03-01 Thread Douglas Anderson
-by: Douglas Anderson --- (no changes since v1) arch/arm64/boot/dts/qcom/sc7180.dtsi | 23 --- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sc7180.dtsi b/arch/arm64/boot/dts/qcom/sc7180.dtsi index 1ea3344ab62c..60248a6757d8 100644

[PATCH v2 03/13] arm64: dts: qcom: Prep sc7180-trogdor trackpad IRQ for new boards

2021-03-01 Thread Douglas Anderson
after more boards are supported. Signed-off-by: Douglas Anderson Reviewed-by: Matthias Kaehlcke --- (no changes since v1) .../boot/dts/qcom/sc7180-trogdor-lazor.dtsi | 14 ++ arch/arm64/boot/dts/qcom/sc7180-trogdor-r1.dts | 16 arch/arm64/boot/dts/qcom/sc7180-tr

[PATCH v2 00/13] arm64: dts: qcom: Update sc7180-trogdor variants from downstream

2021-03-01 Thread Douglas Anderson
r (1): arm64: dts: qcom: sc7180: add GO_LAZOR variant property for lazor Alexandru M Stan (1): arm64: dts: qcom: sc7180-trogdor: Remove fp control pins in prep for coachz Douglas Anderson (6): arm64: dts: qcom: Move sc7180 MI2S config to board files and make pulldown arm64: dts: qcom

[PATCH 3/3] nvmem: core: nvmem_cell_read() should return the true size

2021-02-26 Thread Douglas Anderson
nd the big case that will change is the Qualcomm "CPR" driver which seems to handle the length properly (it could probably be simplified now, actually). Signed-off-by: Douglas Anderson --- drivers/nvmem/core.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers

[PATCH 2/3] nvmem: core: Allow nvmem_cell_read_u16/32/64 to read smaller cells

2021-02-26 Thread Douglas Anderson
rsions just in case there was an instance where someone was using this API to read big endian data on a big endian machine and it happened to be working because there was no bit offset. Signed-off-by: Douglas Anderson --- I will freely admit that I always end up thinking in circles and getting diz

[PATCH 1/3] drm/msm: Fix speed-bin support not to access outside valid memory

2021-02-26 Thread Douglas Anderson
(since the value is 8 bits big) or the u32 version (just for fun). At the moment you need to pick the accessor that exactly matches the length the cell was specified as in the device tree. Hopefully future patches to the nvmem subsystem will fix this. Fixes: fe7952c629da ("drm/msm: Add speed-b

[PATCH 0/3] nvmem: Bring a tiny bit of sanity to reading 16/32/64 bits from nvmem

2021-02-26 Thread Douglas Anderson
fying a length of "4" for the GPU speed bin cells. About applying the patches. - GPU patch can land on its own. No need for the nvmem patches. - nvmem patches can land on their own too. - If the second nvmem patch lands without the first, however, it will break the GPU patch. Douglas Ande

[PATCH 10/13] arm64: dts: qcom: sc7180: Set up lazor r3+ as sc7180-lite SKUs

2021-02-25 Thread Douglas Anderson
From: Matthias Kaehlcke Lazor rev3 and later use the 'lite' version of the SC7180 SoC. Cc: Stephen Boyd Signed-off-by: Matthias Kaehlcke [dianders: Adjust commit message which referred to downstream history] Signed-off-by: Douglas Anderson --- arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor

[PATCH 09/13] arm64: dts: qcom: sc7180: add GO_LAZOR variant property for lazor

2021-02-25 Thread Douglas Anderson
-by: Douglas Anderson --- arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor.dtsi | 4 1 file changed, 4 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor.dtsi b/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor.dtsi index 5efa04d0d256..6b10b96173e8 100644 --- a/arch/arm64/boot

[PATCH 13/13] arm64: dts: qcom: Add sc7180-lazor-coachz skus

2021-02-25 Thread Douglas Anderson
Kaehlcke Cc: Stephen Boyd Cc: Tzung-Bi Shih Cc: Judy Hsiao Signed-off-by: Douglas Anderson --- NOTE: technically the "google,cros-ec-mkbp-proximity" binding hasn't landed upstream yet. However it has a Reviewed-by from Rob and the series in general sounds about ready to land. If necess

[PATCH 12/13] arm64: dts: qcom: Add sc7180-lazor-pompom skus

2021-02-25 Thread Douglas Anderson
m/c/2719075> for the keyboard. Cc: Philip Chen Cc: Matthias Kaehlcke Cc: Stephen Boyd Cc: Tzung-Bi Shih Cc: Judy Hsiao Signed-off-by: Douglas Anderson --- arch/arm64/boot/dts/qcom/Makefile | 4 + .../dts/qcom/sc7180-trogdor-pompom-r1-lte.dts | 14 + .../dts/qcom/sc7180-t

[PATCH 11/13] arm64: dts: qcom: Add sc7180-lazor-limozeen skus

2021-02-25 Thread Douglas Anderson
e "innolux,n116bge" timings for now, though. - The wonky special dts just for "-rev4" arguably doesn't need to go upstream since they weren't widely distributed, but since a few people have them we might as well. If it ever causes problems we can delete it. Cc: Stephe

[PATCH 08/13] arm64: dts: qcom: sc7180: Remove clock for bluetooth on Trogdor

2021-02-25 Thread Douglas Anderson
From: Venkata Lakshmi Narayana Gubba Removed voting for RPMH_RF_CLK2 which is not required as it is getting managed by BT SoC through SW_CTRL line. Cc: Matthias Kaehlcke Signed-off-by: Venkata Lakshmi Narayana Gubba Signed-off-by: Douglas Anderson --- arch/arm64/boot/dts/qcom/sc7180

[PATCH 07/13] arm64: dts: qcom: sc7180-trogdor: Remove fp control pins in prep for coachz

2021-02-25 Thread Douglas Anderson
Since we're not using hogs, we rely on AP firmware to set all the control pins correctly. Cc: Stephen Boyd Cc: Craig Hesling Signed-off-by: Alexandru M Stan [dianders: adjusted since coachz isn't upstream yet] Signed-off-by: Douglas Anderson --- arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi

[PATCH 06/13] arm64: dts: qcom: Disable camera clk on sc7180-trogdor devices by default

2021-02-25 Thread Douglas Anderson
no coachz upstream yet] Signed-off-by: Douglas Anderson --- arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi | 4 1 file changed, 4 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi b/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi index f3a99c801582..69bf600e1c9f 100644

[PATCH 03/13] arm64: dts: qcom: Prep sc7180-trogdor trackpad IRQ for new boards

2021-02-25 Thread Douglas Anderson
after more boards are supported. Signed-off-by: Douglas Anderson --- .../boot/dts/qcom/sc7180-trogdor-lazor.dtsi | 14 ++ arch/arm64/boot/dts/qcom/sc7180-trogdor-r1.dts | 16 arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi | 14 -- 3 files c

[PATCH 02/13] arm64: dts: qcom: Move sc7180 MI2S config to board files and make pulldown

2021-02-25 Thread Douglas Anderson
In general pinconf belongs in board files, not SoC files. Move it to the only current user (trogdor). Also adjust the drive strengths and pulls. Cc: V Sujith Kumar Reddy Cc: Srinivasa Rao Mandadapu Cc: Tzung-Bi Shih Cc: Judy Hsiao Signed-off-by: Douglas Anderson --- This should replace

[PATCH 05/13] arm64: dts: qcom: trogdor: Only wakeup from pen eject

2021-02-25 Thread Douglas Anderson
From: Stephen Boyd Configure the pen to be a wakeup source only when the pen is ejected instead of both when the pen is ejected and inserted. This corresponds to wake source requirements. Signed-off-by: Stephen Boyd Signed-off-by: Douglas Anderson --- arch/arm64/boot/dts/qcom/sc7180

  1   2   3   4   5   6   7   8   9   10   >