[lkml]   [2022]   [Dec]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v2] drm/msm/dp: do not complete dp_aux_cmd_fifo_tx() if irq is not for aux transfer
On 15/12/2022 22:10, Stephen Boyd wrote:
> Quoting Dmitry Baryshkov (2022-12-15 10:46:42)
>> On 15/12/2022 20:32, Kuogee Hsieh wrote:
>>> if (!aux->cmd_busy)
>>> return;
>>> if (aux->native)
>>> - dp_aux_native_handler(aux, isr);
>>> + ret = dp_aux_native_handler(aux, isr);
>>> else
>>> - dp_aux_i2c_handler(aux, isr);
>>> + ret = dp_aux_i2c_handler(aux, isr);
>>> - complete(&aux->comp);
>>> + if (ret == IRQ_HANDLED)
>>> + complete(&aux->comp);
>> Can you just move the complete() into the individual handling functions?
>> Then you won't have to return the error code from dp_aux_*_handler() at
>> all. You can check `isr' in that function and call complete if there was
>> any error.
> I'd prefer we apply my patch and pass the irqreturn_t variable to the
> caller of this function so spurious irqs are shutdown. Should I send it
> as a proper patch?

I'm for handling the spurious IRQs in a proper way. However I believe
that it's not related to the issue Kuogee is trying to fix.

Thus I think we should have two separate patches: one fixing the EDID
corruption issue (for which the proper fix is !isr check, IIUC) and the
irqreturn_t. And for the irqreturn_t it might be beneficial to move
complete() call to the dp_aux_foo_handler(). Or might be not. That would
depend on the patch itself.

With best wishes

 \ /
  Last update: 2022-12-15 22:17    [W:0.339 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site