Re: [Freedreno] [RFC PATCH 2/7] drm/msm/dp: support attaching bridges to the DP encoder

2022-01-06 Thread Dmitry Baryshkov
On 07/01/2022 06:42, Stephen Boyd wrote: Quoting Dmitry Baryshkov (2022-01-06 18:01:27) Currently DP driver will allocate panel bridge for eDP panels. Simplify this code to just check if there is any next bridge in the chain (be it a panel bridge or regular bridge). Rename panel_bridge field to

Re: [Freedreno] [RFC PATCH 1/7] drm/msm/dp: fix panel bridge attachment

2022-01-06 Thread Dmitry Baryshkov
On 07/01/2022 06:37, Stephen Boyd wrote: Quoting Dmitry Baryshkov (2022-01-06 18:01:26) In commit 8a3b4c17f863 ("drm/msm/dp: employ bridge mechanism for display enable and disable") the DP driver received a drm_bridge instance, which is always attached to the encoder as a root bridge. However it

Re: [Freedreno] [RFC PATCH 2/7] drm/msm/dp: support attaching bridges to the DP encoder

2022-01-06 Thread Stephen Boyd
Quoting Dmitry Baryshkov (2022-01-06 18:01:27) > Currently DP driver will allocate panel bridge for eDP panels. > Simplify this code to just check if there is any next bridge in the > chain (be it a panel bridge or regular bridge). Rename panel_bridge > field to next_bridge accordingly. > > Signed-

Re: [Freedreno] [RFC PATCH 1/7] drm/msm/dp: fix panel bridge attachment

2022-01-06 Thread Stephen Boyd
Quoting Dmitry Baryshkov (2022-01-06 18:01:26) > In commit 8a3b4c17f863 ("drm/msm/dp: employ bridge mechanism for display > enable and disable") the DP driver received a drm_bridge instance, which > is always attached to the encoder as a root bridge. However it conflicts > with the panel_bridge sup

Re: [Freedreno] [RFC PATCH 0/7] Simplify and correct msm/dp bridge implementation

2022-01-06 Thread Dmitry Baryshkov
On 07/01/2022 05:16, Stephen Boyd wrote: Quoting Dmitry Baryshkov (2022-01-06 18:01:25) I noticed that commit 8a3b4c17f863 ("drm/msm/dp: employ bridge mechanism for display enable and disable") conflicts with the panel-edp (panel bridge) support. Both bridges will try to attach directly to the

Re: [Freedreno] [RFC PATCH 0/7] Simplify and correct msm/dp bridge implementation

2022-01-06 Thread Stephen Boyd
Quoting Dmitry Baryshkov (2022-01-06 18:01:25) > I noticed that commit 8a3b4c17f863 ("drm/msm/dp: employ bridge mechanism for > display > enable and disable") conflicts with the panel-edp (panel bridge) > support. Both bridges will try to attach directly to the drm encoder > itself. I started writ

[Freedreno] [RFC PATCH 7/7] drm/msm/dp: stop carying about the connector type

2022-01-06 Thread Dmitry Baryshkov
After changing dp_parser code to always check for the next bridge, it does not check connector type anymore. Remove connector type from the dp_paser_parse() arguments list and from the struct msm_dp_desc fields list. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dp/dp_display.c | 9 +++

[Freedreno] [RFC PATCH 6/7] drm/msm/dp: remove dp_display_en/disable prototypes and data argument

2022-01-06 Thread Dmitry Baryshkov
Remove unused dp_display_en/disable prototypes. While we are at it, remove extra 'data' argument that is unused. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dp/dp_display.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/msm/dp/dp_dis

[Freedreno] [RFC PATCH 5/7] drm/msm/dp: remove unused stubs

2022-01-06 Thread Dmitry Baryshkov
Refactoring DP code transformed several functions into empty stubs. Remove them. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dp/dp_display.c | 35 - 1 file changed, 35 deletions(-) diff --git a/drivers/gpu/drm/msm/dp/dp_display.c b/drivers/gpu/drm/msm/dp

[Freedreno] [RFC PATCH 4/7] drm/msm/dp: remove extra wrappers and public functions

2022-01-06 Thread Dmitry Baryshkov
dp_bridge's functions are thin wrappers around the msm_dp_display_* family. Squash dp_bridge callbacks into respective msm_dp_display functions, removing the latter functions from public space. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/Makefile| 1 - drivers/gpu/drm/msm/d

[Freedreno] [RFC PATCH 3/7] drm/msm/dp: replace dp_connector with drm_bridge_connector

2022-01-06 Thread Dmitry Baryshkov
There is little point in having both connector and root bridge implementation in the same driver. Move connector's functionality to the bridge to let next bridge in chain to override it. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dp/dp_display.c | 22 +++--- drivers/gpu/drm/msm/dp/

[Freedreno] [RFC PATCH 1/7] drm/msm/dp: fix panel bridge attachment

2022-01-06 Thread Dmitry Baryshkov
In commit 8a3b4c17f863 ("drm/msm/dp: employ bridge mechanism for display enable and disable") the DP driver received a drm_bridge instance, which is always attached to the encoder as a root bridge. However it conflicts with the panel_bridge support for eDP panels. Change panel_bridge attachment to

[Freedreno] [RFC PATCH 2/7] drm/msm/dp: support attaching bridges to the DP encoder

2022-01-06 Thread Dmitry Baryshkov
Currently DP driver will allocate panel bridge for eDP panels. Simplify this code to just check if there is any next bridge in the chain (be it a panel bridge or regular bridge). Rename panel_bridge field to next_bridge accordingly. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dp/dp_d

[Freedreno] [RFC PATCH 0/7] Simplify and correct msm/dp bridge implementation

2022-01-06 Thread Dmitry Baryshkov
I noticed that commit 8a3b4c17f863 ("drm/msm/dp: employ bridge mechanism for display enable and disable") conflicts with the panel-edp (panel bridge) support. Both bridges will try to attach directly to the drm encoder itself. I started writing lengthy letter describing what is broken and how it s

Re: [Freedreno] [PATCH v4 5/5] drm/msm/dpu: move VBIF blocks handling to dpu_rm

2022-01-06 Thread Stephen Boyd
Quoting Dmitry Baryshkov (2022-01-05 15:10:31) > diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c > b/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c > index bf4d72356a12..2301ac114920 100644 > --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c > +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c > @@ -78,6 +78,10

Re: [Freedreno] [PATCH v4 4/5] drm/msm/dpu: stop embedding dpu_hw_blk into dpu_hw_intf

2022-01-06 Thread Stephen Boyd
Quoting Dmitry Baryshkov (2022-01-05 15:10:30) > Now as dpu_hw_intf is not hanled by dpu_rm_get_assigned_resources, there s/hanled/handled/ > is no point in embedding the (empty) struct dpu_hw_blk into dpu_hw_intf > (and using typecasts between dpu_hw_blk and dpu_hw_intf). Drop it and > use dpu_h

Re: [Freedreno] [PATCH v4 4/5] drm/msm/dpu: stop embedding dpu_hw_blk into dpu_hw_intf

2022-01-06 Thread Stephen Boyd
Quoting Dmitry Baryshkov (2022-01-05 15:10:30) > Now as dpu_hw_intf is not hanled by dpu_rm_get_assigned_resources, there > is no point in embedding the (empty) struct dpu_hw_blk into dpu_hw_intf > (and using typecasts between dpu_hw_blk and dpu_hw_intf). Drop it and > use dpu_hw_intf directly. > >

Re: [Freedreno] [PATCH v4 3/5] drm/msm/dpu: get INTF blocks directly rather than through RM

2022-01-06 Thread Stephen Boyd
Quoting Dmitry Baryshkov (2022-01-05 15:10:29) > INTF blocks are not really handled by resource manager, they are > assigned at dpu_encoder_setup_display using dpu_encoder_get_intf(). > Then this allocation is passed to RM and then returned to then > dpu_encoder. > So allocate them outside of RM an

[Freedreno] [PATCH v4] drm/msm/dp: add support of tps4 (training pattern 4) for HBR3

2022-01-06 Thread Kuogee Hsieh
From: Kuogee Hsieh Some DP sinkers prefer to use tps4 instead of tps3 during training #2. This patch will use tps4 to perform link training #2 if sinker's DPCD supports it. Changes in V2: -- replace dp_catalog_ctrl_set_pattern() with dp_catalog_ctrl_set_pattern_state_bit() Changes in V3: --

Re: [Freedreno] [PATCH v4 2/5] drm/msm/dpu: add DSPP blocks teardown

2022-01-06 Thread Stephen Boyd
Quoting Dmitry Baryshkov (2022-01-05 15:10:28) > Add missing calls to dpu_hw_dspp_destroy() to free resources allocated > for DSPP hardware blocks. > > Fixes: e47616df008b ("drm/msm/dpu: add support for color processing blocks in > dpu driver") > Signed-off-by: Dmitry Baryshkov > --- Reviewed-by

Re: [Freedreno] [PATCH v4 1/5] drm/msm/dpu: drop unused lm_max_width from RM

2022-01-06 Thread Stephen Boyd
Quoting Dmitry Baryshkov (2022-01-05 15:10:27) > No code uses lm_max_width from resource manager, so drop it. Instead of > calculating the lm_max_width, code can use max_mixer_width field from > the hw catalog. > > Signed-off-by: Dmitry Baryshkov > --- Reviewed-by: Stephen Boyd

Re: [Freedreno] [PATCH v2] drm/msm: reduce usage of round_pixclk callback

2022-01-06 Thread Stephen Boyd
Quoting Dmitry Baryshkov (2022-01-05 23:06:56) > The round_pixclk() callback returns different rate only on MDP4 in HDMI > (DTV) case. Stop using this callback in other cases to simplify > mode_valid callbacks. > > Signed-off-by: Dmitry Baryshkov > --- Reviewed-by: Stephen Boyd

Re: [Freedreno] [PATCH v4] drm/msm/dp: populate connector of struct dp_panel

2022-01-06 Thread Stephen Boyd
Quoting Kuogee Hsieh (2022-01-06 12:44:54) > DP CTS test case 4.2.2.6 has valid edid with bad checksum on purpose > and expect DP source return correct checksum. During drm edid read, > correct edid checksum is calculated and stored at > connector::real_edid_checksum. > > The problem is struct dp_p

Re: [Freedreno] [PATCH v3] drm/msm/dp: add support of tps4 (training pattern 4) for HBR3

2022-01-06 Thread Stephen Boyd
Quoting Kuogee Hsieh (2022-01-06 09:14:56) > @@ -1189,12 +1190,20 @@ static int dp_ctrl_link_train_2(struct > dp_ctrl_private *ctrl, > > *training_step = DP_TRAINING_2; > > - if (drm_dp_tps3_supported(ctrl->panel->dpcd)) > + if (drm_dp_tps4_supported(ctrl->panel->dpcd)) { > +

Re: [Freedreno] [PATCH v3] drm/msm/dp: add support of tps4 (training pattern 4) for HBR3

2022-01-06 Thread Stephen Boyd
Quoting Kuogee Hsieh (2022-01-06 09:14:56) > diff --git a/drivers/gpu/drm/msm/dp/dp_ctrl.c > b/drivers/gpu/drm/msm/dp/dp_ctrl.c > index 39558a2..ba70387 100644 > --- a/drivers/gpu/drm/msm/dp/dp_ctrl.c > +++ b/drivers/gpu/drm/msm/dp/dp_ctrl.c > @@ -1189,12 +1190,20 @@ static int dp_ctrl_link_train_

Re: [Freedreno] [PATCH 1/2] drm/msm/gpu: Wait for idle before suspending

2022-01-06 Thread Bjorn Andersson
On Thu 06 Jan 10:14 PST 2022, Rob Clark wrote: > From: Rob Clark > > System suspend uses pm_runtime_force_suspend(), which cheekily bypasses > the runpm reference counts. This doesn't actually work so well when the > GPU is active. So add a reasonable delay waiting for the GPU to become > idle

Re: [Freedreno] [PATCH v4] drm/msm/dp: populate connector of struct dp_panel

2022-01-06 Thread Bjorn Andersson
On Thu 06 Jan 12:44 PST 2022, Kuogee Hsieh wrote: > DP CTS test case 4.2.2.6 has valid edid with bad checksum on purpose > and expect DP source return correct checksum. During drm edid read, > correct edid checksum is calculated and stored at > connector::real_edid_checksum. > Interesting, thank

[Freedreno] [PATCH v5 32/32] component: Remove component_master_ops and friends

2022-01-06 Thread Stephen Boyd
The struct is unused now so drop it along with the functions that use it. Cc: Daniel Vetter Cc: Greg Kroah-Hartman Cc: "Rafael J. Wysocki" Cc: Rob Clark Cc: Russell King Cc: Saravana Kannan Signed-off-by: Stephen Boyd --- drivers/base/component.c | 148 +---

[Freedreno] [PATCH v5 30/32] ASoC: codecs: wcd938x: Migrate to aggregate driver

2022-01-06 Thread Stephen Boyd
Use an aggregate driver instead of component ops so that we can get proper driver probe ordering of the aggregate device with respect to all the component devices that make up the aggregate device. Acked-by: Mark Brown Cc: Jaroslav Kysela Cc: Daniel Vetter Cc: "Rafael J. Wysocki" Cc: Rob Clark

[Freedreno] [PATCH v5 31/32] component: Get rid of drm_of_component_probe()

2022-01-06 Thread Stephen Boyd
There aren't any users anymore so drop it. Cc: Laurent Pinchart Cc: Daniel Vetter Cc: Greg Kroah-Hartman Cc: "Rafael J. Wysocki" Cc: Rob Clark Cc: Russell King Cc: Saravana Kannan Signed-off-by: Stephen Boyd --- drivers/gpu/drm/drm_of.c | 85 +--- inclu

[Freedreno] [PATCH v5 29/32] sound: hdac: Migrate to aggregate driver

2022-01-06 Thread Stephen Boyd
Use an aggregate driver instead of component ops so that we can get proper driver probe ordering of the aggregate device with respect to all the component devices that make up the aggregate device. Cc: Jaroslav Kysela Cc: Takashi Iwai Cc: Kai Vehmanen Cc: Daniel Vetter Cc: "Rafael J. Wysocki"

[Freedreno] [PATCH v5 28/32] fbdev: omap2: Migrate to aggregate driver

2022-01-06 Thread Stephen Boyd
Use an aggregate driver instead of component ops so that we can get proper driver probe ordering of the aggregate device with respect to all the component devices that make up the aggregate device. Cc: Cc: Cc: Daniel Vetter Cc: "Rafael J. Wysocki" Cc: Rob Clark Cc: Russell King Cc: Saravana

[Freedreno] [PATCH v5 27/32] power: supply: ab8500: Migrate to aggregate driver

2022-01-06 Thread Stephen Boyd
Use an aggregate driver instead of component ops so that we can get proper driver probe ordering of the aggregate device with respect to all the component devices that make up the aggregate device. Acked-by: Sebastian Reichel Tested-by: Linus Walleij Cc: Cc: Daniel Vetter Cc: "Rafael J. Wysock

[Freedreno] [PATCH v5 26/32] mei: Migrate to aggregate driver

2022-01-06 Thread Stephen Boyd
Use an aggregate driver instead of component ops so that we can get proper driver probe ordering of the aggregate device with respect to all the component devices that make up the aggregate device. Cc: Tomas Winkler Cc: Vitaly Lubart Cc: Daniele Ceraolo Spurio Cc: Rodrigo Vivi Cc: Arnd Bergman

[Freedreno] [PATCH v5 24/32] drm/vc4: Migrate to aggregate driver

2022-01-06 Thread Stephen Boyd
Use an aggregate driver instead of component ops so that we can get proper driver probe ordering of the aggregate device with respect to all the component devices that make up the aggregate device. Cc: Emma Anholt Cc: Maxime Ripard Cc: Daniel Vetter Cc: "Rafael J. Wysocki" Cc: Rob Clark Cc: R

[Freedreno] [PATCH v5 25/32] iommu/mtk: Migrate to aggregate driver

2022-01-06 Thread Stephen Boyd
Use an aggregate driver instead of component ops so that we can get proper driver probe ordering of the aggregate device with respect to all the component devices that make up the aggregate device. Cc: Yong Wu Cc: Joerg Roedel Cc: Will Deacon Cc: Daniel Vetter Cc: "Rafael J. Wysocki" Cc: Rob

[Freedreno] [PATCH v5 22/32] drm/sun4i: Migrate to aggregate driver

2022-01-06 Thread Stephen Boyd
Use an aggregate driver instead of component ops so that we can get proper driver probe ordering of the aggregate device with respect to all the component devices that make up the aggregate device. Cc: Maxime Ripard Cc: Chen-Yu Tsai Cc: Daniel Vetter Cc: "Rafael J. Wysocki" Cc: Rob Clark Cc:

[Freedreno] [PATCH v5 23/32] drm/tilcdc: Migrate to aggregate driver

2022-01-06 Thread Stephen Boyd
Use an aggregate driver instead of component ops so that we can get proper driver probe ordering of the aggregate device with respect to all the component devices that make up the aggregate device. Tested-by: Jyri Sarha Cc: Tomi Valkeinen Cc: Daniel Vetter Cc: "Rafael J. Wysocki" Cc: Rob Clark

[Freedreno] [PATCH v5 19/32] drm/omap: Migrate to aggregate driver

2022-01-06 Thread Stephen Boyd
Use an aggregate driver instead of component ops so that we can get proper driver probe ordering of the aggregate device with respect to all the component devices that make up the aggregate device. Cc: Tomi Valkeinen Cc: Daniel Vetter Cc: "Rafael J. Wysocki" Cc: Rob Clark Cc: Russell King Cc:

[Freedreno] [PATCH v5 21/32] drm/sti: Migrate to aggregate driver

2022-01-06 Thread Stephen Boyd
Use an aggregate driver instead of component ops so that we can get proper driver probe ordering of the aggregate device with respect to all the component devices that make up the aggregate device. Cc: Daniel Vetter Cc: "Rafael J. Wysocki" Cc: Rob Clark Cc: Russell King Cc: Saravana Kannan Si

[Freedreno] [PATCH v5 20/32] drm/rockchip: Migrate to aggregate driver

2022-01-06 Thread Stephen Boyd
Use an aggregate driver instead of component ops so that we can get proper driver probe ordering of the aggregate device with respect to all the component devices that make up the aggregate device. Cc: Sandy Huang Cc: "Heiko Stübner" Cc: Daniel Vetter Cc: "Rafael J. Wysocki" Cc: Rob Clark Cc:

[Freedreno] [PATCH v5 18/32] drm/meson: Migrate to aggregate driver

2022-01-06 Thread Stephen Boyd
Use an aggregate driver instead of component ops so that we can get proper driver probe ordering of the aggregate device with respect to all the component devices that make up the aggregate device. Cc: Neil Armstrong Cc: Daniel Vetter Cc: "Rafael J. Wysocki" Cc: Rob Clark Cc: Russell King Cc:

[Freedreno] [PATCH v5 17/32] drm/mediatek: Migrate to aggregate driver

2022-01-06 Thread Stephen Boyd
Use an aggregate driver instead of component ops so that we can get proper driver probe ordering of the aggregate device with respect to all the component devices that make up the aggregate device. Cc: Chun-Kuang Hu Cc: Philipp Zabel Cc: Daniel Vetter Cc: "Rafael J. Wysocki" Cc: Rob Clark Cc:

[Freedreno] [PATCH v5 16/32] drm/mcde: Migrate to aggregate driver

2022-01-06 Thread Stephen Boyd
Use an aggregate driver instead of component ops so that we can get proper driver probe ordering of the aggregate device with respect to all the component devices that make up the aggregate device. Cc: Daniel Vetter Cc: "Rafael J. Wysocki" Cc: Rob Clark Cc: Russell King Cc: Saravana Kannan Te

[Freedreno] [PATCH v5 15/32] drm/ingenic: Migrate to aggregate driver

2022-01-06 Thread Stephen Boyd
Use an aggregate driver instead of component ops so that we can get proper driver probe ordering of the aggregate device with respect to all the component devices that make up the aggregate device. TODO: Move the helpers to PM in aggregate driver hooks. Acked-by: Paul Cercueil Cc: Daniel Vetter

[Freedreno] [PATCH v5 12/32] drm/kirin: Migrate to aggregate driver

2022-01-06 Thread Stephen Boyd
Use an aggregate driver instead of component ops so that we can get proper driver probe ordering of the aggregate device with respect to all the component devices that make up the aggregate device. Cc: Xinliang Liu Cc: Tian Tao Cc: John Stultz Cc: Xinwei Kong Cc: Chen Feng Cc: Daniel Vetter

[Freedreno] [PATCH v5 14/32] drm/imx: Migrate to aggregate driver

2022-01-06 Thread Stephen Boyd
Use an aggregate driver instead of component ops so that we can get proper driver probe ordering of the aggregate device with respect to all the component devices that make up the aggregate device. Cc: Philipp Zabel Cc: Daniel Vetter Cc: "Rafael J. Wysocki" Cc: Rob Clark Cc: Russell King Cc:

[Freedreno] [PATCH v5 13/32] drm/exynos: Migrate to aggregate driver

2022-01-06 Thread Stephen Boyd
Use an aggregate driver instead of component ops so that we can get proper driver probe ordering of the aggregate device with respect to all the component devices that make up the aggregate device. Cc: Inki Dae Cc: Joonyoung Shim Cc: Seung-Woo Kim Cc: Kyungmin Park Cc: Daniel Vetter Cc: "Rafa

[Freedreno] [PATCH v5 11/32] drm/etnaviv: Migrate to aggregate driver

2022-01-06 Thread Stephen Boyd
Use an aggregate driver instead of component ops so that we can get proper driver probe ordering of the aggregate device with respect to all the component devices that make up the aggregate device. Cc: Lucas Stach Cc: Russell King Cc: Christian Gmeiner Cc: Daniel Vetter Cc: "Rafael J. Wysocki"

[Freedreno] [PATCH v5 06/32] drm/msm: Migrate to aggregate driver

2022-01-06 Thread Stephen Boyd
The device lists are poorly ordered when the component device code is used. This is because component_master_add_with_match() returns 0 regardless of component devices calling component_add() first. It can really only fail if an allocation fails, in which case everything is going bad and we're out

[Freedreno] [PATCH v5 10/32] drm/armada: Migrate to aggregate driver

2022-01-06 Thread Stephen Boyd
Use an aggregate driver instead of component ops so that we can get proper driver probe ordering of the aggregate device with respect to all the component devices that make up the aggregate device. Cc: Russell King Cc: Daniel Vetter Cc: "Rafael J. Wysocki" Cc: Rob Clark Cc: Saravana Kannan Si

[Freedreno] [PATCH v5 09/32] drm/malidp: Migrate to aggregate driver

2022-01-06 Thread Stephen Boyd
Use an aggregate driver instead of component ops so that we can get proper driver probe ordering of the aggregate device with respect to all the component devices that make up the aggregate device. TODO: This can be updated to move the drm helper logic into the aggregate driver shutdown op. Cc: L

[Freedreno] [PATCH v5 08/32] drm/arm/hdlcd: Migrate to aggregate driver

2022-01-06 Thread Stephen Boyd
Use an aggregate driver instead of component ops so that we can get proper driver probe ordering of the aggregate device with respect to all the component devices that make up the aggregate device. Cc: Liviu Dudau Cc: Daniel Vetter Cc: "Rafael J. Wysocki" Cc: Rob Clark Cc: Russell King Cc: Sa

[Freedreno] [PATCH v5 07/32] drm/komeda: Migrate to aggregate driver

2022-01-06 Thread Stephen Boyd
Use an aggregate driver instead of component ops so that we can get proper driver probe ordering of the aggregate device with respect to all the component devices that make up the aggregate device. Cc: James Qian Wang (Arm Technology China) Cc: Daniel Vetter Cc: "Rafael J. Wysocki" Cc: Rob Clar

[Freedreno] [PATCH v5 05/32] drm/of: Add a drm_of_aggregate_probe() API

2022-01-06 Thread Stephen Boyd
Similar to drm_of_component_probe() but using the new API that registers a driver instead of an ops struct. This allows us to migrate the users of drm_of_component_probe() to the new way of doing things. Cc: Laurent Pinchart Cc: Daniel Vetter Cc: "Rafael J. Wysocki" Cc: Rob Clark Cc: Russell K

[Freedreno] [PATCH v5 03/32] component: Move struct aggregate_device out to header file

2022-01-06 Thread Stephen Boyd
This allows aggregate driver writers to use the device passed to their probe/remove/shutdown functions properly instead of treating it as an opaque pointer. Cc: Daniel Vetter Cc: Greg Kroah-Hartman Cc: Laurent Pinchart Cc: "Rafael J. Wysocki" Cc: Rob Clark Cc: Russell King Cc: Saravana Kanna

[Freedreno] [PATCH v5 04/32] component: Add {bind, unbind}_component() ops that take aggregate device

2022-01-06 Thread Stephen Boyd
We'd like to get more device model features in the component framework so let's pass the struct aggregate_device pointer instead of the parent device pointer to the component binding functions. This will allow drivers to inspect and control things related to the aggregate device in case they need i

[Freedreno] [PATCH v5 02/32] component: Introduce the aggregate bus_type

2022-01-06 Thread Stephen Boyd
The component framework only provides 'bind' and 'unbind' callbacks to tell the host driver that it is time to assemble the aggregate driver now that all the components have probed. The component framework doesn't attempt to resolve runtime PM or suspend/resume ordering, and explicitly mentions thi

[Freedreno] [PATCH v5 01/32] component: Replace most references to 'master' with 'aggregate device'

2022-01-06 Thread Stephen Boyd
Remove most references to 'master' in the code and replace them with some form of 'aggregate device'. This better reflects the reality of what this code does, i.e. an aggregate device that represents a device like a GPU card once some set of devices that make up the aggregate device probe and regis

[Freedreno] [PATCH v5 00/32] component: Make into an aggregate bus

2022-01-06 Thread Stephen Boyd
This series is from discussion we had on reordering the device lists for drm shutdown paths[1]. I've introduced an 'aggregate' bus that we put the aggregate device onto and then we probe the aggregate device once all the components are probed and call component_add(). The probe/remove hooks are whe

[Freedreno] [PATCH v4] drm/msm/dp: populate connector of struct dp_panel

2022-01-06 Thread Kuogee Hsieh
DP CTS test case 4.2.2.6 has valid edid with bad checksum on purpose and expect DP source return correct checksum. During drm edid read, correct edid checksum is calculated and stored at connector::real_edid_checksum. The problem is struct dp_panel::connector never be assigned, instead the connect

[Freedreno] [PATCH v4] drm/msm/dp: populate connector of struct dp_panel

2022-01-06 Thread Kuogee Hsieh
DP CTS test case 4.2.2.6 has valid edid with bad checksum on purpose and expect DP source return correct checksum. During drm edid read, correct edid checksum is calculated and stored at connector::real_edid_checksum. The problem is struct dp_panel::connector never be assigned, instead the connect

[Freedreno] [PATCH 2/2] drm/msm/gpu: Cancel idle/boost work on suspend

2022-01-06 Thread Rob Clark
From: Rob Clark With system suspend using pm_runtime_force_suspend() we can't rely on the pm_runtime_get_if_in_use() trick to deal with devfreq callbacks after (or racing with) suspend. So flush any pending idle or boost work in the suspend path. Signed-off-by: Rob Clark --- drivers/gpu/drm/m

[Freedreno] [PATCH 1/2] drm/msm/gpu: Wait for idle before suspending

2022-01-06 Thread Rob Clark
From: Rob Clark System suspend uses pm_runtime_force_suspend(), which cheekily bypasses the runpm reference counts. This doesn't actually work so well when the GPU is active. So add a reasonable delay waiting for the GPU to become idle. Alternatively we could just return -EBUSY in this case, b

[Freedreno] [PATCH 0/2] drm/msm/gpu: System suspend fixes

2022-01-06 Thread Rob Clark
From: Rob Clark Because system suspend uses pm_runtime_force_suspend() we can't rely runpm refcnt's to protect us if the GPU is active, etc. Fortunately *usually* the GPU is idle when system suspend is triggered. But that isn't quite good enough. The first patch attempts to block for a modest

Re: [Freedreno] [PATCH v3] drm/msm/dp: populate connector of struct dp_panel

2022-01-06 Thread Bjorn Andersson
On Thu 06 Jan 09:15 PST 2022, Kuogee Hsieh wrote: > We never assign struct dp_panel::connector, instead the connector is > stored in struct msm_dp::connector. When we run compliance testing test > case 4.2.2.6 dp_panel_handle_sink_request() won't have a valid edid set I unfortunately have no idea

[Freedreno] [PATCH v3] drm/msm/dp: populate connector of struct dp_panel

2022-01-06 Thread Kuogee Hsieh
We never assign struct dp_panel::connector, instead the connector is stored in struct msm_dp::connector. When we run compliance testing test case 4.2.2.6 dp_panel_handle_sink_request() won't have a valid edid set in struct dp_panel::edid so we'll try to use the connectors real_edid_checksum and hit

[Freedreno] [PATCH v3] drm/msm/dp: add support of tps4 (training pattern 4) for HBR3

2022-01-06 Thread Kuogee Hsieh
From: Kuogee Hsieh Some DP sinkers prefer to use tps4 instead of tps3 during training #2. This patch will use tps4 to perform link training #2 if sinker's DPCD supports it. Changes in V2: -- replace dp_catalog_ctrl_set_pattern() with dp_catalog_ctrl_set_pattern_state_bit() Changes in V3: --

Re: [Freedreno] [PATCH v2] drm/msm/dp: populate connector of struct dp_panel

2022-01-06 Thread Kuogee Hsieh
On 1/5/2022 1:34 PM, Stephen Boyd wrote: Quoting Kuogee Hsieh (2021-12-29 11:17:02) There is kernel crashed due to unable to handle kernel NULL pointer dereference of dp_panel->connector while running DP link layer compliance test case 4.2.2.6 (EDID Corruption Detection). Can you explain how