Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp12021113ybi; Fri, 26 Jul 2019 03:29:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqwP6QeELDfRARLQy4S8NK852YJmCW/Qq2gYeIypCbYirkrt4MliJxKnjS9Os5Lr1oxK6wDm X-Received: by 2002:a63:8dc9:: with SMTP id z192mr36225722pgd.151.1564136954595; Fri, 26 Jul 2019 03:29:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564136954; cv=none; d=google.com; s=arc-20160816; b=fCDWQf/x92ailPiJcvHFRmkhtN+zb5LrK5aLCie/7e6TJJWCT7WY0NTTtHIzh/jixW zZhP29AChxBjJWs70LuEnJbkdAEvCMMIeHA/8o1WM9CFEs6+KnPTETdQPpCyaFATPtAc Ou8MILQnL7KgYEwOQ6JFyROEPQ9jR5V7Te+dWEiZJrIF67d/Sgj0ZpWXcYWBFysXbtd8 Mt+UgKEWOWRxVNDPFPuWaRUlBDwphtbIzFp9MwpNlAMaGFZs1/4w7mRTRfOF176QPQys Q7xZNCOJ24Vk9CEnB+9uX6a7kVyYWmPQN0N2FqAYdifjtxs8aTuyERehw610+sQXdKnD UNog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=5Hm0aysD+ofvhB2+rv5Wu+/8udGW4DSOoFqzqWzFplA=; b=FJuHsPF4ouxlkhGYDcKkiVEvWW1YOK5SlL/inCv5+Kr7QISrIT/msqeNMyKa+hBOjy QROheZQZvh6lXS9j9Sd2jWfbzq1psSHU9Us/0JIeABaHzvM7F3iof0818g9t5O+oPaMD +DJ3Z8oG49RG6caoEzFxwmP3vHba6N4nKojtVSV0nLo5c6hl0GNCjFZAKfw51qPOpB0q YPfVcnzlDyR9Qafrl6yslMUxUG4DFKGtUpKB4+348Bsb+hrlnv1yWgzNKkOco/0JLzYE XogmPS5vWFnmyCqYca+WZ/qBNnetvSwueQnSfqHJLSQQk3Gc893TAk4D3i5hUXkXAdK7 lAcA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h11si47062715pju.90.2019.07.26.03.28.59; Fri, 26 Jul 2019 03:29:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726437AbfGZKZe (ORCPT + 99 others); Fri, 26 Jul 2019 06:25:34 -0400 Received: from asavdk4.altibox.net ([109.247.116.15]:53254 "EHLO asavdk4.altibox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725815AbfGZKZe (ORCPT ); Fri, 26 Jul 2019 06:25:34 -0400 Received: from ravnborg.org (unknown [158.248.194.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by asavdk4.altibox.net (Postfix) with ESMTPS id DFB19803B3; Fri, 26 Jul 2019 12:25:30 +0200 (CEST) Date: Fri, 26 Jul 2019 12:25:29 +0200 From: Sam Ravnborg To: Guido =?iso-8859-1?Q?G=FCnther?= Cc: Purism Kernel Team , Thierry Reding , David Airlie , Daniel Vetter , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 0/3] drm/panel: jh057n00900: Move dsi init sequence to prepare Message-ID: <20190726102529.GB15658@ravnborg.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-CMAE-Score: 0 X-CMAE-Analysis: v=2.3 cv=VcLZwmh9 c=1 sm=1 tr=0 a=UWs3HLbX/2nnQ3s7vZ42gw==:117 a=UWs3HLbX/2nnQ3s7vZ42gw==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=8nJEP1OIZ-IA:10 a=7gkXJVJtAAAA:8 a=6BhD04cj4S09DCeAZc4A:9 a=wPNLvfGTeEIA:10 a=E9Po1WZjFZOl8hwRPBS3:22 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Guido. On Fri, Jul 26, 2019 at 11:21:40AM +0200, Guido G?nther wrote: > If the panel is wrapped in a panel_bridge it gets prepar()ed before the > upstream DSI bridge which can cause hangs (e.g. with imx-nwl since clocks > are not enabled yet). To avoid this move the panel's first DSI access to > enable() so the upstream bridge can prepare the DSI host controller in > it's pre_enable(). > > The second patch makes the disable() call symmetric to the above and the third > one just eases debugging. > > Guido G?nther (3): > drm/panel: jh057n00900: Move panel DSI init to enable() > drm/panel: jh057n00900: Move mipi_dsi_dcs_set_display_off to disable() > drm/panel: jh057n00900: Print error code on all DRM_DEV_ERROR()s Patch 1 + 3 are both: Reviewed-by: Sam Ravnborg See comment on patch 2. While you are touching this driver can you make an extra patch? Today the driver calls the internal prepare,enable,disable,unprepare functions. The right way to do it is to use the drm_panel_(prepare,enable,disable,unprepare) variants. The benefit is that we can move a little logic to these functions and the drivers will then benefit from this. Two things I have in my local queue: - Move bool for prepared/enabled (to protect that we do not prepare/enable twice) - backlight support This driver will benefit form both and this little modification will make it simpler to introduce. I can also prepare the patch if you prefer. Sam