Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp7414247rwl; Fri, 30 Dec 2022 08:08:41 -0800 (PST) X-Google-Smtp-Source: AMrXdXuCHErUAf8f5dLgnxh8NgtooZgGw6qUeIwcA8vtgBQWoB3kKvl7ynRgWE5ml0uiQNKs7sGE X-Received: by 2002:a05:6402:4141:b0:469:ee22:d97a with SMTP id x1-20020a056402414100b00469ee22d97amr28301301eda.32.1672416521057; Fri, 30 Dec 2022 08:08:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672416521; cv=none; d=google.com; s=arc-20160816; b=hneGTMlMqVgjwO5tRQQRl9hMhv0usls1hWvP2ocZdUs7+uonS4ZmZ7HJ9Yqx8Jdw1M rU3HDMwHki7bwqgtIeUhOD8cEPsSe7wmtESuBPFqLni0SKGtMBF4oPwrhClOKsq9P9Ie QNFse/v+tOgNkGe7v58WxALhayevnw6BFeacy2mH6JILs6SS+UBqsOz1jfSKSuQiz4gB EAoXaXqQqiGiBI0nks97qttsDQHj67uKK7vQ8hwIMZ8FE6EDLxjH7nCL1xmtXtAPbZtO YWb0/3XlXNWRw++aW7Cac4p4g1c9vy7ErtIIkIUkCXUd1OBQNsR0xx3c/60umfU98Dxb 7Lvg== 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:mail-followup-to :message-id:subject:cc:to:from:date:dkim-signature; bh=VbtNmVjXmZibE7Xp7dQV8eI5QEB8pYNTZiAR9q1VY7A=; b=HMkc08lTaJjM5JoNTGPJQBmx7UamRLZT6Okx9bQn83C23C2sbmnNgt46LPc7eSCSp8 8zZiV6+GSlFiUPuLxypSlIPKRpJq9/TrxNLxYUa9JfllpHFeAbQ9nSNsJBGc+AbH6jDv NanvdeYFGiDQ1g84ng66f9Ftajvl6kUPHySrSQ6R+/uiCaBxptAMudHJvYKAm3ofW4HV 1IoN3mQNbmcUtsXto9DWF4A+m5+lLFarztosokJsHEqeGzjRCZ7ImFWccjrKObtdBKhB L3cn3ZxoATpLFPuQmGMfL7gvxRzt4BcdOIOn16GtL5EtY35qZHNtRYSpeX5hocJscX+P PUgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@xff.cz header.s=mail header.b=BBuP+biG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=xff.cz Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e20-20020a17090658d400b007c10bb5b4b3si18937662ejs.681.2022.12.30.08.08.25; Fri, 30 Dec 2022 08:08:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@xff.cz header.s=mail header.b=BBuP+biG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=xff.cz Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235254AbiL3Plp (ORCPT + 63 others); Fri, 30 Dec 2022 10:41:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50160 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235413AbiL3Pkt (ORCPT ); Fri, 30 Dec 2022 10:40:49 -0500 Received: from vps.xff.cz (vps.xff.cz [195.181.215.36]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E5C9F2E5 for ; Fri, 30 Dec 2022 07:40:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xff.cz; s=mail; t=1672414843; bh=l0UX+S/NrdvMYlTu65lE1sl4ZJALJTnqdZVGngJRHxo=; h=Date:From:To:Cc:Subject:X-My-GPG-KeyId:References:From; b=BBuP+biGq46Ksi//BBiX1Isauh5RqO0k0WqKp979FBOo5r/ApT2sPnwloFeGrv68a dfdK3vrlcsHp/Re+qxKKFwvbgOOdZfvSjIkSP3aJUY170UGbme9C1ubjhb5uPpnJ8B n0FGTU6dS6TKHE4xssJAADZwOUjxUB8yQiLn4isY= Date: Fri, 30 Dec 2022 16:40:43 +0100 From: =?utf-8?Q?Ond=C5=99ej?= Jirman To: Javier Martinez Canillas Cc: linux-kernel@vger.kernel.org, Kamil =?utf-8?Q?Trzci=C5=84ski?= , Martijn Braam , Sam Ravnborg , Robert Mader , Tom Fitzhenry , Peter Robinson , Onuralp Sezer , dri-devel@lists.freedesktop.org, Maya Matuszczyk , Neal Gompa , linux-arm-kernel@lists.infradead.org, Krzysztof Kozlowski , Jagan Teki , Daniel Vetter , David Airlie , Thierry Reding Subject: Re: [PATCH v4 2/4] drm: panel: Add Himax HX8394 panel controller driver Message-ID: <20221230154043.7v3zmzqdrnouqzd2@core> Mail-Followup-To: =?utf-8?Q?Ond=C5=99ej?= Jirman , Javier Martinez Canillas , linux-kernel@vger.kernel.org, Kamil =?utf-8?Q?Trzci=C5=84ski?= , Martijn Braam , Sam Ravnborg , Robert Mader , Tom Fitzhenry , Peter Robinson , Onuralp Sezer , dri-devel@lists.freedesktop.org, Maya Matuszczyk , Neal Gompa , linux-arm-kernel@lists.infradead.org, Krzysztof Kozlowski , Jagan Teki , Daniel Vetter , David Airlie , Thierry Reding X-My-GPG-KeyId: EBFBDDE11FB918D44D1F56C1F9F0A873BE9777ED References: <20221230113155.3430142-1-javierm@redhat.com> <20221230113155.3430142-3-javierm@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20221230113155.3430142-3-javierm@redhat.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Javier, On Fri, Dec 30, 2022 at 12:31:52PM +0100, Javier Martinez Canillas wrote: > From: Kamil Trzciński > > The driver is for panels based on the Himax HX8394 controller, such as the > HannStar HSD060BHW4 720x1440 TFT LCD panel that uses a MIPI-DSI interface. I see you've removed debug printks from enable/disable/prepare/unprepare hooks. Have you tested the driver thoroughly with various DRM apps, with DPM/suspend/resume, etc.? The dw-mipi-dsi driver does some unorthodox things[1], that can lead to unbalanced calls to these functions in some situations, and that's why all these printks were there. To ensure the driver hooks are called correctly, while preparing the code for upstreaming. This lead to broken display in some situations during suspend/resume. https://elixir.bootlin.com/linux/latest/source/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c#L868 Also, have you checked the clocks are actually configured correctly by the rk3399 cru driver? I have a lot of trouble with that, too. clk driver sometimes selects the fractional clock, but does not give it the necessary >20x difference between input/output clock rates. You'll only notice if you measure clock rates directly, by looking at actual refresh rate, by using some testing DRM app. Clock subsystem sometimes shuffles things around if you switch VOPs and use big VOP for mipi-dsi display, instead of the default small VOP. I'll test this patchset in a few days against purely mainline code, but I'm pretty sure looking at the modes you use, that this will not work on some Pinephone Pro's, and will cause display corruption when you fix your clock setup, so that CRU actually outputs 74.25MHz as requested by the mode. (Which can be fixed by this patch https://github.com/megous/linux/commit/f7ee16f12ee8a44ee2472f2967ca27768106e00f) regards, o. > Signed-off-by: Kamil Trzciński > Co-developed-by: Ondrej Jirman > Signed-off-by: Ondrej Jirman > Co-developed-by: Javier Martinez Canillas > Signed-off-by: Javier Martinez Canillas > Reviewed-by: Sam Ravnborg > --- > > Changes in v4: > - Add Tom Fitzhenry's Tested-by tag. > > Changes in v3: > - Add Sam Ravnborg's reviwed-by tag. > - Move driver patch after one introducing the DT binding (Sam Ravnborg). > > Changes in v2: > - Add year to driver's copyright notice (Sam Ravnborg) > - Remove unused