* [PATCH AUTOSEL 6.11 01/15] usb: chipidea: add CI_HDRC_HAS_SHORT_PKT_LIMIT flag
@ 2024-12-04 22:16 Sasha Levin
2024-12-04 22:17 ` [PATCH AUTOSEL 6.11 08/15] drm: display: Set fwnode for aux bus devices Sasha Levin
0 siblings, 1 reply; 5+ messages in thread
From: Sasha Levin @ 2024-12-04 22:16 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Xu Yang, Peter Chen, Greg Kroah-Hartman, Sasha Levin, shawnguo,
linux-usb, imx, linux-arm-kernel
From: Xu Yang <xu.yang_2@nxp.com>
[ Upstream commit ec841b8d73cff37f8960e209017efe1eb2fb21f2 ]
Currently, the imx deivice controller has below limitations:
1. can't generate short packet interrupt if IOC not set in dTD. So if one
request span more than one dTDs and only the last dTD set IOC, the usb
request will pending there if no more data comes.
2. the controller can't accurately deliver data to differtent usb requests
in some cases due to short packet. For example: one usb request span 3
dTDs, then if the controller received a short packet the next packet
will go to 2nd dTD of current request rather than the first dTD of next
request.
3. can't build a bus packet use multiple dTDs. For example: controller
needs to send one packet of 512 bytes use dTD1 (200 bytes) + dTD2
(312 bytes), actually the host side will see 200 bytes short packet.
Based on these limits, add CI_HDRC_HAS_SHORT_PKT_LIMIT flag and use it on
imx platforms.
Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
Acked-by: Peter Chen <peter.chen@kernel.org>
Link: https://lore.kernel.org/r/20240923081203.2851768-1-xu.yang_2@nxp.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/usb/chipidea/ci.h | 1 +
drivers/usb/chipidea/ci_hdrc_imx.c | 1 +
drivers/usb/chipidea/core.c | 2 ++
include/linux/usb/chipidea.h | 1 +
4 files changed, 5 insertions(+)
diff --git a/drivers/usb/chipidea/ci.h b/drivers/usb/chipidea/ci.h
index 2a38e1eb65466..e4b003d060c26 100644
--- a/drivers/usb/chipidea/ci.h
+++ b/drivers/usb/chipidea/ci.h
@@ -260,6 +260,7 @@ struct ci_hdrc {
bool b_sess_valid_event;
bool imx28_write_fix;
bool has_portsc_pec_bug;
+ bool has_short_pkt_limit;
bool supports_runtime_pm;
bool in_lpm;
bool wakeup_int;
diff --git a/drivers/usb/chipidea/ci_hdrc_imx.c b/drivers/usb/chipidea/ci_hdrc_imx.c
index bdc04ce919f7a..b76e7c3fa2c6e 100644
--- a/drivers/usb/chipidea/ci_hdrc_imx.c
+++ b/drivers/usb/chipidea/ci_hdrc_imx.c
@@ -342,6 +342,7 @@ static int ci_hdrc_imx_probe(struct platform_device *pdev)
struct ci_hdrc_platform_data pdata = {
.name = dev_name(&pdev->dev),
.capoffset = DEF_CAPOFFSET,
+ .flags = CI_HDRC_HAS_SHORT_PKT_LIMIT,
.notify_event = ci_hdrc_imx_notify_event,
};
int ret;
diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c
index 835bf2428dc6e..5aa16dbfc289c 100644
--- a/drivers/usb/chipidea/core.c
+++ b/drivers/usb/chipidea/core.c
@@ -1076,6 +1076,8 @@ static int ci_hdrc_probe(struct platform_device *pdev)
CI_HDRC_SUPPORTS_RUNTIME_PM);
ci->has_portsc_pec_bug = !!(ci->platdata->flags &
CI_HDRC_HAS_PORTSC_PEC_MISSED);
+ ci->has_short_pkt_limit = !!(ci->platdata->flags &
+ CI_HDRC_HAS_SHORT_PKT_LIMIT);
platform_set_drvdata(pdev, ci);
ret = hw_device_init(ci, base);
diff --git a/include/linux/usb/chipidea.h b/include/linux/usb/chipidea.h
index 5a7f96684ea22..ebdfef124b2bc 100644
--- a/include/linux/usb/chipidea.h
+++ b/include/linux/usb/chipidea.h
@@ -65,6 +65,7 @@ struct ci_hdrc_platform_data {
#define CI_HDRC_PHY_VBUS_CONTROL BIT(16)
#define CI_HDRC_HAS_PORTSC_PEC_MISSED BIT(17)
#define CI_HDRC_FORCE_VBUS_ACTIVE_ALWAYS BIT(18)
+#define CI_HDRC_HAS_SHORT_PKT_LIMIT BIT(19)
enum usb_dr_mode dr_mode;
#define CI_HDRC_CONTROLLER_RESET_EVENT 0
#define CI_HDRC_CONTROLLER_STOPPED_EVENT 1
--
2.43.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH AUTOSEL 6.11 08/15] drm: display: Set fwnode for aux bus devices
2024-12-04 22:16 [PATCH AUTOSEL 6.11 01/15] usb: chipidea: add CI_HDRC_HAS_SHORT_PKT_LIMIT flag Sasha Levin
@ 2024-12-04 22:17 ` Sasha Levin
2024-12-06 0:06 ` Saravana Kannan
0 siblings, 1 reply; 5+ messages in thread
From: Sasha Levin @ 2024-12-04 22:17 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Saravana Kannan, Nícolas F . R . A . Prado, Dmitry Baryshkov,
Thierry Reding, AngeloGioacchino Del Regno, Greg Kroah-Hartman,
Sasha Levin, maarten.lankhorst, mripard, tzimmermann, airlied,
simona, matthias.bgg, elder, ricardo, sumit.garg, dri-devel,
linux-arm-kernel, linux-mediatek
From: Saravana Kannan <saravanak@google.com>
[ Upstream commit fe2e59aa5d7077c5c564d55b7e2997e83710c314 ]
fwnode needs to be set for a device for fw_devlink to be able to
track/enforce its dependencies correctly. Without this, you'll see error
messages like this when the supplier has probed and tries to make sure
all its fwnode consumers are linked to it using device links:
mediatek-drm-dp 1c500000.edp-tx: Failed to create device link (0x180) with backlight-lcd0
Reported-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Closes: https://lore.kernel.org/all/7b995947-4540-4b17-872e-e107adca4598@notapiano/
Tested-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Signed-off-by: Saravana Kannan <saravanak@google.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Tested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20241024061347.1771063-2-saravanak@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/gpu/drm/display/drm_dp_aux_bus.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/display/drm_dp_aux_bus.c b/drivers/gpu/drm/display/drm_dp_aux_bus.c
index d810529ebfb6e..ec7eac6b595f7 100644
--- a/drivers/gpu/drm/display/drm_dp_aux_bus.c
+++ b/drivers/gpu/drm/display/drm_dp_aux_bus.c
@@ -292,7 +292,7 @@ int of_dp_aux_populate_bus(struct drm_dp_aux *aux,
aux_ep->dev.parent = aux->dev;
aux_ep->dev.bus = &dp_aux_bus_type;
aux_ep->dev.type = &dp_aux_device_type_type;
- aux_ep->dev.of_node = of_node_get(np);
+ device_set_node(&aux_ep->dev, of_fwnode_handle(of_node_get(np)));
dev_set_name(&aux_ep->dev, "aux-%s", dev_name(aux->dev));
ret = device_register(&aux_ep->dev);
--
2.43.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH AUTOSEL 6.11 08/15] drm: display: Set fwnode for aux bus devices
2024-12-04 22:17 ` [PATCH AUTOSEL 6.11 08/15] drm: display: Set fwnode for aux bus devices Sasha Levin
@ 2024-12-06 0:06 ` Saravana Kannan
2024-12-06 0:07 ` Saravana Kannan
0 siblings, 1 reply; 5+ messages in thread
From: Saravana Kannan @ 2024-12-06 0:06 UTC (permalink / raw)
To: Sasha Levin
Cc: linux-kernel, stable, Nícolas F . R . A . Prado,
Dmitry Baryshkov, Thierry Reding, AngeloGioacchino Del Regno,
Greg Kroah-Hartman, maarten.lankhorst, mripard, tzimmermann,
airlied, simona, matthias.bgg, elder, ricardo, sumit.garg,
dri-devel, linux-arm-kernel, linux-mediatek
On Wed, Dec 4, 2024 at 3:29 PM Sasha Levin <sashal@kernel.org> wrote:
>
> From: Saravana Kannan <saravanak@google.com>
>
> [ Upstream commit fe2e59aa5d7077c5c564d55b7e2997e83710c314 ]
>
> fwnode needs to be set for a device for fw_devlink to be able to
> track/enforce its dependencies correctly. Without this, you'll see error
> messages like this when the supplier has probed and tries to make sure
> all its fwnode consumers are linked to it using device links:
>
> mediatek-drm-dp 1c500000.edp-tx: Failed to create device link (0x180) with backlight-lcd0
>
> Reported-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
> Closes: https://lore.kernel.org/all/7b995947-4540-4b17-872e-e107adca4598@notapiano/
> Tested-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
> Signed-off-by: Saravana Kannan <saravanak@google.com>
> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> Reviewed-by: Thierry Reding <treding@nvidia.com>
> Tested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
> Link: https://lore.kernel.org/r/20241024061347.1771063-2-saravanak@google.com
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Signed-off-by: Sasha Levin <sashal@kernel.org>
As mentioned in the original cover letter:
PSA: Do not pull any of these patches into stable kernels. fw_devlink
had a lot of changes that landed in the last year. It's hard to ensure
cherry-picks have picked up all the dependencies correctly. If any of
these really need to get cherry-picked into stable kernels, cc me and
wait for my explicit Ack.
Is there a pressing need for this in 4.19?
-Saravana
> ---
> drivers/gpu/drm/display/drm_dp_aux_bus.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/display/drm_dp_aux_bus.c b/drivers/gpu/drm/display/drm_dp_aux_bus.c
> index d810529ebfb6e..ec7eac6b595f7 100644
> --- a/drivers/gpu/drm/display/drm_dp_aux_bus.c
> +++ b/drivers/gpu/drm/display/drm_dp_aux_bus.c
> @@ -292,7 +292,7 @@ int of_dp_aux_populate_bus(struct drm_dp_aux *aux,
> aux_ep->dev.parent = aux->dev;
> aux_ep->dev.bus = &dp_aux_bus_type;
> aux_ep->dev.type = &dp_aux_device_type_type;
> - aux_ep->dev.of_node = of_node_get(np);
> + device_set_node(&aux_ep->dev, of_fwnode_handle(of_node_get(np)));
> dev_set_name(&aux_ep->dev, "aux-%s", dev_name(aux->dev));
>
> ret = device_register(&aux_ep->dev);
> --
> 2.43.0
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH AUTOSEL 6.11 08/15] drm: display: Set fwnode for aux bus devices
2024-12-06 0:06 ` Saravana Kannan
@ 2024-12-06 0:07 ` Saravana Kannan
2024-12-10 16:12 ` Sasha Levin
0 siblings, 1 reply; 5+ messages in thread
From: Saravana Kannan @ 2024-12-06 0:07 UTC (permalink / raw)
To: Sasha Levin
Cc: linux-kernel, stable, Nícolas F . R . A . Prado,
Dmitry Baryshkov, Thierry Reding, AngeloGioacchino Del Regno,
Greg Kroah-Hartman, maarten.lankhorst, mripard, tzimmermann,
airlied, simona, matthias.bgg, elder, ricardo, sumit.garg,
dri-devel, linux-arm-kernel, linux-mediatek
On Thu, Dec 5, 2024 at 4:06 PM Saravana Kannan <saravanak@google.com> wrote:
>
> On Wed, Dec 4, 2024 at 3:29 PM Sasha Levin <sashal@kernel.org> wrote:
> >
> > From: Saravana Kannan <saravanak@google.com>
> >
> > [ Upstream commit fe2e59aa5d7077c5c564d55b7e2997e83710c314 ]
> >
> > fwnode needs to be set for a device for fw_devlink to be able to
> > track/enforce its dependencies correctly. Without this, you'll see error
> > messages like this when the supplier has probed and tries to make sure
> > all its fwnode consumers are linked to it using device links:
> >
> > mediatek-drm-dp 1c500000.edp-tx: Failed to create device link (0x180) with backlight-lcd0
> >
> > Reported-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
> > Closes: https://lore.kernel.org/all/7b995947-4540-4b17-872e-e107adca4598@notapiano/
> > Tested-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
> > Signed-off-by: Saravana Kannan <saravanak@google.com>
> > Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> > Reviewed-by: Thierry Reding <treding@nvidia.com>
> > Tested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
> > Link: https://lore.kernel.org/r/20241024061347.1771063-2-saravanak@google.com
> > Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > Signed-off-by: Sasha Levin <sashal@kernel.org>
>
> As mentioned in the original cover letter:
>
> PSA: Do not pull any of these patches into stable kernels. fw_devlink
> had a lot of changes that landed in the last year. It's hard to ensure
> cherry-picks have picked up all the dependencies correctly. If any of
> these really need to get cherry-picked into stable kernels, cc me and
> wait for my explicit Ack.
>
> Is there a pressing need for this in 4.19?
I copy pasted this into several replies. In all those cases I meant
the kernel version mentioned in the subject.
-Saravana
>
> -Saravana
>
> > ---
> > drivers/gpu/drm/display/drm_dp_aux_bus.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/display/drm_dp_aux_bus.c b/drivers/gpu/drm/display/drm_dp_aux_bus.c
> > index d810529ebfb6e..ec7eac6b595f7 100644
> > --- a/drivers/gpu/drm/display/drm_dp_aux_bus.c
> > +++ b/drivers/gpu/drm/display/drm_dp_aux_bus.c
> > @@ -292,7 +292,7 @@ int of_dp_aux_populate_bus(struct drm_dp_aux *aux,
> > aux_ep->dev.parent = aux->dev;
> > aux_ep->dev.bus = &dp_aux_bus_type;
> > aux_ep->dev.type = &dp_aux_device_type_type;
> > - aux_ep->dev.of_node = of_node_get(np);
> > + device_set_node(&aux_ep->dev, of_fwnode_handle(of_node_get(np)));
> > dev_set_name(&aux_ep->dev, "aux-%s", dev_name(aux->dev));
> >
> > ret = device_register(&aux_ep->dev);
> > --
> > 2.43.0
> >
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH AUTOSEL 6.11 08/15] drm: display: Set fwnode for aux bus devices
2024-12-06 0:07 ` Saravana Kannan
@ 2024-12-10 16:12 ` Sasha Levin
0 siblings, 0 replies; 5+ messages in thread
From: Sasha Levin @ 2024-12-10 16:12 UTC (permalink / raw)
To: Saravana Kannan
Cc: linux-kernel, stable, Nícolas F . R . A . Prado,
Dmitry Baryshkov, Thierry Reding, AngeloGioacchino Del Regno,
Greg Kroah-Hartman, maarten.lankhorst, mripard, tzimmermann,
airlied, simona, matthias.bgg, elder, ricardo, sumit.garg,
dri-devel, linux-arm-kernel, linux-mediatek
On Thu, Dec 05, 2024 at 04:07:45PM -0800, Saravana Kannan wrote:
>On Thu, Dec 5, 2024 at 4:06 PM Saravana Kannan <saravanak@google.com> wrote:
>>
>> On Wed, Dec 4, 2024 at 3:29 PM Sasha Levin <sashal@kernel.org> wrote:
>> >
>> > From: Saravana Kannan <saravanak@google.com>
>> >
>> > [ Upstream commit fe2e59aa5d7077c5c564d55b7e2997e83710c314 ]
>> >
>> > fwnode needs to be set for a device for fw_devlink to be able to
>> > track/enforce its dependencies correctly. Without this, you'll see error
>> > messages like this when the supplier has probed and tries to make sure
>> > all its fwnode consumers are linked to it using device links:
>> >
>> > mediatek-drm-dp 1c500000.edp-tx: Failed to create device link (0x180) with backlight-lcd0
>> >
>> > Reported-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
>> > Closes: https://lore.kernel.org/all/7b995947-4540-4b17-872e-e107adca4598@notapiano/
>> > Tested-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
>> > Signed-off-by: Saravana Kannan <saravanak@google.com>
>> > Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
>> > Reviewed-by: Thierry Reding <treding@nvidia.com>
>> > Tested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
>> > Link: https://lore.kernel.org/r/20241024061347.1771063-2-saravanak@google.com
>> > Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>> > Signed-off-by: Sasha Levin <sashal@kernel.org>
>>
>> As mentioned in the original cover letter:
>>
>> PSA: Do not pull any of these patches into stable kernels. fw_devlink
>> had a lot of changes that landed in the last year. It's hard to ensure
>> cherry-picks have picked up all the dependencies correctly. If any of
>> these really need to get cherry-picked into stable kernels, cc me and
>> wait for my explicit Ack.
>>
>> Is there a pressing need for this in 4.19?
>
>I copy pasted this into several replies. In all those cases I meant
>the kernel version mentioned in the subject.
I'll drop this and the other patch you've pointed out, thanks!
--
Thanks,
Sasha
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-12-10 16:16 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-04 22:16 [PATCH AUTOSEL 6.11 01/15] usb: chipidea: add CI_HDRC_HAS_SHORT_PKT_LIMIT flag Sasha Levin
2024-12-04 22:17 ` [PATCH AUTOSEL 6.11 08/15] drm: display: Set fwnode for aux bus devices Sasha Levin
2024-12-06 0:06 ` Saravana Kannan
2024-12-06 0:07 ` Saravana Kannan
2024-12-10 16:12 ` Sasha Levin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox