Re: [PATCH] drm/msm/dp: move link_ready out of HPD event thread

2024-03-21 Thread Johan Hovold
On Mon, Mar 18, 2024 at 11:01:25AM -0700, Abhinav Kumar wrote: > On 3/15/2024 8:57 AM, Johan Hovold wrote: > > On Thu, Mar 14, 2024 at 09:30:57AM -0700, Abhinav Kumar wrote: > >> The race condition is between the time we get disconnect event and set > >> link_ready to false, a commit can come in.

Re: [PATCH] drm/msm/dp: move link_ready out of HPD event thread

2024-03-18 Thread Abhinav Kumar
On 3/15/2024 8:57 AM, Johan Hovold wrote: On Thu, Mar 14, 2024 at 09:30:57AM -0700, Abhinav Kumar wrote: On 3/14/2024 8:38 AM, Johan Hovold wrote: On Wed, Mar 13, 2024 at 10:24:08AM -0700, Abhinav Kumar wrote: Perhaps I'm missing something in the race that you are trying to describe (and

Re: [PATCH] drm/msm/dp: move link_ready out of HPD event thread

2024-03-15 Thread Johan Hovold
On Thu, Mar 14, 2024 at 09:30:57AM -0700, Abhinav Kumar wrote: > On 3/14/2024 8:38 AM, Johan Hovold wrote: > > On Wed, Mar 13, 2024 at 10:24:08AM -0700, Abhinav Kumar wrote: > > Perhaps I'm missing something in the race that you are trying to > > describe (and which I've asked you to describe in m

Re: [PATCH] drm/msm/dp: move link_ready out of HPD event thread

2024-03-14 Thread Abhinav Kumar
On 3/14/2024 8:38 AM, Johan Hovold wrote: On Wed, Mar 13, 2024 at 10:24:08AM -0700, Abhinav Kumar wrote: On 3/13/2024 1:18 AM, Johan Hovold wrote: Right, but your proposed fix would not actually fix anything and judging from the sparse commit message and diff itself it is clearly only mean

Re: [PATCH] drm/msm/dp: move link_ready out of HPD event thread

2024-03-14 Thread Johan Hovold
On Wed, Mar 13, 2024 at 10:24:08AM -0700, Abhinav Kumar wrote: > On 3/13/2024 1:18 AM, Johan Hovold wrote: > > Right, but your proposed fix would not actually fix anything and judging > > from the sparse commit message and diff itself it is clearly only meant > > to mitigate the case where user sp

Re: [PATCH] drm/msm/dp: move link_ready out of HPD event thread

2024-03-13 Thread Abhinav Kumar
On 3/13/2024 1:18 AM, Johan Hovold wrote: On Tue, Mar 12, 2024 at 10:39:46AM -0700, Abhinav Kumar wrote: On 3/12/2024 9:59 AM, Johan Hovold wrote: Heh. This is getting ridiculous. I just tried running with this patch and it again breaks hotplug detect in a VT console and in X (where I coul

Re: [PATCH] drm/msm/dp: move link_ready out of HPD event thread

2024-03-13 Thread Johan Hovold
On Tue, Mar 12, 2024 at 10:39:46AM -0700, Abhinav Kumar wrote: > On 3/12/2024 9:59 AM, Johan Hovold wrote: > >> Heh. This is getting ridiculous. I just tried running with this patch > >> and it again breaks hotplug detect in a VT console and in X (where I > >> could enable a reconnected external d

Re: [PATCH] drm/msm/dp: move link_ready out of HPD event thread

2024-03-12 Thread Abhinav Kumar
On 3/12/2024 9:59 AM, Johan Hovold wrote: On Tue, Mar 12, 2024 at 05:41:23PM +0100, Johan Hovold wrote: On Tue, Mar 12, 2024 at 11:09:11AM +0100, Johan Hovold wrote: On Fri, Mar 08, 2024 at 01:45:32PM -0800, Abhinav Kumar wrote: @@ -466,6 +466,8 @@ static int dp_display_notify_disconnect(

Re: [PATCH] drm/msm/dp: move link_ready out of HPD event thread

2024-03-12 Thread Johan Hovold
On Tue, Mar 12, 2024 at 05:41:23PM +0100, Johan Hovold wrote: > On Tue, Mar 12, 2024 at 11:09:11AM +0100, Johan Hovold wrote: > > On Fri, Mar 08, 2024 at 01:45:32PM -0800, Abhinav Kumar wrote: > > > > @@ -466,6 +466,8 @@ static int dp_display_notify_disconnect(struct device > > > *dev) > > > { >

Re: [PATCH] drm/msm/dp: move link_ready out of HPD event thread

2024-03-12 Thread Johan Hovold
On Tue, Mar 12, 2024 at 11:09:11AM +0100, Johan Hovold wrote: > On Fri, Mar 08, 2024 at 01:45:32PM -0800, Abhinav Kumar wrote: > > @@ -466,6 +466,8 @@ static int dp_display_notify_disconnect(struct device > > *dev) > > { > > struct dp_display_private *dp = dev_get_dp_display_private(dev); >

Re: [PATCH] drm/msm/dp: move link_ready out of HPD event thread

2024-03-12 Thread Johan Hovold
On Fri, Mar 08, 2024 at 01:45:32PM -0800, Abhinav Kumar wrote: > There are cases where the userspace might still send another > frame after the HPD disconnect causing a modeset cycle after > a disconnect. This messes the internal state machine of MSM DP driver > and can lead to a crash as there can

Re: [PATCH] drm/msm/dp: move link_ready out of HPD event thread

2024-03-11 Thread Kuogee Hsieh
On 3/8/2024 1:45 PM, Abhinav Kumar wrote: There are cases where the userspace might still send another frame after the HPD disconnect causing a modeset cycle after a disconnect. This messes the internal state machine of MSM DP driver and can lead to a crash as there can be an imbalance between

Re: [RFC PATCH] drm/msm/dp: move link_ready out of HPD event thread

2024-03-11 Thread Kuogee Hsieh
On 3/6/2024 11:50 AM, Abhinav Kumar wrote: There are cases where the userspace might still send another frame after the HPD disconnect causing a modeset cycle after a disconnect. This messes the internal state machine of MSM DP driver and can lead to a crash as there can be an imbalance between

[PATCH] drm/msm/dp: move link_ready out of HPD event thread

2024-03-08 Thread Abhinav Kumar
There are cases where the userspace might still send another frame after the HPD disconnect causing a modeset cycle after a disconnect. This messes the internal state machine of MSM DP driver and can lead to a crash as there can be an imbalance between bridge_disable() and bridge_enable(). This wa

Re: [RFC PATCH] drm/msm/dp: move link_ready out of HPD event thread

2024-03-06 Thread Dmitry Baryshkov
On Wed, 6 Mar 2024 at 21:59, Abhinav Kumar wrote: > > > > On 3/6/2024 11:52 AM, Dmitry Baryshkov wrote: > > On Wed, 6 Mar 2024 at 21:50, Abhinav Kumar > > wrote: > >> > >> There are cases where the userspace might still send another > >> frame after the HPD disconnect causing a modeset cycle aft

Re: [RFC PATCH] drm/msm/dp: move link_ready out of HPD event thread

2024-03-06 Thread Abhinav Kumar
On 3/6/2024 11:52 AM, Dmitry Baryshkov wrote: On Wed, 6 Mar 2024 at 21:50, Abhinav Kumar wrote: There are cases where the userspace might still send another frame after the HPD disconnect causing a modeset cycle after a disconnect. This messes the internal state machine of MSM DP driver and

Re: [RFC PATCH] drm/msm/dp: move link_ready out of HPD event thread

2024-03-06 Thread Dmitry Baryshkov
On Wed, 6 Mar 2024 at 21:50, Abhinav Kumar wrote: > > There are cases where the userspace might still send another > frame after the HPD disconnect causing a modeset cycle after > a disconnect. This messes the internal state machine of MSM DP driver > and can lead to a crash as there can be an imb

[RFC PATCH] drm/msm/dp: move link_ready out of HPD event thread

2024-03-06 Thread Abhinav Kumar
There are cases where the userspace might still send another frame after the HPD disconnect causing a modeset cycle after a disconnect. This messes the internal state machine of MSM DP driver and can lead to a crash as there can be an imbalance between bridge_disable() and bridge_enable(). This wa