Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp350279pxt; Fri, 6 Aug 2021 03:39:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyRgv46DFIxxkjPIbFT+bwjVcm2o8UIfWpFVCdyv8VPdFx5GPWowPYabaxyi5w5pdg5ldwN X-Received: by 2002:a05:6602:2099:: with SMTP id a25mr98920ioa.143.1628246356377; Fri, 06 Aug 2021 03:39:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628246356; cv=none; d=google.com; s=arc-20160816; b=iTRt6vatHSRLxidO1KTMfsSCEbS3maUkIX+T4cYgp3wYwmMao1cEsc+nQI1Rx8g2zq l2FF9R/T2bdkM7EYLMt5hINvjPRpNqnu+A98n/UHDBXzJFqcQ8OSQWJ2UCHPmIOzpZ3j q9bWCVCPJh3jaFXjJayyUGxcA/NPWn8QZYsj3Mh/ctDeMbqOLiFkWZYhiovz4AfMf98I Dcgohcb8Vbe6nf1aX0E0gHsZf9XMb8ruJdb9gsUEUK44RS0AYJh0Ib26hX+2vZ2TH2G4 vovGg0wRzLu7P4zRHthI8CTnxe50B2hk5Bq9we4CKAK3Czl7oTenmGflqhhzJVsiinvA wCXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=TVGZoE5gGRjdrzp11QJfyMJlwcXTvAtUoyy+JrT+IQA=; b=BjlugSV6pavMr7OeuV5+gBx5nB7/1NHEEdLqHau4KxB8AG0cc7xGug4KxoSJOde4fP i4MJEq9hfIIZODMwOhaTAT71+rgelnWiKLPeBjIdZBJyknW8s07OOf1mPh1NAUl7TzGs cZ17HgiVXUptujgV7mXzr3oP4pSbGmMdnph1ytrk7EqkNSB2/2G0dGaOK0WB+OUAc5OP G8SExTsTMyMwF/+BTfwssYIGfDnHK8dZ8iW8PUw3iVOYrFQVkMqCbkNofXx0nOQ8pU4G ppjc2bDGlpuHe87C6sQMGBUjGFrL1qQpLjpTUKYPo1flYRLUbuOPYmOpgaSSaXc0QBSw vneQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@monstr-eu.20150623.gappssmtp.com header.s=20150623 header.b=tQEG6YzP; 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 u15si9598354iot.89.2021.08.06.03.39.04; Fri, 06 Aug 2021 03:39:16 -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 header.i=@monstr-eu.20150623.gappssmtp.com header.s=20150623 header.b=tQEG6YzP; 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 S245224AbhHFKhk (ORCPT + 99 others); Fri, 6 Aug 2021 06:37:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33490 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245218AbhHFKhf (ORCPT ); Fri, 6 Aug 2021 06:37:35 -0400 Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE196C061798 for ; Fri, 6 Aug 2021 03:37:19 -0700 (PDT) Received: by mail-ej1-x62d.google.com with SMTP id u3so14407801ejz.1 for ; Fri, 06 Aug 2021 03:37:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monstr-eu.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=TVGZoE5gGRjdrzp11QJfyMJlwcXTvAtUoyy+JrT+IQA=; b=tQEG6YzPxZYaUfm8emfjyn1WQFufEBobsHOf2wIgqUNzArRiVwdyJkOY9t8gOk+3IR vT4VvKckYd0jrRQzATYiCfUCoy0TfUxwzzwpq1OiS3Q2AVq4m4gWgAuxZTIlEjnWwt59 pru94xbHnAJzrcoxhCAjzHTTkUatiOXaVXRPaBj3jlvDw59GHBlSTGPMwoAw9FgvgDPE ImlV2e+CmYICx4ZkMx2AEiu4CTp7EN4OJRYRS8xKzf8vFaCKrEczCWyGFdtMOUcU2Y8p xKBVtmt6XWAeTvFKPxe/ZbI+NAH/K7fa1hKIbwr16XrJzECI4N3fCdDLiTLk5l4e8CEQ aVIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=TVGZoE5gGRjdrzp11QJfyMJlwcXTvAtUoyy+JrT+IQA=; b=Wa7rmdL+Pp7CzHMDtBSyCw6S7Cxc3s/BVcVxNBS0h8EAjvs6dQfWn1ZxwSY4+MmXFF TvRUtcD6v2MkuvebQHW/AxzNaP1KupHlaJbm9hIDamGQH+mxVk4ZQd//2dYZYVO1ea4E y2Jx+CqUT31jLSPk7LF0dKWb/oLUJA5tS1msw2lVynzA4JHtozVpJC7N1TyqNmxL2Aj8 llHwcPA+ZmA+gC7WNyCw9brm1Mda/vX+LG/TN0HUQF/bKObkdORmcDDeRkE3PTMTNq+b 7Eglb4jzPmuhoGdgHvmS6jwyzZTMKOLkRi3j00niLHfHa2wJBXW4wLB/hTWp1FwW0SJ8 umMg== X-Gm-Message-State: AOAM530UTZDytopkRb9wezT9YvtyLyroXzFk4ZQ5rzpgcZP3nHlG9R+k Xjvsx/lKu+OPbW10+t2RaSBvuEcTSZlMLbxZhhBlzw== X-Received: by 2002:a17:907:1b06:: with SMTP id mp6mr9404647ejc.188.1628246238490; Fri, 06 Aug 2021 03:37:18 -0700 (PDT) MIME-Version: 1.0 References: <20210323025501.1568039-1-quanyang.wang@windriver.com> In-Reply-To: From: Michal Simek Date: Fri, 6 Aug 2021 12:37:07 +0200 Message-ID: Subject: Re: [V2][PATCH] drm: xlnx: zynqmp: release reset to DP controller before accessing DP registers To: Laurent Pinchart Cc: Quanyang Wang , Hyun Kwon , David Airlie , Daniel Vetter , dri-devel@lists.freedesktop.org, linux-arm , LKML Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, st 24. 3. 2021 v 4:15 odes=C3=ADlatel Laurent Pinchart napsal: > > Hi Quanyang, > > Thank you for the patch. > > On Tue, Mar 23, 2021 at 10:55:01AM +0800, quanyang.wang@windriver.com wro= te: > > 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 fd4a00= 00.display on minor 0 > > [ 88.529906] Console: switching to colour frame buffer device 128x48 > > [ 88.549402] zynqmp-dpsub fd4a0000.display: [drm] fb0: zynqmp-dpsubdr= m frame buffer device > > [ 88.571624] zynqmp-dpsub fd4a0000.display: ZynqMP DisplayPort Subsys= tem 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 register= s, > > but at this moment the DP controller hasn't been brought out of the res= et > > 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? Thanks, Michal