From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A68A0C4338F for ; Fri, 6 Aug 2021 10:44:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8649F61179 for ; Fri, 6 Aug 2021 10:44:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245286AbhHFKoO (ORCPT ); Fri, 6 Aug 2021 06:44:14 -0400 Received: from perceval.ideasonboard.com ([213.167.242.64]:39130 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245188AbhHFKoH (ORCPT ); Fri, 6 Aug 2021 06:44:07 -0400 Received: from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 070B64FB; Fri, 6 Aug 2021 12:43:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1628246631; bh=RKzilY57EhrbC4I4R8TbW1muRU/5HGcmZ+6oW6fCDL4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=O73LL5TtntX68qiwrKwSSvdHEfSCRscRR2OLhZNXzRiTf6TXBcLyDFfZq8LyGvCHa xQWPpLiOR3qodAhCjMObzZ+75SDb4+9hmF06wEgJlEFycFJ/Z+k1AAFRYKHs/SwNRY 6JkXU/Icmv0aMYIA689lpV0Lg+TsB+VKCtSnj7CY= Date: Fri, 6 Aug 2021 13:43:37 +0300 From: Laurent Pinchart To: Michal Simek Cc: Quanyang Wang , Hyun Kwon , David Airlie , Daniel Vetter , dri-devel@lists.freedesktop.org, linux-arm , LKML Subject: Re: [V2][PATCH] drm: xlnx: zynqmp: release reset to DP controller before accessing DP registers Message-ID: References: <20210323025501.1568039-1-quanyang.wang@windriver.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Michale, On Fri, Aug 06, 2021 at 12:37:07PM +0200, Michal Simek wrote: > st 24. 3. 2021 v 4:15 odesílatel Laurent Pinchart napsal: > > On Tue, Mar 23, 2021 at 10:55:01AM +0800, quanyang.wang@windriver.com wrote: > > > From: Quanyang Wang > > > > > > When insmod zynqmp-dpsub.ko after rmmod it, system will hang with the > > > error log as below: > > > > > > root@xilinx-zynqmp:~# insmod zynqmp-dpsub.ko > > > [ 88.391289] [drm] Initialized zynqmp-dpsub 1.0.0 20130509 for fd4a0000.display on minor 0 > > > [ 88.529906] Console: switching to colour frame buffer device 128x48 > > > [ 88.549402] zynqmp-dpsub fd4a0000.display: [drm] fb0: zynqmp-dpsubdrm frame buffer device > > > [ 88.571624] zynqmp-dpsub fd4a0000.display: ZynqMP DisplayPort Subsystem driver probed > > > root@xilinx-zynqmp:~# rmmod zynqmp_dpsub > > > [ 94.023404] Console: switching to colour dummy device 80x25 > > > root@xilinx-zynqmp:~# insmod zynqmp-dpsub.ko > > > > > > > > > This is because that in zynqmp_dp_probe it tries to access some DP > > > registers while the DP controller is still in the reset state. When > > > running "rmmod zynqmp_dpsub", zynqmp_dp_reset(dp, true) in > > > zynqmp_dp_phy_exit is called to force the DP controller into the reset > > > state. Then insmod will call zynqmp_dp_probe to program the DP registers, > > > but at this moment the DP controller hasn't been brought out of the reset > > > state yet since the function zynqmp_dp_reset(dp, false) is called later and > > > this will result the system hang. > > > > > > Releasing the reset to DP controller before any read/write operation to it > > > will fix this issue. And for symmetry, move zynqmp_dp_reset() call from > > > zynqmp_dp_phy_exit() to zynqmp_dp_remove(). > > > > > > Signed-off-by: Quanyang Wang > > > > Reviewed-by: Laurent Pinchart > > Can someone pick this patch? I have it in my tree with a set of other changes, I intend to send a pull request today. -- Regards, Laurent Pinchart