<div dir="ltr"><div><div style="white-space:pre" class="gmail-ace-line gmail-ace-line gmail-old-record-id-BEqodSeYeo6G2Wxkr60crdsfnTh">The log looks like this:<br></div><div style="white-space:pre" class="gmail-ace-line gmail-ace-line gmail-old-record-id-BEqodSeYeo6G2Wxkr60crdsfnTh">[ 31.723823] Internal error: Oops: 96000004 [#1] SMP\013 \010 </div><div style="white-space:pre" class="gmail-ace-line gmail-ace-line gmail-old-record-id-ZWModOG2WooUeqxkB7IcsyWNnXg">[ 31.729030] Modules linked in:\013 \010 </div><div style="white-space:pre" class="gmail-ace-line gmail-ace-line gmail-old-record-id-Kse4d2o6coMeKKxkxLmcwXl9ntd">[ 31.733395] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.10.59+2.0.0 #250\013 </div><div style="white-space:pre" class="gmail-ace-line gmail-ace-line gmail-old-record-id-VYWIdwwCOoAcWWxkFpkcIu6Hndd">\010 </div><div style="white-space:pre" class="gmail-ace-line gmail-ace-line gmail-old-record-id-EwUeduI8Goo0a2x4tnjcMN66nSf">[ 31.745167] pstate: 60c00005 (nZCv daif +PAN +UAO -TCO BTYPE=--)\013 \010 </div><div style="white-space:pre" class="gmail-ace-line gmail-ace-line gmail-old-record-id-H0o8dgawoouYooxgtGrcNHYOnyc">[ 31.752785] pc : drm_bridge_attach+0xdc/0x1a4\013 \010 </div><div style="white-space:pre" class="gmail-ace-line gmail-ace-line gmail-old-record-id-QSAidEaO6oEY4yxAddscsLVinwf">[ 31.757518] lr : drm_bridge_attach+0x40/0x1a4\013 \010 </div><div style="white-space:pre" class="gmail-ace-line gmail-ace-line gmail-old-record-id-To0MdMQ0ooysawxKo2UcuwCanLg">[ 31.762104] sp : ffff0000000678f0\013 \010 </div><div style="white-space:pre" class="gmail-ace-line gmail-ace-line gmail-old-record-id-MYCidIMm8oEQq0xgrrNcb9Ptn5f">[ 31.765726] x29: ffff0000000678f0 x28: ffff00000031c880 \013 \010 </div><div style="white-space:pre" class="gmail-ace-line gmail-ace-line gmail-old-record-id-RW00dkesKow0EKx8j5ScKxNtnPd">[ 31.771599] x27: 0000000000000060 x26: ffff800010539e90 \013 \010 </div><div style="white-space:pre" class="gmail-ace-line gmail-ace-line gmail-old-record-id-BUEad4uQAoOWCuxeQmucjaGInqg">[ 31.777340] x25: ffff0000000a6000 x24: ffff000000129c10 \013 \010 </div><div style="white-space:pre" class="gmail-ace-line gmail-ace-line gmail-old-record-id-OGAMdgEo0oIYUAxoU7mcTBMDnRI">[ 31.783060] x23: 0000000000000000 x22: ffff0000000131c0 \013 \010 </div><div style="white-space:pre" class="gmail-ace-line gmail-ace-line gmail-old-record-id-EUASdsOIkoIA6sxWGsWcLla5nWc">[ 31.788770] x21: ffff80001052a5b8 x20: ffff0000003e2c80 \013 \010 </div><div style="white-space:pre" class="gmail-ace-line gmail-ace-line gmail-old-record-id-O8eOd6O6Soc6WmxWo7YcZt4un6f">[ 31.794506] x19: ffff000000017080 x18: 0000000000000010 \013 \010 </div><div style="white-space:pre" class="gmail-ace-line gmail-ace-line gmail-old-record-id-Ago6dQ8YAoCwkOxsBcIcArFXnob">[ 31.800210] x17: 000000005fcfcd6c x16: 00000000d27b105e \013 \010 </div><div style="white-space:pre" class="gmail-ace-line gmail-ace-line gmail-old-record-id-TaoSd8Cekoi0WexspohcL2WBnKb">[ 31.805907] x15: 00000000000000c7 x14: ffff0000000675d0 \013 \010 </div><div style="white-space:pre" class="gmail-ace-line gmail-ace-line gmail-old-record-id-AKGEdAGOgoESwuxc9IhcdagXn3e">[ 31.811599] x13: 00000000ffffffea x12: ffff8000114158c0 \013 \010 </div><div style="white-space:pre" class="gmail-ace-line gmail-ace-line gmail-old-record-id-SaISdQme6oUoqCxw0OucqDJrnbb">[ 31.817282] x11: 0000000000000003 x10: ffff800011295880 \013 \010 </div><div style="white-space:pre" class="gmail-ace-line gmail-ace-line gmail-old-record-id-Eg8qd0AoMocgMcxuOFGci1icnOc">[ 31.823000] x9 : ffff8000112958d8 x8 : 000000000017ffe8 \013 \010 </div><div style="white-space:pre" class="gmail-ace-line gmail-ace-line gmail-old-record-id-DISEd2Cs0oiAYexYJ7Bc8AaenNe">[ 31.828731] x7 : c0000000fffeffff x6 : 0000000000000001 \013 \010 </div><div style="white-space:pre" class="gmail-ace-line gmail-ace-line gmail-old-record-id-Nk6Idy0AqokGQexC5aHco49anSE">[ 31.834425] x5 : 000000000057ffa8 x4 : 0000000000000000 \013 \010 </div><div style="white-space:pre" class="gmail-ace-line gmail-ace-line gmail-old-record-id-Skwqde8y0o0scyxigEVcFtkengb">[ 31.840101] x3 : 0000000000000000 x2 : ffff000000013218 \013 \010 </div><div style="white-space:pre" class="gmail-ace-line gmail-ace-line gmail-old-record-id-DOMqdkI4eocyW0xwcgecfKyRnrb">[ 31.845787] x1 : ffff0000003e2cf8 x0 : 0000000000000000 \013 \010 </div><div style="white-space:pre" class="gmail-ace-line gmail-ace-line gmail-old-record-id-H6u2dsGscoGqY2x4rqZcE5qwneg">[ 31.851594] Call trace:\013 \010 </div><div style="white-space:pre" class="gmail-ace-line gmail-ace-line gmail-old-record-id-ZKsqdKOaqoMs2Sx4SgEcz2idnSb">[ 31.854603] drm_bridge_attach+0xdc/0x1a4\013 \010 </div><div style="white-space:pre" class="gmail-ace-line gmail-ace-line gmail-old-record-id-YWgidI6OQoUASSxAr0Wcb2AvnHe">[ 31.859079] dw_mipi_dsi_bridge_attach+0x98/0xa8\013 \010 </div><div style="white-space:pre" class="gmail-ace-line gmail-ace-line gmail-old-record-id-Hek8dsOwooCSIsxcRl0crDzBnAc">[ 31.864035] drm_bridge_attach+0x104/0x1a4\013 \010 </div><div style="white-space:pre" class="gmail-ace-line gmail-ace-line gmail-old-record-id-GwYydgGgao40aOxkn7lcF9ESnJb">[ 31.869211] dw_mipi_dsi_bind+0x24/0x58\013 \010 </div></div><div style="white-space:pre" class="gmail-ace-line gmail-ace-line gmail-old-record-id-GwYydgGgao40aOxkn7lcF9ESnJb">drm_bridge_attach will call bridge->funcs in many cases, so I think it is necessary to check。<br></div><div style="white-space:pre" class="gmail-ace-line gmail-ace-line gmail-old-record-id-GwYydgGgao40aOxkn7lcF9ESnJb"><br></div><span class="gmail-lark-record-clipboard"></span></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Jagan Teki <<a href="mailto:jagan@amarulasolutions.com">jagan@amarulasolutions.com</a>> 于2023年4月18日周二 21:45写道:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Mon, Apr 17, 2023 at 12:52 PM logic.yu <<a href="mailto:hymmsx.yu@gmail.com" target="_blank">hymmsx.yu@gmail.com</a>> wrote:<br>
><br>
> When the code is executed to bridge->funcs->attach,bridge->funcs is NULL.<br>
> Although the function entry checks whether the bridge pointer is NULL,it<br>
> does not detect whether the bridge->funcs is NULL, so a panic error<br>
> occurs.<br>
><br>
> Signed-off-by: logic.yu <<a href="mailto:hymmsx.yu@gmail.com" target="_blank">hymmsx.yu@gmail.com</a>><br>
> ---<br>
> drivers/gpu/drm/drm_bridge.c | 2 +-<br>
> 1 file changed, 1 insertion(+), 1 deletion(-)<br>
><br>
> diff --git a/drivers/gpu/drm/drm_bridge.c b/drivers/gpu/drm/drm_bridge.c<br>
> index c3d69af02e79..f3dd67fb3f1d 100644<br>
> --- a/drivers/gpu/drm/drm_bridge.c<br>
> +++ b/drivers/gpu/drm/drm_bridge.c<br>
> @@ -302,7 +302,7 @@ int drm_bridge_attach(struct drm_encoder *encoder, struct drm_bridge *bridge,<br>
> {<br>
> int ret;<br>
><br>
> - if (!encoder || !bridge)<br>
> + if (!encoder || !bridge || !bridge->funcs)<br>
<br>
Would you please share the use case log where you found panic? I think<br>
checking bridge->funcs during funcs-> trigger later in this function<br>
would be a valid check (assume if an issue) as some drivers use the<br>
bridge to handle downstream bridge w/o using any bridge functions.<br>
<br>
Jagan.<br>
</blockquote></div>