Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp353802pxt; Fri, 6 Aug 2021 03:45:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxP3Wx0zvor+8us0WoUhc+YKMDCEGeLJ991yWjN3YzvLU7+OeP865ZaqsBkDlamGIxjemIn X-Received: by 2002:a5d:8990:: with SMTP id m16mr1255299iol.170.1628246704346; Fri, 06 Aug 2021 03:45:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628246704; cv=none; d=google.com; s=arc-20160816; b=z59vxRvyNxV1sjXGC63ohFU35RQbTeIT+T3GyiGqHxMgivknMF9CAE3qjzisYh1YcI iT4KilirifTnn8HYw1HrvDJArD02isLQGrwYUl6Rgj0MPJJeKQNwWdLHNN/xLT5aAj3i lpMCtoRRx85ast9RwDLphTmm96VkwfWZRXvf+A6+byuimd51c+RgFzCeE7oNIeLQGAHu Q3ewm7l+0JhRnJUQAtAHm3iiNGBQEC6aEG2e0pqVvOZdEWhU8p6vHDEqRCWNOHfYGG6o MuLrrXkN3lCWsvKhQZMPnV3XSE4EUNKlae8YI2tHDgbE8b7WA2jyh8Mz1ibSOh6Nc3gK n6pQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=iwczx+s4tEuoC5qXOo/ezya29cAEvNlWciw2PAKOc9k=; b=QJQ9d5uLi7MbMZybAekkYNl+CXynyk8IW6pX+d6kgLxsVq5jMgNlxftuNlMUTH7q8i AmqfFUci7PHPRFwoKnDqXcjVoCvzxnrzBBZ7xnrM3akXXvXDunbyMNdYdjyQVckrbIrf YLQwuqwUjCivx9BEQst+7Mlx6cUUFlr8xmw5XzdMt+zVjBfSoeKKFtzd5ejtsjNUMZcL U+GVyW3jyxdc4b7AzrWsrnXMEQGMwx7MNxsLXWo9QMFi7G45KlBEYVx0CXQSAIWk5EXj E6zTArOx+yA9a1V0stI6zaP/3gNWaTMBLgLq++0cBZdSp8B3P0gnppE1hXHhFCjizWDB wbnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=O73LL5Tt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l6si8749013ilg.44.2021.08.06.03.44.51; Fri, 06 Aug 2021 03:45:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=O73LL5Tt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245282AbhHFKoO (ORCPT + 99 others); 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