From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 09D9A285C84 for ; Wed, 19 Nov 2025 09:39:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.167.242.64 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763545180; cv=none; b=fnzQC4UQ4t4BT8sHIVYKD7+oJ9jF0w5+G8LZf6MUx1yMVbgq43RcL9xBzdE58LfkZG/xh7EvKXc5jPyvOE9frdiPtZ81xxWr0sWeZDwgjtmejc2LVmGEcnwFr2ZfoFZ3UgMtr3xvm52GqJOimAQ0L1rh2j1wYVYs+aOXq04AZ+c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763545180; c=relaxed/simple; bh=HaiRXsMftvHKJwWhHy/BuG8bgCdLLDWCFKUvGU06FIo=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=WTK3dTN/uI9uc5cM4Z4xYbx4jCJuNujIABSdBa7o0cdjTrkbdv9hosEt3pP03hzHBUchuKCNjZWMsDH/W/+LbW0P5UY8tOgtav/cFdFuW/TioDXKnnRGbQYYFoGH0PQ+VS5PqxmE5MC7EQE5cWT6J3cA7H51yV6dFVCdsCmc/rk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ideasonboard.com; spf=pass smtp.mailfrom=ideasonboard.com; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b=O1rfZ4LH; arc=none smtp.client-ip=213.167.242.64 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="O1rfZ4LH" Received: from [192.168.88.20] (91-158-153-178.elisa-laajakaista.fi [91.158.153.178]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 0093BE7C; Wed, 19 Nov 2025 10:37:29 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1763545050; bh=HaiRXsMftvHKJwWhHy/BuG8bgCdLLDWCFKUvGU06FIo=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=O1rfZ4LHGASQdffEt5s1rp2acBXGIBC36ZRK1ozgtkRCK2jOhomBspxr/+KVokb0O qOC+cnjZj0tYiyK5WzhGDZmcrcvd1N22YVhvh8lk2Lp65OqVK0GO0UJ3EtMvLTGBcz cF8BKgSifKmL04jAsL2OsJJtNuPVMn/HojzWLhCY= Message-ID: Date: Wed, 19 Nov 2025 11:39:30 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [REGRESSION] TI SN65DSI83 is being reset making display to blink On/Off To: Maxime Ripard , Herve Codina Cc: Luca Ceresoli , Francesco Dolcini , =?UTF-8?Q?Jo=C3=A3o_Paulo_Gon=C3=A7alves?= , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Thomas Zimmermann , David Airlie , Simona Vetter , =?UTF-8?Q?Jo=C3=A3o_Paulo_Gon=C3=A7alves?= , linux-kernel@vger.kernel.org, regressions@lists.linux.dev, thomas.petazzoni@bootlin.com References: <20251113084950.44a09e8e@bootlin.com> <20251113091910.GA15538@francesco-nb> <20251119085127.6e3e429e@bootlin.com> From: Tomi Valkeinen Content-Language: en-US Autocrypt: addr=tomi.valkeinen@ideasonboard.com; keydata= xs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z9KsBS0DaZb 4IkLmZwEXpZcIOQjQ71fqlpiXkXSIaQ6YMEs8WjBbpP81h7QxWIfWtp+VnwNGc6nq5IQDESH mvQcsFS7d3eGVI6eyjCFdcAO8eMAEQEAAcLBXwQYAQIACQUCTqazRwIbDAAKCRD6PaqMvJYe 9fA7EACS6exUedsBKmt4pT7nqXBcRsqm6YzT6DeCM8PWMTeaVGHiR4TnNFiT3otD5UpYQI7S suYxoTdHrrrBzdlKe5rUWpzoZkVK6p0s9OIvGzLT0lrb0HC9iNDWT3JgpYDnk4Z2mFi6tTbq xKMtpVFRA6FjviGDRsfkfoURZI51nf2RSAk/A8BEDDZ7lgJHskYoklSpwyrXhkp9FHGMaYII m9EKuUTX9JPDG2FTthCBrdsgWYPdJQvM+zscq09vFMQ9Fykbx5N8z/oFEUy3ACyPqW2oyfvU CH5WDpWBG0s5BALp1gBJPytIAd/pY/5ZdNoi0Cx3+Z7jaBFEyYJdWy1hGddpkgnMjyOfLI7B CFrdecTZbR5upjNSDvQ7RG85SnpYJTIin+SAUazAeA2nS6gTZzumgtdw8XmVXZwdBfF+ICof 92UkbYcYNbzWO/GHgsNT1WnM4sa9lwCSWH8Fw1o/3bX1VVPEsnESOfxkNdu+gAF5S6+I6n3a ueeIlwJl5CpT5l8RpoZXEOVtXYn8zzOJ7oGZYINRV9Pf8qKGLf3Dft7zKBP832I3PQjeok7F yjt+9S+KgSFSHP3Pa4E7lsSdWhSlHYNdG/czhoUkSCN09C0rEK93wxACx3vtxPLjXu6RptBw 3dRq7n+mQChEB1am0BueV1JZaBboIL0AGlSJkm23kw== In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hi, On 19/11/2025 10:40, Maxime Ripard wrote: > On Wed, Nov 19, 2025 at 08:51:27AM +0100, Herve Codina wrote: >> Hi Maxime, >> >> On Tue, 18 Nov 2025 17:56:36 +0100 >> Maxime Ripard wrote: >> >>> On Mon, Nov 17, 2025 at 04:27:28PM +0100, Luca Ceresoli wrote: >>>> On Thu Nov 13, 2025 at 10:19 AM CET, Francesco Dolcini wrote: >>>>> On Thu, Nov 13, 2025 at 08:49:50AM +0100, Herve Codina wrote: >>>>>> On Mon, 10 Nov 2025 16:03:51 -0300 >>>>>> João Paulo Gonçalves wrote: >>>>>>> After commit ad5c6ecef27e ("drm: bridge: ti-sn65dsi83: Add error >>>>>>> recovery mechanism"), our DSI display stopped working correctly. The >>>>>>> display internally uses a TI SN65DSI83 to convert DSI-to-LVDS, and with >>>>>>> the change, it keeps blinking on and off because the bridge is being >>>>>>> reset by the error recovery mechanism. >>>>>>> >>>>>>> Even before the change, it was possible to see the message below from >>>>>>> the driver indicating that the bridge's internal PLL was not locked >>>>>>> (register 0xE5, bit 0 in [1]): >>>>>>> >>>>>>> [ 11.198616] sn65dsi83 2-002c: Unexpected link status 0x01 >>>>>>> >>>>>>> However, it was working. After the change, it stopped working. Masking >>>>>>> the PLL error makes it work again: >>>>>>> >>>>>>> diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi83.c b/drivers/gpu/drm/bridge/ti-sn65dsi83.c >>>>>>> index 033c44326552..89a0a2ab45b1 100644 >>>>>>> --- a/drivers/gpu/drm/bridge/ti-sn65dsi83.c >>>>>>> +++ b/drivers/gpu/drm/bridge/ti-sn65dsi83.c >>>>>>> @@ -429,7 +429,7 @@ static void sn65dsi83_handle_errors(struct sn65dsi83 *ctx) >>>>>>> */ >>>>>>> >>>>>>> ret = regmap_read(ctx->regmap, REG_IRQ_STAT, &irq_stat); >>>>>>> - if (ret || irq_stat) { >>>>>>> + if (ret || (irq_stat & ~REG_IRQ_STAT_CHA_PLL_UNLOCK)) { >>>>>>> /* >>>>>>> * IRQ acknowledged is not always possible (the bridge can be in >>>>>>> * a state where it doesn't answer anymore). To prevent an >>>>>>> >>>>>>> Any suggestions on how to proceed here? >>>>>>> >>>>>>> #regzbot introduced: ad5c6ecef27e >>>>>>> >>>>>>> [1] https://www.ti.com/lit/ds/symlink/sn65dsi83.pdf >>>>>>> >>>>>> >>>>>> The PLL should be locked. >>>>>> >>>>>> Also in the datasheet, in 'Table 7-2. Initialization Sequence', the status >>>>>> is checked at the end of the initialization sequence and the sequence has to >>>>>> be done again when the status register value is not 0x00. >>>>>> >>>>>> Even before monitoring (irq or polling method), you have an issue with your PLL >>>>>> mentioned with the "sn65dsi83 2-002c: Unexpected link status 0x01" message. >>>>>> >>>>>> I don't understand even how your panel can be correctly driven with the bridge >>>>>> PLL unlock. >>>>> >>>>> We'll try to figure out the reason and see what's the best path forward. >>>>> >>>>> Whatever was the reason it was working before, and it should stay >>>>> working >>>> >>>> I agree with Hervé that using the chip with an unlocked PLL looks dangerous >>>> and totally out of spec. So I encourage you to investigate what is going on >>>> in the hardware looking for the root cause, checking whether the PLL is >>>> really unlocked and how to get it working properly. >>>> >>>> The driver should be definitely be written focusing on the nominal case and >>>> handle out-of-spec cases as an exception, not the other way around. >>>> >>>> I also agree your hardware should not stop working when upgrading to a new >>>> kernel, so this investigation would ideally nail down tha root cause and >>>> point to a solution in a very short time. >>>> >>>> Hervé has matured quite some experience on SN65DSI84 error management, >>>> leading to his error recovery patch, and I also have a board with that chip >>>> on my desk. So we may be helpful in discussion, as well as reviewing and >>>> testing patches. >>> >>> I'd say we should do it the other way around. If that patch breaks >>> systems that were working fine so far without a clear reason, we should >>> revert the offending commit, and *then* work towards a solution to >>> support error recovery that doesn't break that system. >>> >> >> I have the feeling that the broken system has an issue from the beginning. >> Why its PLL has been unlocked ? >> >> I would like to understand what happens but, of course, I don't have the >> hardware to investigate. >> >> Could the issue been on a component before the SN65DSI83 bridge? >> I mean the component in charge of generating the DSI clock can be a culprit. > > I understand what you're saying, but it's not the right way to think about it. > > Let's change perspective. > > Your work laptop just got a kernel upgrade, and its display doesn't work > anymore. Would you be happy with the answer "it was broken all along, we > might be able to help you fix it, maybe not, who knows when we'll have a > fix"? > > It's frustrating, you might not even be able to debug it in the first > place, and most importantly, broken or not, it used to work just fine. > > If it used to work for years, how can you possibly argue that it was > broken all along? I agree. We could either revert the error handling, or change it to a print (dev_dbg? but will it flood-print then if the unlock irq is being raised all the time) instead of doing a reset. Tomi