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 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BFA40C4332F for ; Sun, 5 Nov 2023 22:54:35 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F092910E012; Sun, 5 Nov 2023 22:54:34 +0000 (UTC) Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by gabe.freedesktop.org (Postfix) with ESMTPS id BAAFE10E012 for ; Sun, 5 Nov 2023 22:54:32 +0000 (UTC) Received: from pendragon.ideasonboard.com (213-243-189-158.bb.dnainternet.fi [213.243.189.158]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id CC1785AA; Sun, 5 Nov 2023 23:54:11 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1699224852; bh=pcacsgb3OWxdK2khmiavqPxLlnW99wbidArlPanL5Q4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Ufh7ZOGijsOwjyrtF/B1P4um8Wdp7NK3TFok4eiqodaZzQO/FKij2OFCUmYNMgiM7 ClkfagKSsDhWIdblmbV0CIBM3cfr4+XFXE/aq2uDFd5VkisHHkcDpJ5vhlNo8rSetm Uk01uTd1vMlrYw0kM3/DxrFA0NH+qTIXBCL4rRT0= Date: Mon, 6 Nov 2023 00:54:38 +0200 From: Laurent Pinchart To: Tomi Valkeinen Subject: Re: [PATCH 04/10] drm/tidss: Move reset to the end of dispc_init() Message-ID: <20231105225438.GB15635@pendragon.ideasonboard.com> References: <20231101-tidss-probe-v1-0-45149e0f9415@ideasonboard.com> <20231101-tidss-probe-v1-4-45149e0f9415@ideasonboard.com> <20231101135749.GT12764@pendragon.ideasonboard.com> <71056358-f91e-4a88-a979-33bfe157289a@ideasonboard.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <71056358-f91e-4a88-a979-33bfe157289a@ideasonboard.com> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Aradhya Bhatia , Devarsh Thakkar , linux-kernel@vger.kernel.org, Maxime Ripard , dri-devel@lists.freedesktop.org, Thomas Zimmermann , Jyri Sarha Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Thu, Nov 02, 2023 at 08:40:10AM +0200, Tomi Valkeinen wrote: > On 01/11/2023 15:57, Laurent Pinchart wrote: > > On Wed, Nov 01, 2023 at 11:17:41AM +0200, Tomi Valkeinen wrote: > >> We do a DSS reset in the middle of the dispc_init(). While that happens > >> to work now, we should really make sure that e..g the fclk, which is > >> acquired only later in the function, is enabled when doing a reset. This > >> will be handled in a later patch, but for now, let's move the > >> dispc_softreset() call to the end of dispc_init(), which is a sensible > >> place for it anyway. > >> > >> Signed-off-by: Tomi Valkeinen > > > > Reviewed-by: Laurent Pinchart > > > > But do I understand correctly that the device isn't powered up at this > > point ? That seems problematic. > > Indeed. It's fixed later in this series. > > > I'm also not sure why we need to reset the device at probe time. > > That's the usual place to do a reset, to make sure the HW is in a known > state, is it not? Where would you place it? The first time the device is used, or possibly every time it is resumed ? It seems that you're resuming it at probe time for the only reason that you want to then reset it. Resuming it at probe could get entirely skipped. -- Regards, Laurent Pinchart 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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DEC44C4167B for ; Sun, 5 Nov 2023 22:54:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229908AbjKEWyh (ORCPT ); Sun, 5 Nov 2023 17:54:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50602 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229900AbjKEWyf (ORCPT ); Sun, 5 Nov 2023 17:54:35 -0500 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D5CD5E1 for ; Sun, 5 Nov 2023 14:54:32 -0800 (PST) Received: from pendragon.ideasonboard.com (213-243-189-158.bb.dnainternet.fi [213.243.189.158]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id CC1785AA; Sun, 5 Nov 2023 23:54:11 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1699224852; bh=pcacsgb3OWxdK2khmiavqPxLlnW99wbidArlPanL5Q4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Ufh7ZOGijsOwjyrtF/B1P4um8Wdp7NK3TFok4eiqodaZzQO/FKij2OFCUmYNMgiM7 ClkfagKSsDhWIdblmbV0CIBM3cfr4+XFXE/aq2uDFd5VkisHHkcDpJ5vhlNo8rSetm Uk01uTd1vMlrYw0kM3/DxrFA0NH+qTIXBCL4rRT0= Date: Mon, 6 Nov 2023 00:54:38 +0200 From: Laurent Pinchart To: Tomi Valkeinen Cc: Aradhya Bhatia , Devarsh Thakkar , Jyri Sarha , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 04/10] drm/tidss: Move reset to the end of dispc_init() Message-ID: <20231105225438.GB15635@pendragon.ideasonboard.com> References: <20231101-tidss-probe-v1-0-45149e0f9415@ideasonboard.com> <20231101-tidss-probe-v1-4-45149e0f9415@ideasonboard.com> <20231101135749.GT12764@pendragon.ideasonboard.com> <71056358-f91e-4a88-a979-33bfe157289a@ideasonboard.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <71056358-f91e-4a88-a979-33bfe157289a@ideasonboard.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 02, 2023 at 08:40:10AM +0200, Tomi Valkeinen wrote: > On 01/11/2023 15:57, Laurent Pinchart wrote: > > On Wed, Nov 01, 2023 at 11:17:41AM +0200, Tomi Valkeinen wrote: > >> We do a DSS reset in the middle of the dispc_init(). While that happens > >> to work now, we should really make sure that e..g the fclk, which is > >> acquired only later in the function, is enabled when doing a reset. This > >> will be handled in a later patch, but for now, let's move the > >> dispc_softreset() call to the end of dispc_init(), which is a sensible > >> place for it anyway. > >> > >> Signed-off-by: Tomi Valkeinen > > > > Reviewed-by: Laurent Pinchart > > > > But do I understand correctly that the device isn't powered up at this > > point ? That seems problematic. > > Indeed. It's fixed later in this series. > > > I'm also not sure why we need to reset the device at probe time. > > That's the usual place to do a reset, to make sure the HW is in a known > state, is it not? Where would you place it? The first time the device is used, or possibly every time it is resumed ? It seems that you're resuming it at probe time for the only reason that you want to then reset it. Resuming it at probe could get entirely skipped. -- Regards, Laurent Pinchart